Quick Start
- Keep
index.htmlbeside theassetsdirectory and serve them with any static host or local server. - Replace SIDEQUEST, Bristol, the team size, dates and project copy in
index.html. - Change both the displayed email and
mailto:hello@sidequest.exampleto your real address. The.exampleaddress cannot receive enquiries. There is no form or backend. - Keep the three CDN tags above
assets/script.js, or self-host those dependencies and update the paths.
No build step is needed for the buyer's site. assets/script.min.js is a compact alternative to the readable script; load one, not both.
Using It With Your Own Design
The data attributes in the page are the behaviour contract. Class names own the appearance. You may change artwork, typography and copy while preserving the relevant section roots and controls. Sections initialise independently, so deleting a whole section does not break the rest of the page.
The brand and campaigns are fictional. LOOP, KIN and OTHER are original HTML/CSS artwork supplied with this template; no photography or third-party image credits are required. The graphics can be replaced by local images using meaningful alt text, explicit dimensions and appropriate responsive crops. There are no raw stock files or remote image requests.
Palette
The first :root block in assets/style.css contains four semantic colours and their RGB triples:
| Token | Default | Role |
|---|---|---|
--ground |
#D7BFF5 |
Lavender field and light graphic material |
--ink |
#281B37 |
Plum text and dark artwork |
--surface |
#F5EFDF |
Paper work and studio sections |
--accent |
#F2542D |
Tangerine graphic material and playground |
Update each hex and its --*-rgb companion. All text uses full-opacity plum or a high-contrast inverse pair. Plum on tangerine measures 4.67:1, so check that pair carefully when changing the accent. Do not put pale text over tangerine without measuring it.
The display face is Bricolage Grotesque at weight 800; body copy is DM Sans. Change the Google Fonts link and --font-display, --font-display-weight, and --font-body together. There is no demo palette picker.
The folding word
- Root:
[data-fold]. - Stage:
[data-fold-scene]; inner object:[data-fold-object]. - Four panels:
[data-fold-face], each containing a decorativedata-markletter. - Control:
[data-fold-range], a labelled native range from 0 to 100.
Replace PLAY with another four-letter word by editing the four data-mark values, then update the stage's accessible description. The h1 below the sculpture is real text and should describe your business. A different number of panels needs changes to the count guard, centre calculation and CSS widths.
The default range value of 28 starts PLAY in a tight concertina fold; 0 closes it further and 100 opens it flat. The range, horizontal pointer drag and sideways trackpad scroll control the same fold position. A short drag spans the full range; reversing direction responds immediately at either endpoint. Vertical touch gestures remain page scrolling. The paint function owns panel transforms; keep scrolling animation on other elements. Perspective is deliberately much larger than the sculpture's depth. The scene’s container dimensions set panel width and height independently, keeping artwork clear of the headline and bottom copy. The orange sticker lives outside the folding 3D group so panels cannot intersect it.
Campaign showcase
[data-work] contains .project-stack, a series of [data-project] articles, and [data-project-nav]. Each article's data-project value provides the automatically generated button label. Keep article IDs unique.
The original artwork lives in .campaign-loop, .campaign-kin and .campaign-other. Replace the inside of a campaign while preserving its article and caption. A landscape photograph can use a full-size object-fit: cover image, but check its crop in the taller phone composition.
At 900px and above, when reduced motion is off, the work section pins for window.innerHeight * 1.6. The articles advance in sequence. Increase this travel if adding many projects, or remove the desktop stacking branch for an ordinary portfolio list. Direct buttons and navigation use the pin's actual start position. On phones, without JavaScript or with reduced motion, the articles remain in document order.
Studio and contact
The studio statement, six-person count and two paragraphs are ordinary editable HTML. The commission note uses native <details> and <summary>. The opening and footer links point to real section IDs; update their href values if renaming sections.
The footer email is an unwired placeholder address, not a submission service. Replace it before publishing. The template does not send messages automatically.
The geometric mark
- Root:
[data-playground]. - Stage:
[data-mark-stage]. - Pieces: SVG groups with
[data-mark-piece]. - Each group has
data-x,data-yanddata-turnvalues for the separated state. - Range:
[data-mark-range]; reset button:[data-mark-reset].
The artwork is drawn around (300, 300); the expanded viewBox reserves room for its six pieces to separate. Update the centre used by paint if replacing that geometry. The centre circle stays anchored. Drag the artwork apart and release to spring back. The labelled range holds a chosen position and supports arrow keys. “Bring it back” resets either input to the exact original geometry, even during an unfinished return. The controls sit above the artwork so reset stays in view. Pull beyond 88% to find a small face and a one-shot colour burst inside the mark. The face blinks once, with a polite screen-reader announcement. Dropping below 65% or resetting clears the secret; reduced motion shows the face and message immediately without the burst or blink.
Accessibility and fallback
All content is visible before JavaScript enhancement. The synchronous head script adds has-js; the main script removes it if GSAP or ScrollTrigger fails to load. This leaves the folded composition and all project articles readable. Interactive controls appear only when enhancement is available.
Reduced motion is handled in both CSS and the GSAP matchMedia branch: controls update immediately, the campaign sequence is unpinned, and Lenis is disabled. There is no autoplay animation. Keyboard users can reach the range controls, project buttons, navigation, native details and email link. Focus outlines are retained. Decorative lettering is generated from data-mark rather than duplicated as low-contrast text nodes.
Smooth scrolling
Lenis is optional. Append ?smooth=off to compare native scrolling, or set data-smooth="off" on <html> for the deployed site. Reduced motion always disables it. Lenis and ScrollTrigger share GSAP's ticker; keep the ticker, refresh listener and teardown together.
window.gsapContext.revert() removes the template's GSAP enhancement and listeners. window.destroyLenis() removes the smooth-scroll integration. These are useful when mounting the page inside a client-side application.
Dependencies
- GSAP 3.12+ and ScrollTrigger; demo pins GSAP 3.15.0.
- Lenis 1.3.17, optional.
- Google Fonts: Bricolage Grotesque and DM Sans; self-host the font files if desired.
thumbnail.html is a static product-preview composition used by the catalogue, not part of the live business page.
Mobile navigation
Below 900px the header uses a native details menu. It works without JavaScript. With scripts available, choosing a link, clicking outside, pressing Escape or widening the viewport closes it. Escape returns focus to the toggle; choosing a section moves focus to that destination. Keep the desktop and mobile link lists in sync when renaming sections.
Worked examples, the events and programmatic API, and the class reference ship with the download, alongside the full source.