From c8ccf8b4c247c3a1d15de946db58973ccf96ab09 Mon Sep 17 00:00:00 2001 From: JSriwongsa Date: Wed, 7 Jun 2023 16:52:07 -0500 Subject: [PATCH] made changes --- restaurant_website/main.js | 13 +++++++------ restaurant_website/order.css | 9 ++++++--- restaurant_website/order.html | 4 ++-- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/restaurant_website/main.js b/restaurant_website/main.js index 06eb76d..de152f2 100644 --- a/restaurant_website/main.js +++ b/restaurant_website/main.js @@ -1,4 +1,5 @@ -//sticky navbar +//sticky navbar --------------------------------------------- + const nav = document.querySelector("header"); window.addEventListener("scroll", function(){ if(this.document.documentElement.scrollTop>20){ @@ -7,18 +8,18 @@ window.addEventListener("scroll", function(){ else{ nav.classList.remove("sticky"); } - }) -//parallax effect +//parallax effect --------------------------------------------- + const Parallax = document.querySelector("#home"); window.addEventListener("scroll", function(){ let offset = window.pageYOffset; Parallax.style.backgroundPositionY = offset * 0.5 +"px"; }); +//menu --------------------------------------------- -//menu let menu = document.querySelector('nav') let menubtn = document.querySelector('.menu-btn') let closebtn = document.querySelector('.close-btn') @@ -30,7 +31,7 @@ closebtn.addEventListener('click', function(){ menu.classList.remove('active'); }); -//static +//static --------------------------------------------- const staticContentE1 = document.querySelectorAll('.num'); @@ -54,7 +55,7 @@ staticContentE1.forEach((staticContentE1) =>{ } }); -//countdown +//countdown --------------------------------------------- const openTimeStr = "We are open at 17:00" const openTime = parseInt(openTimeStr.substring(15, 20)); diff --git a/restaurant_website/order.css b/restaurant_website/order.css index d4a5dc8..5645f0f 100644 --- a/restaurant_website/order.css +++ b/restaurant_website/order.css @@ -212,13 +212,15 @@ body{ } /*--------------------------------------------------------------------------------------------------------------------------*/ #food-items{ - display: none; + } #category-list{ - display: none; + } /*--------------------------------------------------------------------------------------------------------------------------*/ - +.cart-toggle{ + display: none; +} #cart-page{ background: var(--other-color); margin: 40px 10px; @@ -303,3 +305,4 @@ body{ color: var(--bg-color); } + diff --git a/restaurant_website/order.html b/restaurant_website/order.html index f027be7..facd74d 100644 --- a/restaurant_website/order.html +++ b/restaurant_website/order.html @@ -60,7 +60,7 @@ 4.3 - +

Spicy Edamame

$6.00

@@ -786,7 +786,7 @@ + - \ No newline at end of file