Quick Start
1. Files. Keep the structure as shipped:
Code snippet omitted: it ships with the download.
2. Swap the script tag for production. At the bottom of index.html:
Code snippet omitted: it ships with the download.
3. Make it your course.
- Replace the copy: course name, instructor, promises, FAQ, price.
- Edit the modules in
#curriculum. Each module is one<li class="module" data-module data-hours="4" data-title="...">. The planner readsdata-hoursanddata-title: change them and the whole plan recomputes on load. Add or remove modules freely. - Point the two enrol buttons (
.btn--marigoldin the nav and the enrol card) at your checkout or amailto:. - Update the static plan in
#paceif you change the modules (see "The static fallback plan" below), or leave it; with JavaScript on it is replaced at load anyway.
4. Optional: remove Lenis. Delete the lenis.min.js script tag. Anchors fall back to native smooth scrolling and everything else is untouched.
The pace planner
The planner element carries its configuration as data attributes:
Code snippet omitted: it ships with the download.
| Attribute | Default | Description |
|---|---|---|
data-min |
2 |
Lowest hours-per-week stop |
data-max |
10 |
Highest stop; also the width a "full" load bar represents |
data-start |
6 |
The value the page loads with |
The slider snaps to whole hours. The plan packs modules greedily into weeks of the chosen size, letting a module span a week boundary (marked "cont." in the plan). The finish date is next Monday plus the plan, landing on the final Friday, formatted for en-GB; change the locale in formatDate() in script.js if you want another.
If you delete the whole #curriculum section, the planner finds no module data and leaves the static plan in place with the slider inert, and the page still reads correctly.
The static fallback plan
The week list inside [data-plan] in index.html is what no-JS visitors (and search engines) read. It is authored to match the default 6 h/week pack of the shipped modules. If you change modules or hours, update it to match: load the page with JavaScript on, and copy what the script renders (right-click, inspect, copy outer HTML of the rows).
If you change the stop labels
The 2h … 10h labels under the track are static markup (.pace-stops). If you change data-min/data-max, update them to match.
Accessibility
- The slider handle is a real
role="slider"witharia-valuemin/max/nowand anaria-valuetextthat speaks the full answer ("6 hours a week: 6 weeks, finishing 4 Sep 2026") on every change. - Keyboard: arrow keys move one hour, PageUp/PageDown two, Home/End to the ends. Focus rings are visible on every interactive element and swap colour per surface.
- Touch: a vertical swipe on the handle or track scrolls the page; only a proven-horizontal drag changes the plan. A tap on the track seeks.
- Reduced motion: honoured by both the CSS media query and the script's
matchMediabranch. The planner stays fully interactive; plan, bars, count-ups and date simply update instantly. Lenis is never created. - No JavaScript: the full page renders, including the default plan as a plain list and final stat figures.
- Delete any section and the script skips it; every lookup is guarded.
Palette
Six colours, all defined once in :root in assets/style.css, each with an --*-rgb triple that every translucent value derives from. A reskin is editing six hexes and six triples; there are no stray rgba() literals to hunt.
Code snippet omitted: it ships with the download.
The stylesheet header records the measured contrast ratio of every pair as used. Two rules to keep when reskinning: the accent is banned as text on paper surfaces and as small text on the ground (it is a fill, a bar, a focus ring, or bold display type), and the dim/faint alpha values are pinned at the ratios listed; thin them and body copy drops below AA.
Type is Gabarito (display), Albert Sans (body) and Victor Mono italic (the hand-written annotations). Swap them in the Google Fonts link and the three --font-* tokens.
Dependencies
- GSAP 3 core
- ScrollTrigger (reveals, count-ups)
- Draggable (the pace slider; without it the track still seeks on click and the keyboard still works)
- Lenis (optional smooth scrolling)
All loaded from CDN in index.html; no bundler, no build step.
Worked examples, the events and programmatic API, and the class reference ship with the download, alongside the full source.