diff options
| author | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2024-07-07 03:29:37 +0200 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2024-07-07 03:29:37 +0200 |
| commit | c984f01843205fca289ec87379a890714be19f17 (patch) | |
| tree | 2e8b026dbd77948a8dab9066d1d3c2d00c2989b6 | |
| parent | 719a31fa53e6c14d8510e8671684698aa9e45ec1 (diff) | |
Remove js
| -rw-r--r-- | static/js/scripts.js | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/static/js/scripts.js b/static/js/scripts.js deleted file mode 100644 index e1380cd..0000000 --- a/static/js/scripts.js +++ /dev/null @@ -1,54 +0,0 @@ -/*! -* Start Bootstrap - Grayscale v7.0.5 (https://startbootstrap.com/theme/grayscale) -* Copyright 2013-2022 Start Bootstrap -* Licensed under MIT (https://github.com/StartBootstrap/startbootstrap-grayscale/blob/master/LICENSE) -*/ -// -// Scripts -// - -window.addEventListener('DOMContentLoaded', event => { - - // Navbar shrink function - var navbarShrink = function () { - const navbarCollapsible = document.body.querySelector('#mainNav'); - if (!navbarCollapsible) { - return; - } - if (window.scrollY === 0) { - navbarCollapsible.classList.remove('navbar-shrink') - } else { - navbarCollapsible.classList.add('navbar-shrink') - } - - }; - - // Shrink the navbar - navbarShrink(); - - // Shrink the navbar when page is scrolled - document.addEventListener('scroll', navbarShrink); - - // Activate Bootstrap scrollspy on the main nav element - const mainNav = document.body.querySelector('#mainNav'); - if (mainNav) { - new bootstrap.ScrollSpy(document.body, { - target: '#mainNav', - offset: 74, - }); - }; - - // Collapse responsive navbar when toggler is visible - const navbarToggler = document.body.querySelector('.navbar-toggler'); - const responsiveNavItems = [].slice.call( - document.querySelectorAll('#navbarResponsive .nav-link') - ); - responsiveNavItems.map(function (responsiveNavItem) { - responsiveNavItem.addEventListener('click', () => { - if (window.getComputedStyle(navbarToggler).display !== 'none') { - navbarToggler.click(); - } - }); - }); - -});
\ No newline at end of file |
