mirror of
https://github.com/DerTyp7/shop-ejs-expressjs.git
synced 2025-10-29 20:42:10 +01:00
Stock Colors
This commit is contained in:
@@ -42,7 +42,20 @@
|
|||||||
%>Keine Bewertungen<%
|
%>Keine Bewertungen<%
|
||||||
}
|
}
|
||||||
%></h4>
|
%></h4>
|
||||||
<h4><%=prod.quantity %> auf Lager</h4>
|
|
||||||
|
<%
|
||||||
|
var col;
|
||||||
|
if (prod.quantity > 5) {
|
||||||
|
col = "green";
|
||||||
|
} else if (prod.quantity > 0) {
|
||||||
|
col = "orange";
|
||||||
|
} else {
|
||||||
|
col = "red";
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<h4 style="color: <%=col %>">
|
||||||
|
<%=prod.quantity %> auf Lager
|
||||||
|
</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="productImage">
|
<div class="productImage">
|
||||||
<img src="<%=prod.img %>">
|
<img src="<%=prod.img %>">
|
||||||
|
|||||||
Reference in New Issue
Block a user