The Eye-Witness Accounts page (route:Documentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/mystery-haunting/llms.txt
Use this file to discover all available pages before exploring further.
/testimonials) replaces the conventional testimonial carousel with something far more unsettling: a set of disembodied SVG eyeball widgets scattered across the viewport, each one silently tracking the visitor’s mouse cursor in real time. The page title reads “EYE-WITNESS ACCOUNTS” with the subtitle “They’re always watching.” Click any eye and it blinks open a floating quote card, revealing the client testimonial within. The eyes are positioned absolutely at defined percentage coordinates so they appear organically spread across the screen rather than in a predictable grid.
Testimonials
| Quote | Author | Position (x%, y%) |
|---|---|---|
| He fixed bugs I didn’t even know existed. Terrifyingly efficient. | CTO, Tech Corp | 20%, 30% |
| The code is clean, but I swear I hear whispers when I read it. | Lead Dev, Startup.io | 70%, 20% |
| Delivered the project dead on time. | Product Manager | 80%, 70% |
| A monster in the terminal. 10/10 would hire again. | Client | 30%, 80% |
Eye Tracking Mechanic
Capture global mouse position
A
mousemove event listener is registered on window when the component mounts. On every mouse movement it stores the cursor’s clientX and clientY coordinates in React state, making the position available to every eye widget simultaneously.Calculate pupil angle per eye
Each eye widget reads its own DOM position using a
ref and getBoundingClientRect(). It then calculates the angle from the eye’s centre to the cursor using Math.atan2, producing a direction vector that always points toward the cursor regardless of where the eye sits on the page.Cap pupil offset at 20px
The raw distance between the cursor and the eye centre is computed with
Math.hypot. The pupil offset is then capped at a maximum of 20px using Math.min, preventing the pupil from travelling outside the visible iris area no matter how far away the cursor is. Because the pupil is rendered inside an SVG using percentage coordinates, the final position is expressed as a percentage offset from centre (50, 50).Toggle quote card on click
Each eye maintains a local
isOpen boolean in state. Clicking the eye flips this value. When isOpen is true, Framer Motion animates the testimonial quote card from opacity: 0, scale: 0.8, y: 10 to fully visible and in position — and reverses the animation when the eye is clicked again to close it.Absolute Positioning
Each eye component is rendered withposition: absolute and placed at its designated x and y percentage coordinates using inline left and top styles, e.g. left: '20%', top: '30%'. The parent container is position: relative and fills the full viewport height, giving the eyes room to roam the entire page canvas.
Customization
How to add testimonials
How to add testimonials
Add a new object to the Each entry automatically receives its own SVG eye widget, mouse-tracking logic, and quote card toggle — no additional wiring is needed.
testimonials array in the page source. Each entry requires a unique id, the quote text, the author label, and x/y percentage coordinates for placement.