File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed
Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -345,12 +345,9 @@ <h2 class="color-1 weight-title-h font-title section__title center">A codeful of
345345
346346// add scroll event listeners
347347
348- const screenHeight = window . innerHeight ;
349-
350348const featurePoints = document . querySelectorAll ( '#features .ftPoint' ) ;
351-
352- const startPointAnimation = screenHeight / 3 ;
353- const pointStaggerInterval = 34 + ( 7 * 5 ) ;
349+ const themeColorTag = document . querySelector ( 'meta[name="theme-color"]' ) ;
350+ const heroEl = document . querySelector ( '#hero' ) ;
354351
355352function checkScrollAnimations ( ) {
356353
@@ -362,6 +359,19 @@ <h2 class="color-1 weight-title-h font-title section__title center">A codeful of
362359
363360 } ) ;
364361
362+
363+ const scrolled = window . scrollY || window . pageYOffset ;
364+
365+ if ( scrolled < ( heroEl . clientHeight - 15 ) ) {
366+
367+ themeColorTag . content = '#0f1014' ;
368+
369+ } else {
370+
371+ themeColorTag . content = '#1a1c24' ;
372+
373+ }
374+
365375}
366376
367377function isScrolledIntoView ( el ) {
You can’t perform that action at this time.
0 commit comments