mirror of
https://github.com/DerTyp7/shop-ejs-expressjs.git
synced 2025-10-29 20:42:10 +01:00
Product Link Fix
This commit is contained in:
@@ -25,9 +25,10 @@
|
|||||||
var prod = products[i];
|
var prod = products[i];
|
||||||
if (!prod.img) { prod.img = "/images/examples.jpg"; }
|
if (!prod.img) { prod.img = "/images/examples.jpg"; }
|
||||||
//if (!prod.rating) { prod.rating = 0; } %>
|
//if (!prod.rating) { prod.rating = 0; } %>
|
||||||
<div class="productDIV" onClick="openProduct(<%=prod.id %>)">
|
<div class="productDIV">
|
||||||
<div class="productData">
|
<div class="productData">
|
||||||
<h4 style="color: Navy;"><%=prod.name %></h4>
|
<a href="/product/<%=prod.id %>"><h4 style="color: Navy;"><%=prod.name %></h4></a>
|
||||||
|
|
||||||
<h4><%=prod.price %>€</h4>
|
<h4><%=prod.price %>€</h4>
|
||||||
<h4><%
|
<h4><%
|
||||||
if (prod.rating) {
|
if (prod.rating) {
|
||||||
@@ -72,10 +73,14 @@
|
|||||||
function openProduct(id, newWindow) {
|
function openProduct(id, newWindow) {
|
||||||
window.open('/product/'+id, newWindow ? '_blank' : '_self')
|
window.open('/product/'+id, newWindow ? '_blank' : '_self')
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
|
a, a:hover, a:focus, a:active > .allProductsDIV {
|
||||||
|
text-decoration: none;
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
/* SEARCH INFO */
|
/* SEARCH INFO */
|
||||||
.productsResInfDIV {
|
.productsResInfDIV {
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -101,7 +106,6 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
height: 250px;
|
height: 250px;
|
||||||
cursor: pointer;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* IMAGE */
|
/* IMAGE */
|
||||||
@@ -133,6 +137,7 @@
|
|||||||
height: calc(100% - 60px);
|
height: calc(100% - 60px);
|
||||||
position: absolute;
|
position: absolute;
|
||||||
overflow-y: hidden;
|
overflow-y: hidden;
|
||||||
|
overflow-x: hidden;
|
||||||
right: 10px;
|
right: 10px;
|
||||||
bottom: 10px;
|
bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user