├── img ├── Icon.png ├── Logo.png ├── Logo (1).png ├── Logo (2).png ├── Logo (3).png ├── Logo (4).png ├── Logo (5).png ├── Logo (6).png └── Illustration.png ├── script.js ├── index.html └── style.css /img/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dostonjon21/Nexcent/HEAD/img/Icon.png -------------------------------------------------------------------------------- /img/Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dostonjon21/Nexcent/HEAD/img/Logo.png -------------------------------------------------------------------------------- /img/Logo (1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dostonjon21/Nexcent/HEAD/img/Logo (1).png -------------------------------------------------------------------------------- /img/Logo (2).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dostonjon21/Nexcent/HEAD/img/Logo (2).png -------------------------------------------------------------------------------- /img/Logo (3).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dostonjon21/Nexcent/HEAD/img/Logo (3).png -------------------------------------------------------------------------------- /img/Logo (4).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dostonjon21/Nexcent/HEAD/img/Logo (4).png -------------------------------------------------------------------------------- /img/Logo (5).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dostonjon21/Nexcent/HEAD/img/Logo (5).png -------------------------------------------------------------------------------- /img/Logo (6).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dostonjon21/Nexcent/HEAD/img/Logo (6).png -------------------------------------------------------------------------------- /img/Illustration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dostonjon21/Nexcent/HEAD/img/Illustration.png -------------------------------------------------------------------------------- /script.js: -------------------------------------------------------------------------------- 1 | // Other important pens. 2 | // Map: https://codepen.io/themustafaomar/pen/ZEGJeZq 3 | // Dashboard: https://codepen.io/themustafaomar/pen/jLMPKm 4 | 5 | let dropdowns = document.querySelectorAll('.navbar .dropdown-toggler') 6 | let dropdownIsOpen = false 7 | 8 | // Handle dropdown menues 9 | if (dropdowns.length) { 10 | // Usually I don't recommend doing this (adding many event listeners to elements have the same handler) 11 | // Instead use event delegation: https://javascript.info/event-delegation 12 | // Why: https://gomakethings.com/why-event-delegation-is-a-better-way-to-listen-for-events-in-vanilla-js 13 | // But since we only have two dropdowns, no problem with that. 14 | dropdowns.forEach((dropdown) => { 15 | dropdown.addEventListener('click', (event) => { 16 | let target = document.querySelector(`#${event.target.dataset.dropdown}`) 17 | 18 | if (target) { 19 | if (target.classList.contains('show')) { 20 | target.classList.remove('show') 21 | dropdownIsOpen = false 22 | } else { 23 | target.classList.add('show') 24 | dropdownIsOpen = true 25 | } 26 | } 27 | }) 28 | }) 29 | } 30 | 31 | // Handle closing dropdowns if a user clicked the body 32 | window.addEventListener('mouseup', (event) => { 33 | if (dropdownIsOpen) { 34 | dropdowns.forEach((dropdownButton) => { 35 | let dropdown = document.querySelector(`#${dropdownButton.dataset.dropdown}`) 36 | let targetIsDropdown = dropdown == event.target 37 | 38 | if (dropdownButton == event.target) { 39 | return 40 | } 41 | 42 | if ((!targetIsDropdown) && (!dropdown.contains(event.target))) { 43 | dropdown.classList.remove('show') 44 | } 45 | }) 46 | } 47 | }) 48 | 49 | // Open links in mobiles 50 | function handleSmallScreens() { 51 | document.querySelector('.navbar-toggler') 52 | .addEventListener('click', () => { 53 | let navbarMenu = document.querySelector('.navbar-menu') 54 | 55 | if (!navbarMenu.classList.contains('active')) { 56 | navbarMenu.classList.add('active') 57 | } else { 58 | navbarMenu.classList.remove('active') 59 | } 60 | }) 61 | } 62 | 63 | handleSmallScreens() 64 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 |41 | Where to grow your business as a photographer: site or social media? 42 |
43 | 44 |
46 | 55 | We have been working with some Fortune 500+ clients 56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 | 76 | Who is Nextcent suitable for? 77 |
78 | 79 |