Welcome, Mortals separates its interactive behavior into four JavaScript components stored in theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/welcome-mortals/llms.txt
Use this file to discover all available pages before exploring further.
components/ folder. Every HTML page in the theme loads all four components via the same <link rel="modulepreload"> and <script type="module"> pattern in the <head>, so the themed cursor, shared navigation, surprise spider, and horror-host presenter are active on every page without any per-page configuration. Understanding what each component does — and what to leave alone — makes customization significantly safer.
The files in
components/ are pre-compiled bundles. They are not source modules that you import or configure in your own code. You do not call their functions directly, pass props to them, or install any packages. They run automatically when any page loads.How Components Are Loaded
Every HTML page in the theme uses the same head structure. The<script type="module"> tag loads assets/main.js, which bootstraps the entire application. The <link rel="modulepreload"> tags tell the browser to fetch the component files early so they are ready when main.js requests them. The application mounts into the single <div id="root"></div> in the page body.
assets/main.js is the only entry script. All four components and the shared assets are resolved through it automatically. The <div id="root"></div> is the single mount point where the entire application renders — do not add other elements to <body> or remove this div.The Four Components
CustomCursor.js — Themed Cursor Pointer
CustomCursor.js — Themed Cursor Pointer
What It Does
CustomCursor.js replaces the browser’s default mouse pointer with a custom cursor styled to match the theme’s spooky aesthetic. The cursor is a small ghost-like SVG shape rendered in the Parchment (#F4F1E8) palette color, and it has a subtle floaty follow behavior as it tracks mouse movement.The cursor has two visual states that switch automatically based on what the pointer is hovering over:- Default state — a resting expression, small eyes and a slight smile
- Hover state — wider eyes and an open mouth, activated when hovering over any link or button
How It Is Loaded
CustomCursor.js is preloaded via <link rel="modulepreload"> in every HTML file’s <head> and is activated automatically through assets/main.js. No per-page configuration is needed.Adjusting the Cursor Appearance
Cursor-related visual styling can be adjusted inassets/main.css. This is the recommended place to make appearance changes — for example, sizing, opacity, or z-index rules that affect how the cursor overlays page content.Accessibility Note
Layout.js — Shared Navigation Framing
Layout.js — Shared Navigation Framing
SpiderScare.js — Surprise Spider Interaction
SpiderScare.js — Surprise Spider Interaction
What It Does
SpiderScare.js controls the spider that drops suddenly into view from the top of the screen. The spider is a decorative SVG element drawn using the theme’s Haunted Purple (#2A1B3D), Parchment (#F4F1E8), and Lawn Green (#7CFC00) colors — Lawn Green specifically colors the spider’s glowing eyes. It hangs on a thin thread and drops from a random horizontal position across the top of the viewport.After a visitor has clicked on the page a set number of times, the spider drops in, stays briefly, and then retreats back upward. The horizontal drop position is randomized each time so it lands somewhere in the middle portion of the screen.How It Is Loaded
SpiderScare.js is preloaded in every HTML file’s <head>:Accessibility Notes
Do not add click handlers to the spider element or make it interactive. Its role is decorative — it should startle visitors briefly, not obstruct their path through the site.
Editing Notes
The spider’s click trigger threshold and display duration are controlled inSpookHost.js, not in SpiderScare.js itself. Adjust those values in SpookHost.js if you want the spider to appear more or less frequently, or to stay visible for a longer or shorter time. See the SpookHost section below for details.SpookHost.js — Horror-Host Presenter
SpookHost.js — Horror-Host Presenter
What It Does
SpookHost.js is the coordinator that powers the theatrical horror-host experience and manages shared behavior across the other components. It tracks how many times a visitor has clicked on the page and fires the spider drop when that count reaches the trigger threshold. It also manages an optional audio toggle that persists across page navigations.The component wraps the entire page content and listens for click events anywhere on the page — this is why clicking anywhere (not just on specific buttons) counts toward the spider trigger.The Theatrical Tone
SpookHost is named after the classic horror-host tradition: a theatrical presenter who introduces horror content with dramatic flair. In the theme, the SpookHost is the unseen presence that notices when visitors have been active on the page, then sends the spider to greet them.How It Is Loaded
SpookHost.js is preloaded in every HTML file’s <head>:assets/main.js so that all other components have access to the shared state it manages.Editing Notes
SpookHost.js is the foundation that the other three components depend on. It should be edited last and with the most care. The spider click threshold and display duration are the values most likely to be worth adjusting — these control how often visitors see the spider and how long it remains on screen. Search the file for the click-count value and the timeout duration to find and adjust these settings.SpookHost.js and the SpiderScare.js preload tag from every HTML file. Remove both together — leaving one without the other can cause the remaining component to behave unexpectedly.Component Dependency Map
The four components work as a connected system rather than independent parts.SpookHost.js
Root coordinator. Tracks click count, spider trigger state, and audio preferences. All other components depend on it.
Layout.js
Shared page framing and navigation. Controls what every page looks and feels like structurally.
SpiderScare.js
Renders the animated drop spider when the click threshold set in SpookHost is reached.
CustomCursor.js
Replaces the browser cursor with a themed SVG ghost pointer on desktop and pointer devices.
Quick Customization Reference
- Cursor
- Spider
- Styling
The cursor’s visual appearance is styled through
assets/main.css. This is the recommended file to adjust sizing, opacity, or z-index rules that affect how the cursor overlays page content.The cursor activates on desktop pointer devices automatically. It does not require any per-page configuration. If you want to disable the custom cursor entirely, remove the CustomCursor.js preload tag from every HTML file’s <head>.Assets Supporting the Components
Theassets/ folder contains the scripts and stylesheet that the component layer depends on.
| File | Role |
|---|---|
assets/main.js | Entry script — bootstraps the application and mounts it into <div id="root"> |
assets/main.css | Main stylesheet — layout, colors, typography, cursor rules, and all visual effects |
assets/index.js | Shared supporting script |
assets/jsx-runtime.js | Shared supporting script |
assets/proxy.js | Shared supporting script |