Documentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/spooky-developer/llms.txt
Use this file to discover all available pages before exploring further.
Nav turns the site’s top navigation bar into a graveyard fence. Each link is shaped like a tombstone — rounded top, flat base — and animates upward when hovered or active, giving the impression of tombstones rising from the ground. The component is rendered inside the sticky <header> in Layout.
Link definitions
The full set of routes is declared as a static constant inside the component:<Route> defined in main.js.
Tombstone shape and styling
Every nav item is aw-16 md:w-24 h-24 md:h-32 rounded-t-full <div>, which produces the characteristic tombstone silhouette across all viewport sizes. The label text sits centred inside.
| State | Classes applied |
|---|---|
| Default | bg-haunt-tombstone border-t-4 border-x-4 border-haunt-tombstoneDark text-haunt-bone |
| Hover | hover:bg-haunt-tombstoneDark hover:-translate-y-2 |
| Active route | bg-haunt-tombstoneDark border-haunt-moon/50 text-haunt-moon -translate-y-4 |
-translate-y-4) and glows with a teal border tint (border-haunt-moon/50), making the current page immediately recognisable.
Framer Motion opacity animation
Amotion.div wraps the glow gradient overlay inside each tombstone. When a link becomes the active route, the motion.div animates its opacity from 0 to 1, producing a subtle fade-in on the teal highlight. This prevents the active state from appearing abruptly on navigation. initial={false} skips the animation on the first render so the correct active state is shown immediately on page load.
Nav container
The outer<nav> element carries w-full py-8 px-4 overflow-x-auto, which enables horizontal scrolling when the tombstone row exceeds the viewport width. The inner <ul> uses flex justify-center items-end gap-2 md:gap-4 min-w-max mx-auto to keep all tombstones on one line and centred.
Adding a new nav item
Add a matching Route in main.js
Open The
assets/main.js and add a <Route> inside the root layout route:path value must match the path field you added to LINKS (without the leading /).