What do we do?
60 |We help businesses scale
61 |Schedule a call to learn more about our services
62 | 63 |├── .vscode └── settings.json ├── README.md ├── app.js ├── index.html └── styles.css /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "liveServer.settings.port": 5501 3 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Simple website created using HTML, CSS & Javascript with smooth scroll effect 2 | 3 | Watch the full tutorial on how I built this website on my Youtube @Brian Design https://youtu.be/3-2Pj5hxwrw 4 | 5 | -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | const menu = document.querySelector('#mobile-menu'); 2 | const menuLinks = document.querySelector('.navbar__menu'); 3 | const navLogo = document.querySelector('#navbar__logo'); 4 | 5 | // Display Mobile Menu 6 | const mobileMenu = () => { 7 | menu.classList.toggle('is-active'); 8 | menuLinks.classList.toggle('active'); 9 | }; 10 | 11 | menu.addEventListener('click', mobileMenu); 12 | 13 | // Show active menu when scrolling 14 | const highlightMenu = () => { 15 | const elem = document.querySelector('.highlight'); 16 | const homeMenu = document.querySelector('#home-page'); 17 | const aboutMenu = document.querySelector('#about-page'); 18 | const servicesMenu = document.querySelector('#services-page'); 19 | let scrollPos = window.scrollY; 20 | // console.log(scrollPos); 21 | 22 | // adds 'highlight' class to my menu items 23 | if (window.innerWidth > 960 && scrollPos < 600) { 24 | homeMenu.classList.add('highlight'); 25 | aboutMenu.classList.remove('highlight'); 26 | return; 27 | } else if (window.innerWidth > 960 && scrollPos < 1400) { 28 | aboutMenu.classList.add('highlight'); 29 | homeMenu.classList.remove('highlight'); 30 | servicesMenu.classList.remove('highlight'); 31 | return; 32 | } else if (window.innerWidth > 960 && scrollPos < 2345) { 33 | servicesMenu.classList.add('highlight'); 34 | aboutMenu.classList.remove('highlight'); 35 | return; 36 | } 37 | 38 | if ((elem && window.innerWIdth < 960 && scrollPos < 600) || elem) { 39 | elem.classList.remove('highlight'); 40 | } 41 | }; 42 | 43 | window.addEventListener('scroll', highlightMenu); 44 | window.addEventListener('click', highlightMenu); 45 | 46 | // Close mobile Menu when clicking on a menu item 47 | const hideMobileMenu = () => { 48 | const menuBars = document.querySelector('.is-active'); 49 | if (window.innerWidth <= 768 && menuBars) { 50 | menu.classList.toggle('is-active'); 51 | menuLinks.classList.remove('active'); 52 | } 53 | }; 54 | 55 | menuLinks.addEventListener('click', hideMobileMenu); 56 | navLogo.addEventListener('click', hideMobileMenu); 57 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 |Unlimited Possibilities
48 | 49 |Schedule a call to learn more about our services
62 | 63 |AI Powered technology
74 | 75 |Take the lepa
79 | 80 |100 Combinations
84 | 85 |1000's of colors
89 | 90 |See what makes us different
101 | 102 |