The Blog page presents articles as a stack of vintage postcards resting on a wooden shelf. Postcards sit layered on top of one another in a fixed-height container; clicking any card fans it out and expands it to display its full excerpt. Clicking the same card again collapses it back into the stack. A wood-panelled shelf is rendered below the card stack using absolutely-positioned decorative divs, and an “Archives” label on the shelf front ties the whole assemblage together.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.
Route:
Static HTML:
Page function:
Data array:
/blogStatic HTML:
pages/Blog.htmlPage function:
G() in assets/main.jsData array:
F in assets/main.jsWhat the page displays
| Element | Content |
|---|---|
Section heading (h1) | Tales from the Crypt |
| Subtitle | Vintage postcards detailing my descent into madness. |
| Card stack container | relative w-full max-w-md h-[300px] mt-20 |
| Primary component | Postcard stack — one per article |
| Shelf decoration | Two wood-coloured div layers (#3e2723 / #4e342e) with an “Archives” label |
Articles data
Four articles are stored in theF array in assets/main.js.
| ID | Title | Date | Background colour |
|---|---|---|---|
| 1 | Tales from the DOM | Oct 31, 2023 | #f4f1ea (cream) |
| 2 | The Haunted Hook | Oct 15, 2023 | #e2d5c4 (tan) |
| 3 | CSS Grid Graveyard | Sep 28, 2023 | #d7ccc8 (grey-rose) |
| 4 | Vampire Variables | Sep 10, 2023 | #cfd8dc (slate-blue) |
Article excerpts
Tales from the DOM (Oct 31, 2023): “Dearest reader, I encountered a terrifying bug today. The elements were shifting without cause. It was… a race condition.”
The Haunted Hook (Oct 15, 2023): “useEffect ran infinitely. The browser screamed. Memory spiked. I had forgotten the dependency array. May the code gods have mercy.”
CSS Grid Graveyard (Sep 28, 2023): “Buried my floats today. Grid is the future. The layout is finally at peace, resting perfectly centered in its container.”
Vampire Variables (Sep 10, 2023): “Global variables are draining the life from this application. We must isolate them before they infect the entire state.”
Raw data structure
Halloween-themed concept
Articles are recast as letters from a doomed correspondent — the vintage postcard format implies secrecy, age, and drama. The wooden shelf anchors the cards in a physical space, evoking an old crypt or haunted library storeroom. Each article title (“Haunted Hook”, “Crypt”, “Vampire Variables”) wraps real frontend developer pain-points in horror-story language, making the blog feel in-character without sacrificing the actual technical content.Interactive behaviour
The page componentG() manages a single piece of React state: selectedId.
- When a
Postcardis clicked,onClickis called with itsid. - If
selectedIdalready equals thatid, it is set back tonull(collapse). - Otherwise
selectedIdis set to the clickedid(expand). - Each
Postcardreceives anisSelectedprop (selectedId === article.id) so it knows whether to show its expanded state.
selectedId can only hold one value).
Shelf decoration
The shelf is built from three absolutely-positioned layers inside therelative container:
| Layer | Background | Position | Purpose |
|---|---|---|---|
| Top shelf plank | #3e2723 | bottom: -20px, z-0 | Shelf surface behind cards |
| Bottom shelf body | #4e342e | bottom: -40px, z-50 | Shelf front face |
| ”Archives” badge | #2d1b18 | Centred on front face | Decorative label |
Framer Motion animations
The header block uses the standard top-drop entrance. IndividualPostcard components manage their own expand/collapse animations internally (the isSelected prop drives them).
How to customise
Add a new article
Append an object to the
F array with a unique id, title, date, excerpt, and color. Choose a muted background color (hex) so the postcard looks aged and thematic.Edit an existing article
Find the object by
id in the F array and update title, date, or excerpt as needed.Change a postcard colour
Update the
color field on the relevant object. Muted, desaturated tones (#f0e8d8, #d4c5b0) work best to maintain the vintage-postcard look.