Instructions.
Make Granitt yours.
Everything you need to customize the template: variables, fonts, Components, CMS, filters, GSAP animations, forms and SEO.
Getting started
Duplicate Granitt, then work through these chapters in order. Most global changes are one edit.
Variables
All design tokens are CSS variables in src/styles/template.css, named by role. Sizes switch per breakpoint through media queries.
Fonts & typography
Inter, IBM Plex Mono and Switzer are uploaded as custom fonts, so the site loads no third-party font CSS.
Components
Global elements are Astro components in src/components/shared — edit one file and every page updates.
CMS
Three collections power Services, Projects and News, each with an SEO Description field.
Filters
Projects and News filter by category without reloading the page.
GSAP & motion
GSAP 3.15 and ScrollTrigger from npm, driven by data attributes you can reuse on any element.
Forms
All forms are plain HTML forms; connect them to your form service.
Images & SEO
Every image is a managed asset with alt text; every page follows one title format and shares the Open Graph image.
Style guide & clean-up
Keep the project tidy before you launch.
Getting started
Duplicate Granitt, then work through these chapters in order. Most global changes are one edit.
Home, About, Services, Projects, News, Contact. Template pages: Style Guide, Instructions, Licenses, Changelog. Utility pages: 404 and Password.
Service, Project and Article detail pages are Astro templates fed by content collections — edit them once and every item updates.
Every page uses Body → page-wrapper → Navbar → main → sections → Footer. Sections use .section + .container with combo classes for variants (is-gray, is-dark, is-tight, is-flush-top).
Classes are flat and descriptive. Variations are combo classes prefixed with is- (e.g. button is-light). No IDs or inline styles are used for styling.
Variables
All design tokens are CSS variables in src/styles/template.css, named by role. Change a value and it updates everywhere.
Black, White, Ink (dark surface) and Accent. Footer Surface, Text Muted, Border Light and Border Dark cover the supporting tones.
Font Primary is Inter (body copy), Font Mono is IBM Plex Mono (labels and buttons), Font Display is Switzer (headings and display text). Font Serif and H1 Size–H4 Size live in the same collection.
Every size, line height, letter spacing and weight is a variable named by role: Label, Text, Lead, Heading, Title, Display and Hero sizes, Display Fluid, Line Height, Tracking Tight / Tracking Wide and Weight Regular / Medium / Semibold. Typography, Font and Section have breakpoint modes (Desktop, Tablet, Mobile Landscape, Mobile Portrait), so sizes switch automatically per breakpoint.
A variable collection with modes. Buttons switch mode for their style and hover state — edit a mode to restyle every button that uses it.
The Spacing collection holds the whole spacing scale (Micro, Small, Medium, Large and Section steps) with Desktop, Tablet, Mobile Landscape and Mobile Portrait modes, so margins and paddings shrink on smaller screens automatically. Section Padding X / Y set the section spacing and Container Large the content width. Radius Card and Button Radius set the corners; Glass Surface tints the glass elements.
Fonts & typography
Fonts are uploaded as custom fonts so the site loads no third-party font CSS.
Inter (400/500/600), IBM Plex Mono (400/500) and Switzer (400/500/600) are uploaded in public/assets/fonts. Inter and IBM Plex Mono use the SIL Open Font License 1.1; Switzer (Fontshare) uses the ITF Free Font License, free for personal and commercial use.
Upload the new font files, then change the matching Font variable (Font Primary, Font Mono or Font Display). All classes update automatically.
Use these classes for headings and text. See the Style Guide page for the full scale.
Collection bodies (Markdown) render inside the rich-text class; H2, H3, paragraphs, lists, quotes and images inside it are styled automatically.
Components
Global elements are Astro components in src/components/shared — edit one file and every page updates.
Logo, links, the Services count badge, the orange Get estimate CTA and the mobile menu button. The current page link uses the native Current state of the nav-link class.
Headline CTA, link columns (Pages, Services, Office, Template) and the gradient Granitt wordmark.
Dark estimate block with contact rows and the native estimate form.
Use the Button component for every arrow button. Set the label and link in the right panel and pick a variant.
CMS
Three collections power Services, Projects and News. Each has an SEO Description field for its meta description.
Lists are sorted by Number. Capabilities feed the “What’s included” cards on the service page.
Featured shows a project in the Projects hero card. Gallery is a multi-image field: the main image is the wide hero, gallery images 2–5 form the grid.
Lists are sorted by Published Date, newest first. Featured pins an article on the News page.
“Other services” and “Keep reading” exclude the page’s own item with this filter. “Next project” lists all projects; the footer script picks the next one (see Next project below).
Services, Projects and News each have an intro field (150–160 characters) that feeds the page meta description. Detail page titles use “[Name] - Granitt”.
The Next project list on the project page shows all projects. The footer script (G2 Next item) picks the project after the current one in the Projects list order and wraps from the last project to the first.
Filters
Projects and News filter by category without reloading the page.
Each filter chip has a data-filter attribute with the lowercase category name, or “all”.
Each list item has a data-category attribute bound to its category field.
The chip wrapper points to the list it filters. Counter: data-filter-count. Empty message: data-filter-empty.
Add the option to the Category field, then duplicate a chip and set its data-filter to the new lowercase name.
GSAP & motion
Animations use GSAP 3.15 with ScrollTrigger, installed from npm (src/scripts/gsap-globals.ts). Nothing loads from a CDN and the page scrolls natively. The template script lives in src/scripts/custom/ as blocks G1–G18 and is driven by data attributes, so you can reuse every effect on any element.
The const S block at the top of the footer script holds every timing: ease, speed (global multiplier), revealY (25px rise), reveal (0.6s), stagger (0.06s), blur (5px), parallax (8%), heroParallax (10%), marquee (40s) and counter (2s). Change a value there and every reveal, parallax and counter follows. With prefers-reduced-motion on, the page shows its final state.
The Head script hides the page until it is ready and always shows it within 3 s, even if the footer script fails. G1 reveals the page as soon as the footer script runs.
On a project page the Next project card shows the next project in the Projects list order and wraps from the last project to the first.
Hero title lines slide up from a mask, then supporting content fades in.
Every photo with the cover-image or hero-image class drifts inside its overflow-hidden frame while you scroll (the image is 120% tall). Set the default amount with parallax / heroParallax in the key variables, give one image its own amount with data-parallax="12", or switch it off with data-parallax="0".
The content below the Home hero rises from behind it with a blur.
G6 blur-fades titles marked data-reveal. G7 staggers cards, process steps, FAQ items and footer columns in automatically; add data-reveal-item to any other element to include it.
Counts from 0 to the value when the element enters the screen.
Fills comparison lines to their percentage.
Duplicates the logo track and loops it infinitely.
Accordion open/close with an animated plus icon.
The Granitt wordmark rises into place as the footer enters.
Project-type chips are radio buttons that show their selected state; data-field-line animates the input underline. Submission goes to the form's action; connect it to your form service.
Scrolls the page back to the top when clicked.
Opens and closes the mobile menu. Escape closes it.
Category filters on Projects and News, with data-filter-count for the result count and data-filter-empty for the empty message. See the Filters chapter.
Pinned About timeline: scroll picks the active milestone; nodes jump to their year.
Any link pointing to #copy-link copies the current page URL to the clipboard.
To remove one effect, delete its data attribute in the markup. To remove all motion, remove the template script (src/scripts/custom/) and the small hide-until-ready script in src/data/head/, then rebuild. Elements then appear instantly; content stays visible even if only the footer script is gone, because the Head script reveals the page after 3 s.
Forms
All forms are plain HTML forms; connect them to your form service.
Lives in the CTA Estimate component. Project-type chips are radio buttons; the underline animation uses data-field-line.
Email signup on the News page.
Point the form's action at your form service (Formspree, Netlify Forms or similar).
Edit the success and error messages in the form's w-form-done and w-form-fail blocks.
Images & SEO
Every image is a managed asset with alt text. Every page follows one title format and shares the template's Open Graph image.
Select an image and use Replace image. Keep the wrappers — they control crop, radius and parallax. Photos are compressed to WebP/AVIF under 150 KB; keep new ones under that too.
Edit inside each collection entry (src/content/).
Every page title follows “{Page} - Granitt”. Detail pages use “[Name] - Granitt” and take the meta description from the entry's intro (150–160 characters).
Every page shares the template's 1200×630 Open Graph image (Granitt-OG.jpg); swap it per page if you like.
Style guide & clean-up
Keep the project tidy before you launch.
Shows every color, type style, button and interaction state.
These combo classes are added by the script. They are applied on the Style Guide so Clean Up never deletes them.
Safe to run: unused classes are removed, script states stay.
Questions? Use the support link on the theme’s product page.