diff --git a/app.js b/app.js index 342488a..3b16dff 100644 --- a/app.js +++ b/app.js @@ -1,25 +1,31 @@ // get elements const D_image = document.querySelector(".DisplayImage") const IntroText = document.querySelector(".IntroText") - - +const MenuBtn = document.querySelector("#MenuBtn") +const Nav = document.querySelector("nav") /// animations // anime js 1. Display Image -anime({ - targets: '.DisplayImage', - border: ' solid #FFF', - borderRadius: ['0%', '50%', '0%'], - autoplay: true, - loop: true, - duration: 6000, - easing: 'easeInOutQuad' -}); +// anime({ +// targets: '.DisplayImage', +// border: ' solid #FFF', +// borderRadius: ['0%', '50%', '0%'], +// autoplay: true, +// loop: true, +// duration: 6000, +// easing: 'easeInOutQuad' +// }); // animate IntroText -ScrollReveal().reveal('.IntroText', { delay: 800}); -ScrollReveal().reveal('.HomeBtns', { delay: 1000}); +ScrollReveal().reveal('.IntroText', { delay: 500}); +ScrollReveal().reveal('.HomeBtns', { delay: 700}); +ScrollReveal().reveal('.DisplayImage', { delay: 800}); +ScrollReveal().reveal('.ProductCard', { delay: 1000}); +ScrollReveal().reveal('form', { delay: 1000}); +ScrollReveal().reveal('.SocialLinks', { delay: 1000}); +ScrollReveal().reveal('.Links', { delay: 700}); +ScrollReveal().reveal('#About', { delay: 900}); @@ -36,17 +42,30 @@ const Covers = [ "(./Images/cover3600.png) center center /contain no-repeat" ] -const cycleImages = (images, container, step) => { +const ChangeImage = (images, container, step) => { images.forEach((image, index) => ( setTimeout(() => { container.style.background = "url"+`${image}`; }, step * (index + 1)) )) - setTimeout(() => cycleImages(images, container, step), step * images.length) - } + setTimeout(() => ChangeImage(images, container, step), step * images.length) +} - cycleImages(Covers, D_image, 5000) +ChangeImage(Covers, D_image, 5000) + +// menu btn for small screens +MenuBtn.addEventListener("click", ()=>{ + Nav.classList.toggle('Show'); +}) +window.onclick = function(e){ + let NavClass = e.target.parentElement.classList + if(NavClass == "Show"){ + Nav.classList.toggle('Show'); +} +} +// give header background on scrolling +// window.onscroll = document.querySelector("header").classList.add("Scrolled") \ No newline at end of file diff --git a/index.html b/index.html index 762f238..508e00f 100644 --- a/index.html +++ b/index.html @@ -19,13 +19,13 @@
+ Lorem ipsum, dolor sit amet consectetur adipisicing elit. Enim atque impedit repellat, accusantium dolorem qui sint quam non cum culpa ut! Ipsum soluta explicabo ad corrupti, numquam voluptatibus? Incidunt, reiciendis. Nihil at maiores, mollitia deserunt voluptates magnam totam ab dolorum minus, hic cupiditate, ad pariatur quaerat possimus dignissimos qui deleniti. +
+ ++ Lorem ipsum dolor sit, amet consectetur adipisicing elit. Quo dicta obcaecati culpa recusandae incidunt voluptas officiis similique rem quam a consequuntur, corrupti non, aliquid fuga saepe suscipit natus quas inventore. +
+ +