docs: use builtin active link detection (#1850)

This commit is contained in:
Marvin Hagemeister
2023-10-04 14:34:42 +02:00
committed by GitHub
parent 3e1b78736d
commit 9fdb0d5b01
3 changed files with 19 additions and 27 deletions
+1 -3
View File
@@ -31,9 +31,7 @@ export default function NavigationBar(
href={item.href}
class={`p-2 ${
isHome ? "text-green-900" : "text-gray-600"
} hover:underline ${
props.active == item.href ? "font-bold" : ""
}`}
} hover:underline [data-current]:font-bold [data-ancestor]:font-bold`}
>
{item.name}
</a>