Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
gauravChaurasiya18 committed Jun 14, 2024
1 parent 2033424 commit 8aa7792
Show file tree
Hide file tree
Showing 33 changed files with 1,932 additions and 0 deletions.
Binary file added favicon.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/about.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/appetizer.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/badgeimg.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/breakfast.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/chef-avatar.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/chef-icon.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/dish.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/dish1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/dish2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/dish3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/dish4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/dish5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/dish6.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/food-icon.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/logo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/lunch.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/mainimg1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/mainimg2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/mainimg3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/mainimg4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/party-icon.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/programe1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/programe2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/programe3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/restaurant-icon.jpg
Binary file added images/restimg.jpg
14 changes: 14 additions & 0 deletions images/separator.svg
Binary file added images/special.jpg
Binary file added images/testimonials-b.jpg
689 changes: 689 additions & 0 deletions index.html

Large diffs are not rendered by default.

96 changes: 96 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
const preloader = document.querySelector("[data-preload]");
window.addEventListener("load", function () {
preloader.classList.add("loaded");
document.body.classList.add("loaded");
});

const addEventOnElements=function(element,eventType,callback){
for(let i=0,leng=element.length;i<leng;i++){
element[i].addEventListener(eventType,callback);
}
}
const navbar=document.querySelector("[data-navbar]");
const navToggler=document.querySelectorAll("[data-nav-toggler]");
const overlay=document.querySelector("[data-overlay]");

const toggleNavbar=function(){
navbar.classList.toggle("active");
overlay.classList.toggle("active");;
document.body.classList.toggle("nav-active");
}
addEventOnElements(navToggler,"click",toggleNavbar);

const header=document.querySelector("[data-header]");
const backTopBtn=document.querySelector("[data-back-top-btn]");
let lastScroll=0;
const hideHeader=function(){
const isScrollBottom=lastScroll<window.scrollY;
if(isScrollBottom){
header.classList.add("hide");
}else{
header.classList.remove("hide");
}
lastScroll=window.scrollY;
}
window.addEventListener("scroll",function(){
if(this.window.scrollY>=50){
header.classList.add("active");
backTopBtn.classList.add("active");
hideHeader();
}else{
header.classList.remove("active");
backTopBtn.classList.remove("active");
}
});
const mainSlider=document.querySelector("[data-main-slider]");
const mainSliderItems=document.querySelectorAll("[data-main-slider-item]");
const mainSliderPrevBtn=document.querySelector("[data-prev-btn]");
const mainSliderNextBtn=document.querySelector("[data-next-btn]");
let currentSlidePosition=0;
let lastActiveSlider=mainSliderItems[0];
const updateSliderPosition=function(){
lastActiveSlider.classList.remove("active");
mainSliderItems[currentSlidePosition].classList.add("active");
lastActiveSlider=mainSliderItems[currentSlidePosition];
}
const nextSlider=function(){
if(currentSlidePosition>=mainSliderItems.length-1){
currentSlidePosition=0;
}else{
currentSlidePosition++;
}
updateSliderPosition();
}
mainSliderNextBtn.addEventListener("click",nextSlider);
const prevSlider=function(){
if(currentSlidePosition<=0){
currentSlidePosition=mainSliderItems.length-1;
}else{
currentSlidePosition--;
}
updateSliderPosition();
}
mainSliderPrevBtn.addEventListener("click",prevSlider);
const autoSlider=function(){
autoSlideInterval=setInterval(function(){
nextSlider();
},7000);
}
addEventOnElements([mainSliderNextBtn,mainSliderPrevBtn],"mouseover",function(){
clearInterval(autoSlideInterval);
});
addEventOnElements([mainSliderNextBtn,mainSliderPrevBtn],"mouseout",autoSlider);
window.addEventListener("load",autoSlider);

const parallaxItems=document.querySelectorAll("[data-parallax-item]");
let x,y;
window.addEventListener("mousemove",function(event){
x=(event.clientX/window.innerWidth*10)-5;
y=(event.clientY/window.innerHeight*10)-5;
x=x-(x*2);y=y-(y*2);
for(let i=0,len=parallaxItems.length;i<len;i++){
x=x*Number(parallaxItems[i].dataset.parallaxSpeed);
y=y*Number(parallaxItems[i].dataset.parallaxSpeed);
parallaxItems[i].style.transform=`translate3d(${x}px,${y}px,0px)`;
}
});
Loading

0 comments on commit 8aa7792

Please sign in to comment.