Change position of toc

This commit is contained in:
thiloho
2025-04-27 02:12:19 +02:00
parent 73a27a81b8
commit fcf22bf15e

View File

@@ -27,7 +27,9 @@ const { Content, headings } = await render(article);
modDate={article.data.modDate}
{slug}
>
<details class="toc sticky top-0 z-20">
<details
class="toc sticky top-10 z-10 -translate-y-px border border-neutral-300 bg-white dark:border-neutral-600 dark:bg-neutral-800"
>
<summary
title="Table of contents"
class="mx-auto flex w-fit cursor-pointer list-none border-b-2 border-transparent px-2 py-2.5 hover:border-neutral-300 hover:bg-neutral-200 hover:dark:border-neutral-600 hover:dark:bg-neutral-700"
@@ -44,7 +46,7 @@ const { Content, headings } = await render(article);
</svg>
</summary>
<div
class="not-prose max-h-[calc(100vh-4rem)] overflow-y-scroll border border-neutral-300 bg-white p-2 dark:border-neutral-600 dark:bg-neutral-800"
class="not-prose max-h-[calc(100vh-4rem)] overflow-y-scroll bg-white p-2"
>
<p class="text-center">
<strong class="text-sm">Table of Contents</strong>