Skip to content

Commit 0767add

Browse files
committed
Update index.html
1 parent 4df6a23 commit 0767add

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

index.html

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff 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-
350348
const 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

355352
function 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

367377
function isScrolledIntoView(el) {

0 commit comments

Comments
 (0)