The 404 page transforms a dead URL into an on-brand tombstone moment. Visitors who wander into an unknown route see a stone grave marker engraved with “404 / RIP this URL / It’s dead, Jim.” and a single button offering to return to safety. When Haunt Mode is active, aDocumentation 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.
GhostIcon rises from the grave in a looping float-and-fade animation, turning an error state into part of the experience rather than an interruption.
Route
The
path="*" route in React Router is a catch-all that matches any URL not handled by a more specific route. It is registered last in the <Routes> block so it only activates when no other route matches.Tombstone Design
The tombstone is a<div> styled to look like a classic rounded-top headstone:
| Property | Value | Effect |
|---|---|---|
rounded-t-full | Full-radius top corners | Characteristic tombstone arch |
bg-haunt-tombstone | Muted grey-green | Weathered stone colour |
border-8 border-haunt-tombstoneDark | Thick darker border | Carved-edge depth |
opacity-50 on <h1> | 50 % opacity | Faded-inscription look for “404” |
Shadow Base
A separate dark ellipse is placed absolutely at the base of the tombstone to simulate the shadow cast on the earth:-left-8 -right-8) and sits below the stone (-bottom-4) to look like the tombstone is half-buried.
Floating Ghost (Haunt Mode)
WhenisHaunted is true, a GhostIcon animates upward from the centre of the tombstone and fades in and out in a continuous loop:
| Prop | Value | Meaning |
|---|---|---|
initial.y | 0 | Starts at tombstone centre |
animate.y | -150 | Rises 150 px upward |
animate.opacity | [0, 1, 0] | Fades in, holds, fades out |
transition.duration | 4 s | Full cycle takes 4 seconds |
transition.repeat | Infinity | Loops forever |
transition.delay | 1 s | Pauses 1 second before first rise |
z-0, behind the tombstone stone face (z-10) and the shadow base (z-20), so it appears to pass through the stone rather than in front of it — as a ghost should.
If Haunt Mode is disabled the ghost element is not rendered at all, keeping the 404 page clean and non-distracting for visitors who prefer the toned-down experience.
”Flee Back to Safety” Button
Below the tombstone group, a<Link> component routes the visitor back to the homepage:
rounded-full) uses the site’s teal moon colour at low opacity, brightening on hover — consistent with the ghost-UI buttons found elsewhere in the portfolio.