1document.addEventListener("DOMContentLoaded", setTemplateColors); 2 3const DEFAULT_COLORS = { 4 header: "#05668d", 5 footer: "#003548", 6 page: "#FFFFFF", 7 headerActive: "#097ba9", 8}; 9 10function setTemplateColors() { 11 let headerColor, footerColor, pageColor; 12 13 if (pageIsMain()) { 14 headerColor = DEFAULT_COLORS.header; 15 headerActiveColor = DEFAULT_COLORS.headerActive; 16 footerColor = DEFAULT_COLORS.footer; 17 pageColor = DEFAULT_COLORS.page; 18 } else { 19 headerColor = window.headerColor ?? DEFAULT_COLORS.header; 20 footerColor = window.footerColor ?? DEFAULT_COLORS.footer; 21 pageColor = window.pageColor ?? DEFAULT_COLORS.page; 22 headerActiveColor = window.headerColor ?? DEFAULT_COLORS.headerActive; 23 } 24 25 const headerTitleWrapper = document.querySelector( 26 ".js-header-title-wrapper" 27 ); 28 const mainNav = document.querySelector(".js-main-nav"); 29 const footerWrapper = document.querySelector(".js-footer-wrapper"); 30 const subNav = document.querySelector(".js-sub-nav"); 31 const navMobile = document.querySelector(".js-nav-mobile"); 32 33 headerTitleWrapper.style.setProperty("--template-color", headerColor); 34 mainNav.style.setProperty("--template-color", headerColor); 35 subNav.style.setProperty("--template-color", headerColor); 36 navMobile.style.setProperty("--template-color", headerColor); 37 navMobile.style.setProperty("--template-color-active", headerActiveColor); 38 footerWrapper.style.setProperty("--template-color", footerColor); 39 document.body.style.setProperty("--template-color", pageColor); 40} 41 42const MAIN_PAGE_PATH_NAME = "/"; 43 44function pageIsMain() { 45 return window.location.pathname === MAIN_PAGE_PATH_NAME; 46}
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.