Themes and design
Design language
Section titled “Design language”The source of truth is the Modern set in web/src/index.css.
| Surface | Stylesheet |
|---|---|
| App | web/src/index.css |
| Hosting panel | admin/src/styles.css, which imports shared/design/foundation.css |
| Shackworks Net | src/styles/foundation.css (a synced copy) and site.css |
| Docs | src/styles/shackworks.css, which maps Starlight’s variables |
To change a token, edit index.css first. Then update shared/design/foundation.css, where server/design.test.ts fails on drift. Next run npm run sync-design in Net, and finally update the docs stylesheet.
- The design uses one accent, system blue. Surfaces step through
--bg,--bg-elevand--bg-elev-2.--good,--warnand--badmean status only. - Use tokens, not hex values, and no inline styles for appearance. The exceptions are data visualization, the log terminal and brand marks.
- Cards have 14px corners and hairline borders, with no shadows.
- Glass is for navigation only. The Reduce Transparency setting makes it solid.
- Motion is a short spring with a press scale of 0.96. Nothing is decorative or driven by scrolling, and everything is off under
prefers-reduced-motion. - Touch targets are 44px, the focus ring is visible, and the design meets WCAG 2.2 AA.
The sets are Modern and Classic, each in light, dark and Night-Ops. Night-Ops uses only black and red, and it collapses every status color to the accent, so color alone never carries meaning. All tokens are in shackworks-brandkit/app-design/tokens/.
Themes
Section titled “Themes”A theme is a .swtheme zip with CSS, fonts and images. The contract is theme API v1 in shared/theme-api.ts. When it changes, update the Theme reference. The stable surface is the variables on :root[data-theme-set='<id>'] and the data-sw hooks. Class names and page structure are deliberately unstable.
The content security policy is the second layer. server/lib/csp.ts implements it, and the csp setting selects off, report-only (the default) or enforce. Reports go to /api/csp-report. Verify the policy in a real browser before you enforce it.
An installed theme starts disabled. The administrator previews it, then makes it public or hidden. A hidden theme is unlocked by callsign search, and the unlock persists. The app stores the installed zip unserved, so it can go to Net byte for byte. --bg also selects the map tiles for the globe.
The example theme is scripts/example-theme/, built with npm run build:example-theme. Never commit a club’s theme to the repository, and never let a theme replace the product mark.
Brand kit
Section titled “Brand kit”The shackworks-brandkit repository has three folders. brand/ holds logos, favicons, the palette and the guide. app-design/ holds tokens, foundation.css, a specimen, app icons and a guide. tools/ regenerates the assets. The mark does not resemble any amateur radio organization’s mark, and its navy, signal blue and amber are not the UI’s colors.