Remove JS
This commit is contained in:
parent
a72946bf59
commit
4b6b704ab7
7
assets/js/bootstrap.bundle.min.js
vendored
7
assets/js/bootstrap.bundle.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -1,54 +0,0 @@
|
||||||
/*!
|
|
||||||
* Start Bootstrap - Grayscale v7.0.3 (https://startbootstrap.com/theme/grayscale)
|
|
||||||
* Copyright 2013-2021 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();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
Loading…
Reference in a new issue