Documentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/dev-haunt/llms.txt
Use this file to discover all available pages before exploring further.
DoorPanel presents each work history entry as a full-height haunted wooden door. The door face shows the company name and a subtle “Click to open” prompt. Clicking swings the door open — a spring-animated 3D rotateY transform — exposing the job details (role, period, and description) on the dark wall behind it. Clicking again closes it.
Usage
DoorPanel takes a job object and its position index. The Work page in assets/main.js maps over the workHistory array and wraps each door in a Framer Motion entrance animation:
assets/main.js:
Props
The employer name. Displayed on the front face of the door inside a dark plaque, visible before the door is opened.
The job title. Revealed on the wall behind the door when the user clicks it open. Styled in the Spooky font with pumpkin-orange color.
The employment timeframe, e.g.
"2022 - Present". Displayed beneath the role in monospace ghost text once the door is open.A short paragraph describing responsibilities and achievements. Displayed as body copy on the revealed wall panel.
Zero-based position in the work history array. Used by the parent to stagger entrance animations with a
delay of index * 0.2 seconds.Open / Close Interaction
The component holds anisOpen boolean in local state. Clicking anywhere on the door panel toggles it. The door itself is a motion.div with transformOrigin: 'left' so it pivots from its hinge edge, exactly like a real door:
rotateY: -105, the door swings past 90° so its inner edge passes the frame, giving it a convincing physical feel. The bounce: 0.2 spring setting adds a slight overshoot and settle.
The “Click to open” hint is wrapped in Framer Motion’s
AnimatePresence and fades out when the door opens. It reappears with initial={{ opacity: 0 }} animate={{ opacity: 1 }} whenever the door closes again.Layout Structure
EachDoorPanel is 500px tall with perspective-1000 applied to its wrapper. Three layers stack inside:
| Layer | z-index | Purpose |
|---|---|---|
| Back wall | z-0 | Dark panel with a diagonal crosshatch pattern that holds the role/period/description |
| Door border | z-20 | Decorative wood-colored border with pointer-events-none |
| Door face | z-10 | Animated wooden door that rotates open on click |
repeating-linear-gradient to render a subtle woven-texture pattern at 5% opacity, adding depth when the door is open.
Work History Data
Update theworkHistory array in assets/main.js to reflect your own employment history:
Customization
Change the door swing angle — The default open angle is-105deg. Reduce it toward -90 for a door that opens flush to the wall, or increase it beyond -105 for a wider swing:
bounce for a bouncier settle, or set it to 0 for a critically-damped close:
workHistory creates another door. The Work page renders them in a horizontal flex row on desktop and a column on mobile. With more than four entries, consider wrapping in a scrollable container.