TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/v-doom/llms.txt
Use this file to discover all available pages before exploring further.
Layout component is the persistent root shell of v-doom. It mounts once and stays alive for the entire session, composing every global visual element — the custom cursor, particle canvas, fixed navigation bar, and page-transition wrapper — while delegating the active route’s content to React Router’s <Outlet />. Every page in the portfolio renders inside Layout; nothing bypasses it.
Overview
Layout assembles the following elements on every route:<Cursor />— the custom animated cursor overlay, rendered at the very top of the tree so it sits above all other content<ParticleBackground />— a full-viewport canvas of drifting particles rendered behind all other content<Navigation />— the fixed top navigation bar with logo and route links<AnimatePresence mode="wait">— Framer Motion’s presence wrapper that orchestrates page-enter and page-exit animations without overlap<Outlet />— the React Router outlet that renders the matched child route’s page component
violet/amber highlight palette from this single class.
AnimatePresence is re-exported from Cursor.js and imported from there in Layout, not directly from framer-motion. Both Cursor and AnimatePresence come from the same import.Page Transitions
Every route change triggers a blur-fade transition powered by Framer Motion’s<AnimatePresence>. The key prop on <m.main> is set to the current pathname (via React Router’s useLocation()), so Framer Motion treats each navigation as a distinct component mount/unmount cycle.
mode="wait" option ensures the exiting page fully completes its exit animation before the incoming page begins its entrance — preventing two pages from being visible simultaneously.
Composition Order
The stacking context is intentional. Each layer is assigned a z-index that keeps global chrome above the content canvas:| Layer | Component | z-index |
|---|---|---|
| Particle background | <ParticleBackground /> | z-0 (base) |
| Main content area | <m.main> / <Outlet /> | z-10 |
| Navigation bar | <Navigation /> | z-50 |
| Custom cursor | <Cursor /> | z-[100] |
Content Container
The<m.main> element doubles as both the animation target and the layout constraint for all page content:
| Class | Purpose |
|---|---|
pt-24 | Clears the fixed navigation bar (≈ 96 px) so page content is never obscured |
pb-12 | Breathing room at the bottom of every page |
px-6 md:px-12 | Responsive horizontal padding — tighter on mobile, wider on desktop |
max-w-7xl mx-auto | Centers content within an 80 rem max-width column |
<m.main>.
Router Integration
Layout is registered as the React Router element for the root/ route. All child routes are nested beneath it:
<Outlet /> inside Layout renders whichever element matches the current URL. Adding a new page only requires adding a new <Route> here — Layout handles all surrounding chrome automatically.