Theme #
Update: after the first real review, daum.dev keeps saturn's palettes and tokens but uses its own type and component system (Geist for text, boxes, sentence case). See "Polish pass" in
docs/decisions.md. The rest of this page describes the original plan.
daum.dev should look like part of danieldaum.net (the saturn repo). Saturn
is the source of truth. This site copies its tokens and components and adds
only what a code browser needs on top.
What carries over from saturn #
- Dark only.
color-scheme: dark, no light mode, noprefers-color-schemeswitch. - Tokens are copied as-is:
--background-dark,--surface,--borders,--text-headings,--text-body,--text-secondary,--accent,--accent-muted, and the--syn-*syntax roles. - Palettes: moss (default), ink, wine, plum, teal and flexoki, each under
[data-theme="…"]. Saturn picks one per visit withtheme.js. There's no JS here, so the build setsdata-themeon<html>from config (see Palette choice below). - Fonts: Geist Pixel Square for all text, and Geist Mono (regular and
italic) for
pre codeonly, because pixel type is proportional and code columns would drift. The woff2 files and OFL licence go inweb/static/fonts/. - Base: Josh Comeau reset, 78ch body width, the heading scale, text links
underlined in
--accent-mutedthat turn--accenton hover, and the focus ring, high-contrast and reduced-motion rules. - Chrome: exactly danieldaum.net's (see decisions, "The chrome is
danieldaum.net's"): the name links home, the nav is about/blog/projects/
garden, the footer is
//email git PGP changelog privacy feed theme. UI labels are lowercase like saturn's. - Favicon: saturn's, in
web/static/favicon/.
Saturn components → daum.dev pages #
| Saturn component | Used for |
|---|---|
.page-header, .page-header--home |
profile hero (name in accent), repo header |
.meta, .meta-split, .meta-sep |
repo meta line, latest commit, file size and line count |
.pills / .pill |
topics, "archived", release tag, PR state |
.card-grid / .card |
repo list on the profile |
.section-label |
section headings: "repositories", "readme", "files" |
.breadcrumb |
repo / dir / file on tree and blob pages |
.table / .table-row |
file tree, pulls, packages |
.commit-log (+ -row, -hash, -msg, -date) |
latest commit box, the log page |
.version-list / .version-meta |
releases page |
.code-block + .code-label |
file viewer (label: path · size · lines), diff hunks |
.hl-* classes |
syntax highlighting (see below) |
New for daum.dev, built from the same tokens:
- Tabs (code · commits · releases · pulls · packages): styled like saturn's
header nav, with
aria-currentshown in--accent. - Clone box: a read-only input on
--surfacewith a--bordersborder. - Heatmap:
h0uses--surface.h1–h4step from--accent-mutedto--accentwithcolor-mix(), so they follow the palette. - Language dots: eight classes mapped to the
--syn-*colours, so they follow the palette too. - Page width: saturn's
78chbody on every page, so the header and footer don't move between the two sites (see decisions, "The chrome is danieldaum.net's"). - Line numbers: links (
#L12) in--text-secondary. The:targetline is highlighted with--surfaceand an--accent-mutededge.
Syntax highlighting #
Saturn highlights at build time with Shiki and emits hl-<role> classes:
comment, keyword, function/link, builtin/escape, type/self/changed,
variable/heading/removed, constant, string/added and punct. Here chroma does
the tokenising, and a small Go formatter maps chroma token types to the same
hl-* roles. Saturn's CSS then applies unchanged, every palette's --syn-*
colours work, and there are no inline styles, so the CSP holds. Diffs use
hl-added, hl-removed and hl-changed. README code blocks go through the
same formatter.
Keeping in sync #
web/static/style.css holds two sections. The first is copied from saturn's
global.css (only the parts used) and marked with its source. The second is
daum.dev-only. When saturn's tokens or components change, re-copy the first
section and leave the second alone.
Palette choice #
Saturn's no-JS default is moss. Options here, all JS-free:
- Moss everywhere (
"theme": "moss"in config). - Config sets a site default, and each repo may pick its own.
- Each repo gets a palette from a hash of its name.
For now it's option 1: "theme" in config sets the palette for the whole
site (default moss). Options 2 and 3 can build on that later.