File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 321321 let ticking = false ;
322322 const settleTimers = [ ] ;
323323
324- const isVisuallyScrolled = ( ) => {
325- if ( isPortraitMobile ( ) ) {
326- const hero = document . getElementById ( 'hero' ) ;
327- const pageWrap = document . querySelector ( '.page-wrap' ) ;
328-
329- if ( hero && pageWrap ) {
330- const heroTop = hero . getBoundingClientRect ( ) . top ;
331- const pageWrapStyles = getComputedStyle ( pageWrap ) ;
332- const expectedTop = parseFloat ( pageWrapStyles . paddingTop ) || 0 ;
333- return heroTop < ( expectedTop - 4 ) ;
334- }
335- }
336-
324+ const getScrolled = ( ) => {
337325 const scrollEl = document . scrollingElement || document . documentElement || document . body ;
338326 const y = Math . max (
339327 window . scrollY || 0 ,
343331 return y > 4 ;
344332 } ;
345333
334+ const resetBackdropState = ( ) => {
335+ if ( ! backdrop ) backdrop = document . querySelector ( '.nav-backdrop' ) ;
336+ backdrop ?. classList . remove ( 'is-visible' ) ;
337+ document . body . classList . remove ( 'nav--scrolled' ) ;
338+ last = null ;
339+ } ;
340+
346341 const compute = ( ) => {
347342 ticking = false ;
348- const scrolled = isVisuallyScrolled ( ) ;
343+ const scrolled = getScrolled ( ) ;
349344
350345 if ( scrolled !== last ) {
351346 if ( ! backdrop ) backdrop = document . querySelector ( '.nav-backdrop' ) ;
370365
371366 const scheduleSettledChange = ( baseDelay = 0 ) => {
372367 clearSettleTimers ( ) ;
368+ resetBackdropState ( ) ;
373369 [ baseDelay , baseDelay + 140 , baseDelay + 320 , baseDelay + 560 ] . forEach ( ( delay ) => {
374370 settleTimers . push ( window . setTimeout ( onChange , delay ) ) ;
375371 } ) ;
Original file line number Diff line number Diff line change 88 < link rel ="preconnect " href ="https://fonts.googleapis.com ">
99 < link rel ="preconnect " href ="https://fonts.gstatic.com " crossorigin >
1010 < link href ="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Unbounded:wght@500;700;800&display=swap " rel ="stylesheet ">
11- < link rel ="stylesheet " href ="assets/css/style.css?v=20260321a ">
11+ < link rel ="stylesheet " href ="assets/css/style.css?v=20260321e ">
1212
1313 < link rel ="icon " type ="image/svg+xml " href ="favicon.svg ">
1414 < link rel ="icon " sizes ="192x192 " href ="android-chrome-192x192.png ">
@@ -133,6 +133,6 @@ <h2>Live Modules</h2>
133133
134134 < div id ="footer-slot "> </ div >
135135
136- < script src ="assets/js/shell.js?v=20260321d " defer > </ script >
136+ < script src ="assets/js/shell.js?v=20260321f " defer > </ script >
137137</ body >
138138</ html >
You can’t perform that action at this time.
0 commit comments