Press Start uses React Router v6 inside aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/press-start/llms.txt
Use this file to discover all available pages before exploring further.
BrowserRouter to manage client-side navigation between seven named routes and a 404 catch-all. Because the app is deployed on GitHub Pages — a static host with no server-side routing — a combination of hash-based URL fragments and pre-generated static HTML shells in the pages/ directory ensures that every route is reachable by direct URL, bookmark, or social media link without hitting a 404.
Route definitions
All<Route> elements are declared inside a single <Routes> block within the PageWrapper transition container in main.js:
path="*" route renders a retro GAME OVER screen for any URL that does not match the seven named paths.
Named routes at a glance
| Path | Label | Page component |
|---|---|---|
/ | HOME | Home |
/about | ABOUT | About |
/projects | PROJECTS | Projects |
/skills | SKILLS | Skills |
/writing | WRITING | Writing |
/case-studies | CASE STUDIES | CaseStudies |
/contact | CONTACT | Contact |
* | — | GAME OVER inline element |
Static HTML shell mechanism
GitHub Pages cannot rewrite URLs toindex.html the way a Node or Nginx server can. Every pages/*.html file is a lightweight shell that solves this by writing the intended route into the hash fragment before the React app boots.
The inline script in each shell follows the same pattern, shown here for pages/About.html:
window.location.hash to the route path. React Router’s history implementation reads the hash fragment on startup and activates the matching <Route> without any server involvement. The window.__STATIC_PAGE_ROUTE__ assignment provides a fallback signal so the app can cross-check the intended route during initialisation.
There is one shell per named route in
pages/. The root / route is covered by index.html at the repository root and does not need its own shell.PageWrapper transition component
Every<Route> renders inside PageWrapper, a component that listens to the current location and applies a fade transition whenever the route changes:
- Fade out — the wrapper’s opacity drops to
0over 150 ms. Simultaneously a green scanline div flashes across the screen, mimicking a CRT beam sweep. - Fade in — after 150 ms the new route’s content replaces the old content and opacity returns to
1.
"fadeOut" phase and is removed from the DOM before the fade-in completes, keeping the animation cost minimal.
Keyboard navigation
ArcadeMenu registers a keydown listener on window and maps the arrow keys to route changes, matching the joystick controls of a physical arcade cabinet:
ArrowRight/ArrowDown and ArrowLeft/ArrowUp are treated as equivalent pairs so the controls feel natural whether the player thinks of movement as horizontal or vertical.
For full ArcadeMenu documentation including the visual indicator and active-route highlighting, see ArcadeMenu component reference.