1/*! 2* Start Bootstrap - Freelancer v7.0.6 (https://startbootstrap.com/theme/freelancer) 3* Copyright 2013-2022 Start Bootstrap 4* Licensed under MIT (https://github.com/StartBootstrap/startbootstrap-freelancer/blob/master/LICENSE) 5*/ 6// 7// Scripts 8// 9 10window.addEventListener('DOMContentLoaded', event => { 11 12 // Navbar shrink function 13 var navbarShrink = function () { 14 const navbarCollapsible = document.body.querySelector('#mainNav'); 15 if (!navbarCollapsible) { 16 return; 17 } 18 if (window.scrollY === 0) { 19 navbarCollapsible.classList.remove('navbar-shrink') 20 } else { 21 navbarCollapsible.classList.add('navbar-shrink') 22 } 23 24 }; 25 26 // Shrink the navbar 27 navbarShrink(); 28 29 // Shrink the navbar when page is scrolled 30 document.addEventListener('scroll', navbarShrink); 31 32 // Activate Bootstrap scrollspy on the main nav element 33 const mainNav = document.body.querySelector('#mainNav'); 34 if (mainNav) { 35 new bootstrap.ScrollSpy(document.body, { 36 target: '#mainNav', 37 offset: 72, 38 }); 39 }; 40 41 // Collapse responsive navbar when toggler is visible 42 const navbarToggler = document.body.querySelector('.navbar-toggler'); 43 const responsiveNavItems = [].slice.call( 44 document.querySelectorAll('#navbarResponsive .nav-link') 45 ); 46 responsiveNavItems.map(function (responsiveNavItem) { 47 responsiveNavItem.addEventListener('click', () => { 48 if (window.getComputedStyle(navbarToggler).display !== 'none') { 49 navbarToggler.click(); 50 } 51 }); 52 }); 53 54});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.