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 }}>
document.addEventListener("scroll", () =>
sections.forEach(
({ id }) =>
document.getElementById(id).getBoundingClientRect().bottom <
window.innerHeight &&
(document.querySelector("mdui-navigation-bar").value = id)
)
sections.forEach(({ id }) => {
const rect = document.getElementById(id).getBoundingClientRect()
if (rect.bottom < window.innerHeight || rect.top < 200)
document.querySelector("mdui-navigation-bar").value = id
})
)
</script>

View file

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