made changes
This commit is contained in:
parent
6ea321bb23
commit
c8ccf8b4c2
3 changed files with 15 additions and 11 deletions
|
@ -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));
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
<i class="fa fa-star" id="rating"> 4.3</i>
|
||||
<i class="fa-solid fa-cart-plus add-to-cart"></i>
|
||||
</div>
|
||||
<img src="images/order/1.jpg" alt="">
|
||||
<img src="images/order/2.jpg" alt="">
|
||||
<p id="order-name">Spicy Edamame</p>
|
||||
<p id="order-price">$6.00</p>
|
||||
</div>
|
||||
|
@ -786,7 +786,7 @@
|
|||
|
||||
</div>
|
||||
|
||||
<script src="order.js" type="module"></script>
|
||||
|
||||
<script src="main.js"></script>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Reference in a new issue