1const menuToggle = document.querySelector('.mobile-menu-toggle'); 2const mobileMenu = document.querySelector('.mobile-menu'); 3const mainContainer = document.querySelector('.main-container'); 4const group = document.querySelector('.group'); 5const rightElement = document.querySelector('.right'); 6 7menuToggle.addEventListener('click', (e) => { 8 e.stopPropagation(); 9 toggleMenu(); 10}); 11 12document.addEventListener('click', (e) => { 13 if (mobileMenu.classList.contains('open') && 14 !mobileMenu.contains(e.target) && 15 !menuToggle.contains(e.target)) { 16 toggleMenu(); 17 } 18}); 19 20function toggleMenu() { 21 menuToggle.classList.toggle('open'); 22 mobileMenu.classList.toggle('open'); 23 document.body.classList.toggle('menu-open'); 24} 25 26// Add scaling function for .group element 27function scaleGroup() { 28 if (!document.body.classList.contains('subpage')) { 29 if (window.innerWidth <= 620) { 30 const width = window.innerWidth; 31 const scale = 0.00177 * width - 0.09894; 32 group.style.transform = `scale(${scale})`; 33 } else { 34 group.style.transform = 'none'; 35 } 36 } 37} 38 39// Add scaling function for .right element 40function scaleRight() { 41 if (window.innerWidth <= 546) { 42 const width = window.innerWidth; 43 const scale = 0.00194 * width - 0.05812; 44 rightElement.style.transform = `scale(${scale})`; 45 } else { 46 rightElement.style.transform = ''; 47 } 48} 49 50// Run on load and resize 51window.addEventListener('load', () => { 52 scaleGroup(); 53 scaleRight(); 54}); 55window.addEventListener('resize', () => { 56 scaleGroup(); 57 scaleRight(); 58});
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.