TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/web-weaver/llms.txt
Use this file to discover all available pages before exploring further.
Layout component is the outermost wrapper of the entire Web Weaver application. Every page a visitor sees is rendered inside it. Beyond providing a consistent navigation header, Layout is the single place where the three global ambient effects — EmberCursor, FogLayer, and BlackCat — are mounted, ensuring they are present on every route without any page component needing to import them individually. Understanding Layout is the key to understanding how the whole app is assembled.
What Layout does
Layout fulfils three distinct responsibilities:- Routing shell — It wraps the app in React Router v6’s
HashRouterand defines the top-levelRoutestree, mapping URL hashes to page components. - Global effects host — It renders
<EmberCursor />,<FogLayer />, and<BlackCat />exactly once, outside of any route, so they persist across navigation. - Navigation bar — It outputs a sticky header containing hash-based
<Link>elements to every section of the portfolio.
Navigation links
The header contains the following hash-router links, appearing in this order:| Label | Hash |
|---|---|
| About | #/about |
| Projects | #/projects |
| Skills | #/skills |
| Work | #/work |
| Case Studies | #/case-studies |
| Blog | #/blog |
| Testimonials | #/testimonials |
| Contact | #/contact |
Module exports
Because the compiled bundle uses short export names for tree-shaking, theLayout.js module exposes several named exports. You will rarely need to import these directly — the default app entry point wires them up automatically.
| Export | Description |
|---|---|
H | The HashRouter wrapper component |
L | The header/nav component containing hash Link elements |
R | The Routes container |
o | A single Route definition |
r | The createHashRouter render helper used by the app entry point |
Usage
Layout is instantiated once inassets/main.js and is not intended to be composed manually inside page components. The structure it renders looks like this:
Props
Layout accepts no props. All configuration — routes, nav links, and ambient components — is hard-coded inside the module.Implementation notes
HashRouter strategy
Web Weaver uses
HashRouter (URLs like /#/about) rather than BrowserRouter. This means the app can be deployed to any static file host without server-side URL rewriting.Global effects lifecycle
EmberCursor, FogLayer, and BlackCat are mounted outside the <Routes> tree, so they are never unmounted during navigation. Their internal state and animations are preserved across all route transitions.z-index layering
The three ambient components each manage their own stacking context.
FogLayer sits above the background but below page content; BlackCat uses a low z-index so it never obscures interactive elements; EmberCursor sits at the very top.No props needed
Because Layout is a singleton shell rather than a reusable widget, it deliberately exposes no configuration props. Customising nav links or adding new routes requires editing the module directly.