diff --git a/functions/views/css/style.css b/functions/views/css/style.css index cc56fa2..494d8a7 100644 --- a/functions/views/css/style.css +++ b/functions/views/css/style.css @@ -88,8 +88,19 @@ footer a { font-family: osl; font-size: 23px; color: #898989; + cursor: pointer; + transition: 0.3s; } +.user-name:hover { + color: red; +} +.user-name:active { + transition: 0.1s; + color: #F0F0F0; +} + + .logon-crumbs button { float: left; position: relative; @@ -511,6 +522,7 @@ footer a { .my-product-container img { width: 100%; max-height: 100%; + cursor: pointer; } .my-product-details-container { display: block; diff --git a/functions/views/home.ejs b/functions/views/home.ejs index 7e885b2..1895646 100644 --- a/functions/views/home.ejs +++ b/functions/views/home.ejs @@ -67,7 +67,7 @@
-

Popular:

+

Recent:

<% var keys = Object.keys(products) %> <% keys.forEach(function(key){ %> diff --git a/functions/views/js/fdb.js b/functions/views/js/fdb.js index 31c1b52..37f94bc 100644 --- a/functions/views/js/fdb.js +++ b/functions/views/js/fdb.js @@ -143,6 +143,14 @@ function purchaseItem() { } +function my_product(productID) { + firebase.auth().currentUser.getIdToken().then(function(idToken) { + console.log("my-products?uToken=" + idToken + '&productid=' + productID) + window.location.replace("my-product?uToken=" + idToken + '&productid=' + productID) + }) + .catch(e => {console.log(e)}) +} + function my_products() { firebase.auth().currentUser.getIdToken().then(function(idToken) { window.location.replace("my-products?uToken=" + idToken) diff --git a/functions/views/my-product.ejs b/functions/views/my-product.ejs new file mode 100644 index 0000000..8405a2c --- /dev/null +++ b/functions/views/my-product.ejs @@ -0,0 +1,105 @@ + + + + + + + GG Prototype + + + + + + + + + + + + + + +
+
+ + +
+ img + + + Extras +
+ +
+ + +
+
+
+
+

<%= item.name %>

+

Seller <%= item.owner %>

+

Location: <%= item.location %>

+

In stock: <%= item.stock %>

+

Price: £<%= item.price %>

+ +
+
+

<%= item.desc %>

+
+ + +
+
+ +
+ + + + + + \ No newline at end of file diff --git a/functions/views/my-products.ejs b/functions/views/my-products.ejs index 576312b..a85b199 100644 --- a/functions/views/my-products.ejs +++ b/functions/views/my-products.ejs @@ -66,8 +66,8 @@ <% var keys = Object.keys(products) %> <% keys.forEach(function(key){ %>
- - img + + ")} title="<%= products[key].img %>" alt="img" src="media/var.png">

<%= products[key].name%>

diff --git a/functions/views/product.ejs b/functions/views/product.ejs index d96be65..16aa656 100644 --- a/functions/views/product.ejs +++ b/functions/views/product.ejs @@ -24,7 +24,7 @@