partially fix current page marker

This commit is contained in:
Pascal Fischer
2023-05-10 14:13:23 +02:00
parent b82f8af4b1
commit 1a1bdc388d
2 changed files with 18 additions and 31 deletions

View File

@@ -1,6 +1,6 @@
import { useRouter } from 'next/router'
import clsx from 'clsx'
import {ActivePageMarker, NavLink, TopLevelNavItem} from "@/components/NavigationAPI";
import {ActivePageMarker, NavLink, TopLevelNavItem, VisibleSectionHighlight} from "@/components/NavigationAPI";
import {AnimatePresence, motion} from "framer-motion";
export const docsNavigation = [
@@ -81,6 +81,11 @@ function NavigationGroup({ group, className }) {
{group.title}
</motion.h2>
<div className="relative mt-3 pl-2">
<AnimatePresence >
{isActiveGroup && (
<VisibleSectionHighlight group={group} pathname={router.pathname} />
)}
</AnimatePresence>
<motion.div
layout
className="absolute inset-y-0 left-2 w-px bg-zinc-900/10 dark:bg-white/5"