Compare commits

..

2 commits

Author SHA1 Message Date
bff59baa04
Fix active issue
Some checks are pending
Deploy to Pages / Build (push) Waiting to run
Deploy to Pages / Deploy (push) Blocked by required conditions
2025-03-30 22:21:11 -04:00
8936dc45be
Fix scroll issue 2025-03-30 22:18:50 -04:00
2 changed files with 10 additions and 6 deletions

View file

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

View file

@ -25,6 +25,7 @@ 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 {
@ -116,4 +117,8 @@ main > * > section {
min-width: 300px; min-width: 300px;
} }
} }
@media (max-width: 1500px) {
scroll-margin-top: 5em;
}
} }