1document.addEventListener('DOMContentLoaded', function() { 2 /** 3 * Show request demo button if first child of .entry-content is .fb-solutions-hero 4 */ 5 function checkSolutionsHero() { 6 const entryContent = document.querySelector('.entry-content'); 7 const requestDemoBtn = document.querySelector('.fb-request-demo-btn'); 8 9 if (entryContent && requestDemoBtn) { 10 const firstChild = entryContent.firstElementChild; 11 12 if (firstChild && firstChild.classList.contains('fb-solutions-hero')) { 13 requestDemoBtn.style.opacity = '1'; 14 requestDemoBtn.style.visibility = 'visible'; 15 requestDemoBtn.style.transform = 'translateY(0)'; 16 } 17 } 18 } 19 20 // Run the check 21 checkSolutionsHero(); 22 23 /** 24 * Handle announcement bar visibility based on scroll position 25 */ 26 function handleAnnouncementBarScroll() { 27 const announcementBar = document.querySelector('.fb-announcement-bar'); 28 29 if (!announcementBar) { 30 return; // Exit if announcement bar doesn't exist 31 } 32 33 const announcementBarHeight = announcementBar.offsetHeight; 34 const requestDemoBtn = document.querySelector('.fb-request-demo-btn'); 35 const fireblocksHeaderWrapper = document.querySelector('header.wp-block-template-part'); 36 const fireblocksHeader = document.querySelector('.wp-block-kadence-header'); 37 let isHidden = false; 38 39 function onScroll() { 40 const scrollTop = window.pageYOffset || document.documentElement.scrollTop; 41 42 // Add header-sticky class when scrolling (only on breakpoints over 1280px) 43 if (window.innerWidth > 1280) { 44 if (scrollTop > 0) { 45 if (fireblocksHeaderWrapper && !fireblocksHeaderWrapper.classList.contains('header-sticky')) { 46 fireblocksHeaderWrapper.classList.add('header-sticky'); 47 } 48 } else { 49 if (fireblocksHeaderWrapper && fireblocksHeaderWrapper.classList.contains('header-sticky')) { 50 fireblocksHeaderWrapper.classList.remove('header-sticky'); 51 } 52 } 53 } 54 55 if (scrollTop > announcementBarHeight && !isHidden) { 56 // User has scrolled past the announcement bar height 57 announcementBar.classList.add('hide-announcement'); 58 59 // Show request demo button smoothly 60 if (requestDemoBtn) { 61 requestDemoBtn.classList.add('show-demo-btn'); 62 } 63 64 // Slide up Kadence header to fill the space 65 if (fireblocksHeader) { 66 fireblocksHeader.style.transform = `translateY(-${announcementBarHeight}px)`; 67 fireblocksHeader.style.transition = 'transform 0.3s ease'; 68 } 69 70 isHidden = true; 71 } else if (scrollTop <= announcementBarHeight && isHidden) { 72 // User has scrolled back to the top 73 announcementBar.classList.remove('hide-announcement'); 74 75 // Hide request demo button smoothly 76 if (requestDemoBtn) { 77 requestDemoBtn.classList.remove('show-demo-btn'); 78 } 79 80 // Return Kadence header to original position 81 if (fireblocksHeader) { 82 fireblocksHeader.style.transform = 'translateY(0)'; 83 } 84 85 isHidden = false; 86 } 87 } 88 89 // Add scroll event listener 90 window.addEventListener('scroll', onScroll, { passive: true }); 91 92 // Check initial scroll position in case page loads scrolled down 93 onScroll(); 94 } 95 96 // Initialize announcement bar scroll handler 97 handleAnnouncementBarScroll(); 98});
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.