Compare commits

..

No commits in common. "bff59baa049f8b33f1d045043b8ff4de190251ad" and "93ffa4a316d1ab717c329654ca9087e914e85d9a" have entirely different histories.

2 changed files with 6 additions and 10 deletions

View file

@ -24,10 +24,11 @@ const sections: Array<Page> = [
<script is:inline define:vars={{ sections }}> <script is:inline define:vars={{ sections }}>
document.addEventListener("scroll", () => document.addEventListener("scroll", () =>
sections.forEach(({ id }) => { sections.forEach(
const rect = document.getElementById(id).getBoundingClientRect() ({ id }) =>
if (rect.bottom < window.innerHeight || rect.top < 200) document.getElementById(id).getBoundingClientRect().bottom <
document.querySelector("mdui-navigation-bar").value = id window.innerHeight &&
}) (document.querySelector("mdui-navigation-bar").value = id)
)
) )
</script> </script>

View file

@ -25,7 +25,6 @@ mdui-card {
main > * > section { main > * > section {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
scroll-margin-top: 1em;
& div, & div,
mdui-card { mdui-card {
@ -117,8 +116,4 @@ main > * > section {
min-width: 300px; min-width: 300px;
} }
} }
@media (max-width: 1500px) {
scroll-margin-top: 5em;
}
} }