docs: design updates (#3098)

Update colors, spacing and fix the toc animation.
This commit is contained in:
Marvin Hagemeister
2025-07-16 14:01:30 +02:00
committed by GitHub
parent 713c85c12d
commit 776a275b5d
7 changed files with 44 additions and 24 deletions
+3 -3
View File
@@ -118,7 +118,7 @@ export function TableOfContents({ headings }: TableOfContentsProps) {
<use href="/icons.svg#arrow-down" />
</svg>
</button>
{isOpen && (
{isOpen.value && (
<div class="mt-2 pl-4 border-l border-foreground-primary/20 text-[13px] leading-7">
<nav aria-labelledby="toc-outline-btn">
<ul>
@@ -127,7 +127,7 @@ export function TableOfContents({ headings }: TableOfContentsProps) {
<li key={heading.id}>
<a
href={`#${heading.id}`}
class="block truncatetext-gray-600"
class="block truncatetext-gray-600 dark:text-gray-400"
// deno-lint-ignore react-no-danger
dangerouslySetInnerHTML={{ __html: heading.html }}
/>
@@ -159,7 +159,7 @@ export function TableOfContents({ headings }: TableOfContentsProps) {
<li key={heading.id}>
<a
href={`#${heading.id}`}
class="block truncate transition-colors text-gray-600 [&.active]:text-green-600"
class="block truncate transition-colors text-gray-600 dark:text-gray-400 [&.active]:text-green-600 dark:[&.active]:text-green-300"
onClick={() => {
setActiveLink(
ref.current!,