Show the timeline on when replies are present

This commit is contained in:
dtonon 2026-02-20 13:01:11 +01:00
parent 2e743b41e0
commit 4476d45228
3 changed files with 14 additions and 2 deletions

View file

@ -10,6 +10,13 @@ body {
background-color: var(--color-gray-100);
}
.no-scrollbar {
scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar {
display: none;
}
@theme {
--color-brand: #e32a6d;
--color-brand-hover: #c4205a;

View file

@ -26,11 +26,15 @@
onMount(() => {
const main = document.querySelector("main");
if (!main) return;
main.classList.add("no-scrollbar");
const onScroll = () => {
isScrolled = main.scrollTop > 0;
};
main.addEventListener("scroll", onScroll, { passive: true });
return () => main.removeEventListener("scroll", onScroll);
return () => {
main.classList.remove("no-scrollbar");
main.removeEventListener("scroll", onScroll);
};
});
// Measure OP's natural distance from main's border top (once after DOM is ready)