Skip to content

Commit 5b714ff

Browse files
committed
fix filter pop-in
1 parent 344c7c7 commit 5b714ff

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/components/docs/DocsFilters.astro

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,13 @@ const versions = ["New", "2.10", "2.9", "2.8", "2.7"]
164164
window.addEventListener("DOMContentLoaded", () => {
165165
updatePosition();
166166
filters.classList.remove("!fixed"); // fix layout shift on load
167+
filters.classList.add("sticky"); // fix layout shift on load
167168
});
168169

169170
window.addEventListener("resize", updatePosition);
170171
</script>
171172

172-
<div id="filters" class="sticky !fixed right-0 top-[118px]
173+
<div id="filters" class="fixed right-0 top-[35px] sm:top-[118px]
173174
w-full md:w-64 h-fit md:h-[87vh] flex flex-col p-4 gap-2
174175
border-b-2 md:border-b-0 md:border-l-2 border-l-border dark:border-d-border
175176
bg-l-bg dark:bg-d-bg

src/components/tutorials/TutorialsOverview.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const { selected, tutorials }: Props = Astro.props;
3333
window.addEventListener("resize", updatePosition);
3434
</script>
3535

36-
<div id="tutorials" class="sticky top-[118px] left-0 w-full md:w-64 md:h-[100vh] overflow-y-hidden p-4
36+
<div id="tutorials" class="sticky top-[35px] sm:top-[118px] left-0 w-full md:w-64 md:h-[100vh] overflow-y-hidden p-4
3737
flex flex-col gap-2 shrink-0
3838
border-b-2 md:border-b-0 md:border-r-2 border-l-border dark:border-d-border
3939
bg-l-bg dark:bg-d-bg">
@@ -48,7 +48,7 @@ const { selected, tutorials }: Props = Astro.props;
4848
</button>
4949
</div>
5050
<div id="tutorials-expand-area" class="hidden sm:flex flex-col gap-2">
51-
{tutorials.map(x => {
51+
{tutorials.toSorted().map(x => {
5252
if (x.title === selected) {
5353
return <a href={`/tutorials/${x.id}`} class="text-left px-4 py-3 rounded-md
5454
bg-skript hover:cursor-pointer

0 commit comments

Comments
 (0)