Skip to content

Commit 8b6c723

Browse files
authored
Update shadow on fullscreen tournament when page is loaded (#298)
1 parent f8840e1 commit 8b6c723

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/Turnierplan.App/Pages/TournamentFullscreen.cshtml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,12 @@
8484
}
8585
updateClock();
8686
setInterval(updateClock, 1000);
87-
document.onscroll = () => {
87+
const updateShadow = () => {
8888
const shadowStrength = window.scrollY > 100 ? 1 : (window.scrollY < 10 ? 0 : ((window.scrollY - 10) / 90));
8989
document.getElementById("header-information").style['box-shadow'] = `0 0 8px rgba(0, 0, 0, ${shadowStrength})`;
90-
};
90+
}
91+
document.onscroll = () => updateShadow();
92+
updateShadow();
9193
</script>
9294

9395
@if (Model.AutoReload.HasValue)

0 commit comments

Comments
 (0)