showcase
- v0.2.4
- 37 commits
- 1 branch
- 6 tags
- updated
- CI 2/2
theme.md
5.0 KB · 94 lines
1# Theme23> Update: after the first real review, daum.dev keeps saturn's palettes and4> tokens but uses its own type and component system (Geist for text, boxes,5> sentence case). See "Polish pass" in `docs/decisions.md`. The rest of this6> page describes the original plan.78daum.dev should look like part of danieldaum.net (the `saturn` repo). Saturn9is the source of truth. This site copies its tokens and components and adds10only what a code browser needs on top.1112## What carries over from saturn1314- **Dark only.** `color-scheme: dark`, no light mode, no `prefers-color-scheme`15 switch.16- **Tokens** are copied as-is: `--background-dark`, `--surface`, `--borders`,17 `--text-headings`, `--text-body`, `--text-secondary`, `--accent`,18 `--accent-muted`, and the `--syn-*` syntax roles.19- **Palettes:** moss (default), ink, wine, plum, teal and flexoki, each under20 `[data-theme="…"]`. Saturn picks one per visit with `theme.js`. There's no21 JS here, so the build sets `data-theme` on `<html>` from config (see22 Palette choice below).23- **Fonts:** Geist Pixel Square for all text, and Geist Mono (regular and24 italic) for `pre code` only, because pixel type is proportional and code25 columns would drift. The woff2 files and OFL licence go in26 `web/static/fonts/`.27- **Base:** Josh Comeau reset, 78ch body width, the heading scale, text links28 underlined in `--accent-muted` that turn `--accent` on hover, and the focus29 ring, high-contrast and reduced-motion rules.30- **Chrome:** exactly danieldaum.net's (see decisions, "The chrome is31 danieldaum.net's"): the name links home, the nav is about/blog/projects/32 garden, the footer is `//` email git PGP changelog privacy feed theme. UI33 labels are lowercase like saturn's.34- **Favicon:** saturn's, in `web/static/favicon/`.3536## Saturn components → daum.dev pages3738| Saturn component | Used for |39| ------------------------------------- | ------------------------------------------------------ |40| `.page-header`, `.page-header--home` | profile hero (name in accent), repo header |41| `.meta`, `.meta-split`, `.meta-sep` | repo meta line, latest commit, file size and line count |42| `.pills` / `.pill` | topics, "archived", release tag, PR state |43| `.card-grid` / `.card` | repo list on the profile |44| `.section-label` | section headings: "repositories", "readme", "files" |45| `.breadcrumb` | `repo / dir / file` on tree and blob pages |46| `.table` / `.table-row` | file tree, pulls, packages |47| `.commit-log` (+ `-row`, `-hash`, `-msg`, `-date`) | latest commit box, the log page |48| `.version-list` / `.version-meta` | releases page |49| `.code-block` + `.code-label` | file viewer (label: path · size · lines), diff hunks |50| `.hl-*` classes | syntax highlighting (see below) |5152New for daum.dev, built from the same tokens:5354- **Tabs** (code · commits · releases · pulls · packages): styled like saturn's55 header nav, with `aria-current` shown in `--accent`.56- **Clone box:** a read-only input on `--surface` with a `--borders` border.57- **Heatmap:** `h0` uses `--surface`. `h1`–`h4` step from `--accent-muted` to58 `--accent` with `color-mix()`, so they follow the palette.59- **Language dots:** eight classes mapped to the `--syn-*` colours, so they60 follow the palette too.61- **Page width:** saturn's `78ch` body on every page, so the header and62 footer don't move between the two sites (see decisions, "The chrome is63 danieldaum.net's").64- **Line numbers:** links (`#L12`) in `--text-secondary`. The `:target` line65 is highlighted with `--surface` and an `--accent-muted` edge.6667## Syntax highlighting6869Saturn highlights at build time with Shiki and emits `hl-<role>` classes:70comment, keyword, function/link, builtin/escape, type/self/changed,71variable/heading/removed, constant, string/added and punct. Here chroma does72the tokenising, and a small Go formatter maps chroma token types to the same73`hl-*` roles. Saturn's CSS then applies unchanged, every palette's `--syn-*`74colours work, and there are no inline styles, so the CSP holds. Diffs use75`hl-added`, `hl-removed` and `hl-changed`. README code blocks go through the76same formatter.7778## Keeping in sync7980`web/static/style.css` holds two sections. The first is copied from saturn's81`global.css` (only the parts used) and marked with its source. The second is82daum.dev-only. When saturn's tokens or components change, re-copy the first83section and leave the second alone.8485## Palette choice8687Saturn's no-JS default is moss. Options here, all JS-free:88891. Moss everywhere (`"theme": "moss"` in config).902. Config sets a site default, and each repo may pick its own.913. Each repo gets a palette from a hash of its name.9293For now it's option 1: `"theme"` in config sets the palette for the whole94site (default `moss`). Options 2 and 3 can build on that later.