G1

Getting started

Duplicate Granitt, then work through these chapters in order. Most global changes are one edit.

Pages
Static

Home, About, Services, Projects, News, Contact. Template pages: Style Guide, Instructions, Licenses, Changelog. Utility pages: 404 and Password.

CMS templates
/services/…/projects/…/news/…

Service, Project and Article detail pages are Astro templates fed by content collections — edit them once and every item updates.

Structure
.page-wrappermain

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).

Naming
is-*

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.

G2

Variables

All design tokens are CSS variables in src/styles/template.css, named by role. Change a value and it updates everywhere.

Colors
BlackWhiteInkAccent

Black, White, Ink (dark surface) and Accent. Footer Surface, Text Muted, Border Light and Border Dark cover the supporting tones.

Font
Font PrimaryFont MonoFont Display

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.

Typography
Text XS–2XLHeading 2XS–3XLLine Height TightTracking Tight 5XS–5XLWeight Medium

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.

Button Theme
LightLight OutlineDark OutlineGlassOrange

A variable collection with modes. Buttons switch mode for their style and hover state — edit a mode to restyle every button that uses it.

Layout
Spacing XS–XLRadius Card

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.

G3

Fonts & typography

Fonts are uploaded as custom fonts so the site loads no third-party font CSS.

Custom fonts
public/assets/fonts

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.

Swap a font
Font variables

Upload the new font files, then change the matching Font variable (Font Primary, Font Mono or Font Display). All classes update automatically.

Type classes
.hero-title.page-title.heading-style-h1.heading-style-h2.heading-style-h3.heading-style-h4.paragraph.mono-label

Use these classes for headings and text. See the Style Guide page for the full scale.

Rich Text
.rich-text

Collection bodies (Markdown) render inside the rich-text class; H2, H3, paragraphs, lists, quotes and images inside it are styled automatically.

G4

Components

Global elements are Astro components in src/components/shared — edit one file and every page updates.

Navbar
Navbar

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.

Footer
Footer

Headline CTA, link columns (Pages, Services, Office, Template) and the gradient Granitt wordmark.

CTA Estimate
CTA Estimate

Dark estimate block with contact rows and the native estimate form.

Button
LabelLinkVariant: Dark / Light / Glass

Use the Button component for every arrow button. Set the label and link in the right panel and pick a variant.

G5

CMS

Three collections power Services, Projects and News. Each has an SEO Description field for its meta description.

Services
NumberCategoryShort DescriptionCapability 1–3Main ImageBody

Lists are sorted by Number. Capabilities feed the “What’s included” cards on the service page.

Projects
CategoryLocationYearArea Value + UnitStoreysDuration + UnitHandover + UnitGalleryFeatured

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.

News
CategoryPublished DateRead TimeExcerptAuthorAuthor ImageFeatured

Lists are sorted by Published Date, newest first. Featured pins an article on the News page.

Other items
Filter: Item is not Current

“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).

SEO
SEO Description

Services, Projects and News each have an intro field (150–160 characters) that feeds the page meta description. Detail page titles use “[Name] - Granitt”.

Next project
data-next-listScript block G2

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.

G6

Filters

Projects and News filter by category without reloading the page.

Buttons
data-filter="all"data-filter="civic"

Each filter chip has a data-filter attribute with the lowercase category name, or “all”.

Items
data-category

Each list item has a data-category attribute bound to its category field.

Group
data-filter-groupdata-filter-list

The chip wrapper points to the list it filters. Counter: data-filter-count. Empty message: data-filter-empty.

Add a category
CMS option + chip

Add the option to the Category field, then duplicate a chip and set its data-filter to the new lowercase name.

G7

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.

Script structure
KEY VARIABLES · const S

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.

G1 Page ready
Head script

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.

G2 Next item
data-next-listdata-currentdata-slug

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.

G3 Hero intro
data-hero-linedata-hero-fade

Hero title lines slide up from a mask, then supporting content fades in.

G4 Parallax
data-parallax="8"

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".

G5 Emerge
data-emerge

The content below the Home hero rises from behind it with a blur.

G6–G7 Reveal
data-revealdata-reveal-item

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.

G8 Counters
data-counter="98"

Counts from 0 to the value when the element enters the screen.

G9 Compare bars
data-comparedata-compare-filldata-value="61"

Fills comparison lines to their percentage.

G10 Logo marquee
data-marquee

Duplicates the logo track and loops it infinitely.

G11 FAQ
data-faqdata-faq-triggerdata-faq-answerdata-faq-plus

Accordion open/close with an animated plus icon.

G12 Footer wordmark
data-footerdata-footer-title

The Granitt wordmark rises into place as the footer enters.

G13 Form states
data-chipdata-field-line

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.

G14 Back to top
data-back-to-top

Scrolls the page back to the top when clicked.

G15 Mobile menu
data-menu-buttondata-nav-menu

Opens and closes the mobile menu. Escape closes it.

G16 CMS filters
data-filter-groupdata-filterdata-category

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.

G17 Pinned timeline
data-timelinedata-milestonedata-milestone-nodedata-milestone-image

Pinned About timeline: scroll picks the active milestone; nodes jump to their year.

G18 Copy link
#copy-link

Any link pointing to #copy-link copies the current page URL to the clipboard.

Remove motion
Footer + Head code

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.

G8

Forms

All forms are plain HTML forms; connect them to your form service.

Estimate form
Estimate Form

Lives in the CTA Estimate component. Project-type chips are radio buttons; the underline animation uses data-field-line.

Newsletter
Newsletter Form

Email signup on the News page.

Notifications
Form action

Point the form's action at your form service (Formspree, Netlify Forms or similar).

States
SuccessError

Edit the success and error messages in the form's w-form-done and w-form-fail blocks.

G9

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.

Static images
Assets panel

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.

CMS images
Main ImageGalleryAuthor Image

Edit inside each collection entry (src/content/).

SEO
Page settings

Every page title follows “{Page} - Granitt”. Detail pages use “[Name] - Granitt” and take the meta description from the entry's intro (150–160 characters).

Open Graph
Page settings → Open Graph

Every page shares the template's 1200×630 Open Graph image (Granitt-OG.jpg); swap it per page if you like.

G10

Style guide & clean-up

Keep the project tidy before you launch.

Style Guide
/style-guide

Shows every color, type style, button and interaction state.

Interaction states
is-activeis-openis-hiddenis-checkedis-done

These combo classes are added by the script. They are applied on the Style Guide so Clean Up never deletes them.

Clean up
Style Manager → Clean Up

Safe to run: unused classes are removed, script states stay.

Support
Flowmance

Questions? Use the support link on the theme’s product page.