From c026dca58c659bd8ec92411c1b066ed537ec114f Mon Sep 17 00:00:00 2001 From: Moaz Ayman Date: Tue, 2 Jan 2024 21:44:35 +0200 Subject: [PATCH 1/2] Adjust views --- public/stylesheets/nav.css | 8 +++++++- views/book_instance.ejs | 13 ++++++++----- views/partials/navbar.ejs | 2 +- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/public/stylesheets/nav.css b/public/stylesheets/nav.css index 8a5e519..1b55f01 100644 --- a/public/stylesheets/nav.css +++ b/public/stylesheets/nav.css @@ -13,8 +13,13 @@ nav{ justify-content: space-between; position: relative; } +nav h1{ + color: #fff; + margin-bottom: 0; + font-wight: bold; +} .user-pic{ - width: 60px; + width: 50px; border-radius: 50%; cursor: pointer; margin-left: 30px; @@ -68,6 +73,7 @@ nav ul li a:hover{ .user-info h3{ font-weight: 500; color: white; + margin: 0; } .user-info img{ width: 50px; diff --git a/views/book_instance.ejs b/views/book_instance.ejs index 2cda90a..a3ce9b4 100644 --- a/views/book_instance.ejs +++ b/views/book_instance.ejs @@ -32,7 +32,7 @@
- + <% const stock = book.quantity %> <% if( stock > 0 ){ %> @@ -46,6 +46,11 @@ (cart_book) => cart_book._id.toString() === book._id.toString(), )) { %> + <% if( stock <= 0 ){ %> +

Out of stock

+ <% } else {%> +

In stock

+ <% } %>
diff --git a/views/partials/navbar.ejs b/views/partials/navbar.ejs index 4d4f0fa..3121373 100644 --- a/views/partials/navbar.ejs +++ b/views/partials/navbar.ejs @@ -13,7 +13,7 @@