Merge branch 'theme-calma' into main
Calma: Slides' own accent, Onest and the new icons Adopts estilo's Calma (estilo decisions-table row 8, pinned 5b2ce83). Reviewed by Claude Fable 5.1: request changes (committed .pyc, credits page test), fixed, approved.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
16 files changed,
+160
−167
.gitignore+1 −0go.mod+1 −1go.sum+2 −0internal/slides/app.go+3 −0internal/slides/credits/notices.json+11 −0internal/slides/credits_test.go+1 −1internal/slides/static/brand/apple-touch-icon.pngbinaryinternal/slides/static/brand/brand.css+2 −2internal/slides/static/brand/icon-32.pngbinaryinternal/slides/static/brand/icon.svg+1 −3internal/slides/static/theme.css+70 −158internal/slides/templates/layout.html+1 −0internal/slidestest/fontlink_test.go+24 −0internal/slidestest/vendored_test.go+21 −1scripts/credits.py+1 −1scripts/writetheme/main.go+21 −0
CI passed — run details
CI log
=== gate ===
=== rust: fmt
=== rust: clippy
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.11s
=== wasm: the artifact the host embeds
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.02s
Finished `release` profile [optimized] target(s) in 0.08s
core/target/wasm32-unknown-unknown/release/slides_core.wasm (1228229 bytes)
=== the embedded wasm must match a fresh build
=== rust: test
Finished `test` profile [unoptimized + debuginfo] target(s) in 0.04s
Running unittests src/lib.rs (core/target/debug/deps/slides_core-929bfceb2edd4a94)
running 30 tests
test layout::tests::body_region_rect_narrows_for_an_aside ... ok
test layout::tests::aside_region_rect ... ok
test layout::tests::media_region_rect ... ok
test layout::tests::heading_region_rect ... ok
test layout::tests::default_region_by_kind ... ok
test markdown::tests::empty_input_is_no_paragraphs_and_lines_keep_blanks ... ok
test markdown::tests::marks_nest_and_links_carry_marks ... ok
test markdown::tests::paragraphs_split_on_blank_lines_and_list_markers ... ok
test markdown::tests::inline_marks ... ok
test check::tests::the_empty_document_passes ... ok
test schema::tests::an_href_map_without_a_string_url_reads_as_no_link ... ok
test schema::tests::an_empty_map_reads_as_a_set_mark ... ok
test schema::tests::href_is_written_as_a_one_key_map_and_reads_back ... ok
test layout::tests::to_flow_is_a_no_op_when_already_in_order ... ok
test layout::tests::to_canvas_narrows_body_when_an_aside_is_present ... ok
test schema::tests::href_written_as_a_plain_string_still_reads_back ... ok
test layout::tests::to_canvas_splits_a_shared_region_equally_and_sets_z_by_index ... ok
test layout::tests::to_flow_classifies_by_position_and_kind ... ok
test layout::tests::to_flow_orders_y_then_x ... ok
test check::tests::bare_text_at_fragment_level_is_reported ... ok
test view::tests::malformed_background_is_the_default ... ok
test check::tests::a_non_paragraph_child_is_reported ... ok
test view::tests::assets_are_typed_or_skipped ... ok
test check::tests::y_prosemirror_shapes_pass ... ok
test view::tests::malformed_box_is_null_and_phone_keeps_only_typed_fields ... ok
test check::tests::what_the_ops_write_passes ... ok
test check::tests::an_element_inside_a_paragraph_is_reported ... ok
test view::tests::malformed_fonts_are_null ... ok
test check::tests::an_unknown_formatting_attribute_is_reported ... ok
test layout::tests::to_flow_keeps_a_concurrent_text_edit ... ok
test result: ok. 30 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running tests/no_host_imports.rs (core/target/debug/deps/no_host_imports-184c0d8bf00e14f9)
running 1 test
test no_host_imports ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running tests/ops.rs (core/target/debug/deps/ops-256addce27f366d1)
running 12 tests
test ops_are_atomic ... ok
test add_slide_then_view_lists_it ... ok
test add_block_with_markdown_produces_runs ... ok
test remove_block_drops_it_from_columns_children ... ok
test layout_switch_assigns_boxes ... ok
test columns_children_must_name_blocks_on_the_slide ... ok
test duplicate_slide_remaps_columns_children ... ok
test update_roundtrip ... ok
test columns_children_have_one_parent_and_no_cycles ... ok
test move_block_keeps_a_concurrent_text_edit ... ok
test move_slide_keeps_a_concurrent_text_edit ... ok
test remaining_ops_roundtrip ... ok
test result: ok. 12 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s
Doc-tests slides_core
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
=== rust: fmt (pdf)
=== rust: clippy (pdf)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.09s
=== wasm: the pdf artifact the host embeds
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.03s
Finished `release` profile [optimized] target(s) in 0.09s
core/pdf/target/wasm32-unknown-unknown/release/slides_pdf.wasm (5301002 bytes)
=== the embedded pdf wasm must match a fresh build
=== rust: test (pdf)
Finished `test` profile [unoptimized + debuginfo] target(s) in 0.05s
Running unittests src/lib.rs (core/pdf/target/debug/deps/slides_pdf-891fafaa44f9fd64)
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running tests/no_host_imports.rs (core/pdf/target/debug/deps/no_host_imports-17ccbb1d62120093)
running 1 test
test no_host_imports ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s
Running tests/render.rs (core/pdf/target/debug/deps/render-2e1d7e8b19d78595)
running 6 tests
test a_null_zero_length_pair_is_no_frames_not_a_dereference ... ok
test text_with_no_fonts_at_all_still_renders_the_shapes ... ok
test raster_image_is_embedded ... ok
test abi_frames_round_trip ... ok
test two_svgs_make_two_pages ... ok
test renders_text_as_embedded_glyphs ... ok
test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s
Doc-tests slides_pdf
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
=== fixtures: node dependencies
v24.19.0
11.17.0
=== fixtures: npm ci (needs the registry — see .amadan/README.md)
added 19 packages, and audited 20 packages in 518ms
5 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
npm warn allow-scripts 1 package has install scripts not yet covered by allowScripts:
npm warn allow-scripts esbuild@0.28.2 (postinstall: node install.js)
npm warn allow-scripts
npm warn allow-scripts Run `npm approve-scripts --allow-scripts-pending` to review, or `npm approve-scripts <pkg>` to allow.
=== fixtures: the JS side's own tests
✔ one finished upload is register_asset plus the block that uses it, in one batch (13.595323ms)
✔ a record missing its numbers still makes an op the core accepts (1.339818ms)
✔ unusedAssets is what no slide refers to, and remove_asset drops one (4.460315ms)
✔ the Unused images list reconciles by id and names each Remove button (1.158002ms)
✔ an upload refusal is said in words the person can act on (0.259342ms)
✔ clampBox keeps the box inside the frame and no smaller than the minimum (1.867309ms)
✔ fixBox writes four decimals (0.340673ms)
✔ guides are the thirds plus every other block edge (0.291682ms)
✔ snapMove pulls the nearest edge onto a guide within one per cent, and leaves a far one (0.491924ms)
✔ snapResize moves only the edges the handle drags (0.307521ms)
✔ moveBox and resizeBox by handle (0.321968ms)
✔ nudge: arrows move by half a per cent, Shift by two, Alt resizes (0.270322ms)
✔ rectBox reads a block rectangle against its frame (0.210281ms)
✔ typing into a block is a text change on its slide only (7.587273ms)
✔ a block's props changing is structure on its slide (1.32991ms)
✔ adding, moving or removing a block is structure on its slide (1.630538ms)
✔ the notes are text on their slide (1.008573ms)
✔ a slide added, removed or moved is an order change (1.493635ms)
✔ one transaction touching several things reports each once (0.729726ms)
✔ what the ops write passes, and so does an empty document (10.297337ms)
✔ the shapes y-prosemirror and older documents write pass (1.652049ms)
✔ an unknown formatting attribute is reported with the core's message (1.664692ms)
✔ an element inside a paragraph, a non-paragraph child and bare text are reported (2.771307ms)
✔ the unknownmark poison shape is what the check refuses (1.897384ms)
✔ y-prosemirror 1.3.7 deletes the words under an unknown mark; sanitising first keeps them (4.415602ms)
✔ the vocabulary is the five marks and nothing else (0.169124ms)
✔ a reload reuses the id this tab stored for the deck (1.117786ms)
✔ two tabs, and two decks in one tab, get different ids (0.233223ms)
✔ a stored value that is not an id, or storage that throws, gives a fresh id (0.418627ms)
✔ a duplicated tab gives up the copied id; the original keeps it (8.218586ms)
✔ a reload finds no rival and keeps its id (2.994723ms)
✔ presence switches id: beats carry the new one and the old one is somebody else (2.271599ms)
✔ an empty body is no frames (1.395532ms)
✔ frames come back in order with their exact bytes (0.374436ms)
✔ a length prefix is big-endian (0.202566ms)
✔ a truncated frame throws rather than returning a short update (2.495454ms)
✔ deck controls are set_meta (15.129382ms)
✔ slide controls are set_slide, and background keeps its colour (4.561833ms)
✔ move up and down are move_slide with the right after (2.812183ms)
✔ block props: value kinds, region, a shape label (6.609477ms)
✔ box fields are set_block on the desktop and set_phone in the phone view (4.999325ms)
✔ move block and the layer buttons (1.541183ms)
✔ add block: region after the selection on flow, a default box on canvas, a heading level that fits (6.715724ms)
✔ a block is named by its type and its first words (1.063816ms)
✔ blockChange: a control element to its op (1.15192ms)
✔ the Blocks list reconciles by id and keeps its buttons (0.89948ms)
✔ open resolves to the button that closed it and the trimmed field (1.731676ms)
✔ a second open while the dialog is up joins the first (0.2206ms)
✔ a missing dialog mounts as nothing (0.151241ms)
✔ a tab advances its own cursor only when its POST is the very next row (3.059392ms)
✔ the cursor never moves backwards when a response is overtaken by this tab's own write (0.551424ms)
✔ a later response still carries the cursor forward (0.273298ms)
✔ a burst of notifications collapses into one fetch at a time (0.223636ms)
✔ an event naming a seq the tab already has fetches nothing (0.20448ms)
✔ a stopped subscriber drops a response that arrives late (0.4628ms)
✔ stop closes the stream, and start opens exactly one (0.311288ms)
✔ a hidden tab closes its stream on a shortened deadline, and activity reopens it (0.862262ms)
✔ switching away and back inside the grace never drops the stream, so nothing has to be caught up (0.593182ms)
✔ a visible tab that is only being READ closes when idle and comes back on any activity (0.987544ms)
✔ activity while streaming defers the idle close rather than reopening anything (0.241829ms)
✔ a stream failure is never reported as a save failure, and heals on activity (0.216442ms)
✔ an empty response advances the cursor without applying anything (0.300678ms)
✔ a failed fetch leaves the cursor alone so the next notification retries it (0.61924ms)
✔ a decode failure retries once through the raw log, then gives up (1.450403ms)
✔ updatesURL spells the query string exactly, in particular raw as the literal raw=1 (0.173111ms)
✔ empty_doc_views_as_defaults (8.473047ms)
✔ set_meta (3.159409ms)
✔ slides: add, move, remove, set_slide, set_notes (7.456099ms)
✔ duplicate_slide (5.377538ms)
✔ blocks: add, move, remove, set_block (3.639591ms)
✔ set_phone (1.363483ms)
✔ table cells follow rows and cols (1.627312ms)
✔ canvas blocks: box defaults from the region, z from the index (0.885094ms)
✔ assets: register and remove (0.770781ms)
✔ markdown: every mark, code blocks are plain lines (1.649925ms)
✔ batch_is_atomic (5.421881ms)
✔ a batch applies in one transaction with the given origin (0.771272ms)
✔ columns_children_validated (1.69579ms)
✔ layout_switch_round_trip (2.15875ms)
✔ view_matches_snapshot_fixtures (17.435046ms)
✔ columns children have one parent and no cycles (codex 7) (1.315353ms)
✔ canvas-to-flow keeps a concurrent text edit (codex 4) (2.958025ms)
✔ move_block keeps a concurrent text edit, and later inserts land where after says (codex 4) (2.568551ms)
✔ move_slide keeps a concurrent text edit, and later inserts land where after says (codex 4 at slide level) (2.132692ms)
✔ format: {name} and {n} interpolate; an unknown key is left as text (0.96379ms)
✔ a beat on connect, then one every twenty seconds (2.179528ms)
✔ a move posts once, 200ms after the last of a burst, and re-arms the beat (0.321247ms)
✔ a hidden tab stops beating; coming back posts at once (0.43648ms)
✔ applySet leaves this tab out and answers what changed (0.883561ms)
✔ a set with rubbish in it is read for what it does carry (0.266185ms)
✔ initials, and a client id per tab (3.8761ms)
✔ a resync that fails is retried with backoff until it succeeds, without ever running twice at once (6.020764ms)
✔ the browser's online event retries immediately, not just on the next backoff tick (0.342987ms)
✔ reportDivergence before any failure runs the first attempt without a caller ever calling online (1.159935ms)
✔ a permanent 4xx drops its batch instead of retrying it, and does not poison the next edit (83.678368ms)
✔ a network failure or a 5xx is retried, not dropped (59.706713ms)
✔ a 500 is retried the same way a network failure is, never dropped (59.96339ms)
✔ the core-written structure reads as ProseMirror marks (11.125064ms)
✔ a y-prosemirror round trip preserves bold and the link (3.359451ms)
✔ y-prosemirror writes href as the one-key map and marks as {} (1.816875ms)
✔ a plain-string href, written before the map shape, still reads (0.905933ms)
✔ textFragment writes the same shape as writeText (0.533591ms)
✔ safeHref is the server allowlist, and a disallowed href never draws an anchor (0.347085ms)
✔ parseHash splits the slide and the block, and survives a stray % (5.993493ms)
✔ destroy takes the listeners off, and a second mount leaves one of each (0.819352ms)
✔ formatHash is the inverse (5.1517ms)
✔ textBlocks finds the text-bearing blocks and skips the rest (1.272744ms)
✔ mountTarget is the element whose children are the paragraphs (0.172601ms)
✔ paragraphTag keeps the renderer's own markup per type (0.126034ms)
✔ blockFragment finds a block's text by slide and block id (5.181646ms)
✔ notesFragment finds the slide's notes (0.7378ms)
✔ blockIDs and slideIDs are the orders on the stage and the strip (0.6892ms)
✔ cellFragments are a table's cells, row-major (0.954352ms)
✔ a load that fails leaves the stage on the slide it was showing and says so (1.042506ms)
✔ slideAfter is the slide to show once one is gone (0.190865ms)
✔ the queue words map to savestatus states, failed staying failed (0.95271ms)
✔ a dropped batch outranks the queue, for the rest of the session (0.181637ms)
✔ the editor status: the save line and the load error are two lines (0.318411ms)
✔ mountSaveStatus loads estilo's module and mounts it on the line (1.028921ms)
✔ a save-status module that will not load says so and refuses to mount (0.706703ms)
✔ dropTarget: before puts it ahead of the item, after behind it, null means first (1.379683ms)
✔ a drop that leaves the order as it is is no move (0.206123ms)
✔ dropOp is the move_slide (0.879494ms)
✔ labelFor is the slide's first heading, else the numbered fallback (5.999565ms)
✔ flush re-points every dirty thumbnail and relabels it (1.936326ms)
✔ destroy takes the item-menu listener off; a second mount leaves one (0.328941ms)
✔ plan says what to add, drop and where each item goes (1.391975ms)
✔ sync moves only the items out of place and keeps focus (1.320002ms)
✔ desktop view: box and size are the block; hidden and order are always the phone map (1.713713ms)
✔ phone view: everything goes to set_phone, carrying the rest of the map (0.515448ms)
✔ the ops it makes are ones the document takes (12.475252ms)
✔ phoneMap reads only the four keys, and only well-typed (0.224688ms)
✔ the stored view is read defensively (0.347656ms)
✔ linkAt reads the link under the cursor and nothing elsewhere (2.231945ms)
✔ setLink marks the selection (1.690109ms)
✔ setLink on a collapsed cursor inside a link replaces that link (0.514165ms)
✔ setLink with nothing selected and no link does nothing (0.196385ms)
✔ removeLink clears the link under the cursor (0.326887ms)
✔ the keymap binds every documented shortcut (0.186677ms)
✔ Mod-b toggles bold through the keymap (0.499017ms)
✔ setLink refuses an address outside the allowlist and writes nothing (0.423908ms)
✔ the state machine runs choose → sign → put → register → op (6.207671ms)
✔ a file the deck will not take never reaches the network (0.653794ms)
✔ alt text is required before the bytes move, unless the image is decorative (0.272726ms)
✔ a step that fails stops the ones after it and reports its own code (0.561122ms)
✔ a failure that is not ours still becomes an UploadError (0.281483ms)
✔ a second pick while one is in flight is refused, not raced (0.417445ms)
✔ an unreadable size is zero rather than a failure (0.330183ms)
✔ a per-call applyOp wins, so an upload lands on the block it was chosen for (0.24202ms)
✔ checkFile takes exactly the four types (0.383442ms)
✔ sha256Hex is the hex digest of the bytes (9.437109ms)
✔ refusal reads this app's JSON error shape, and survives one that is not (0.303264ms)
✔ malformed fonts are null (2.591042ms)
✔ a malformed background is the theme default (1.27066ms)
✔ a malformed box is null (0.577563ms)
✔ the phone layer keeps only its typed fields, order as a whole number (0.466186ms)
✔ assets are typed or skipped (1.094464ms)
✔ every poison update is deterministic bytes that apply to any deck (5.521114ms)
ℹ tests 158
ℹ suites 0
ℹ pass 158
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 292.407044
=== the vectors must match a fresh generation
canvas: 22 ops, 3715 bytes
columns: 23 ops, 3134 bytes
every-block: 36 ops, 3180 bytes
table: 14 ops, 1509 bytes
title-only: 6 ops, 1136 bytes
=== the editor bundle must match a fresh build
wrote internal/slides/static/editor.0463180baf5aab9f.js (376416 bytes)
=== go: vet, gofmt, test, migration check
go vet ./...
go test ./...
? amadan.net/oficina/slides/cmd/slides [no test files]
ok amadan.net/oficina/slides/internal/slides 12.382s
ok amadan.net/oficina/slides/internal/slides/core 2.749s
ok amadan.net/oficina/slides/internal/slides/deck (cached)
ok amadan.net/oficina/slides/internal/slides/fonts (cached)
? amadan.net/oficina/slides/internal/slides/icons [no test files]
ok amadan.net/oficina/slides/internal/slides/layout (cached)
ok amadan.net/oficina/slides/internal/slides/live (cached)
ok amadan.net/oficina/slides/internal/slides/pdfcore (cached)
ok amadan.net/oficina/slides/internal/slides/present (cached)
ok amadan.net/oficina/slides/internal/slides/render (cached)
ok amadan.net/oficina/slides/internal/slides/svg (cached)
ok amadan.net/oficina/slides/internal/slidestest 36.788s
? amadan.net/oficina/slides/scripts/writetheme [no test files]
go run amadan.net/rastrillo/rastrillo/cmd/rastrillo migration check
rastrillo migration check: models and migrations agree
python3 scripts/credits.py --check
credits: checked
gate: ok
diff --git a/.gitignore b/.gitignore| index 929b033..85b5934 100644 |
| --- a/.gitignore |
| +++ b/.gitignore |
| @@ -17,3 +17,4 @@ |
| /.superpowers/ |
| /.bash_profile |
| /.bashrc |
| +__pycache__/ |
diff --git a/go.mod b/go.mod| index 4def82b..4e5fcf2 100644 |
| --- a/go.mod |
| +++ b/go.mod |
| @@ -5,7 +5,7 @@ go 1.25.0 |
| toolchain go1.26.5 |
| require ( |
| - amadan.net/oficina/estilo.git v0.0.0-20260924071126-894afdcb71a9 |
| + amadan.net/oficina/estilo.git v0.0.0-20260929070530-5b2ce835e773 |
| amadan.net/oficina/home/connect v0.0.0-20260923190447-01166fcfc0a9 |
| amadan.net/oficina/home/handoff v0.0.0-20260908102137-481d2d57f489 |
| amadan.net/rastrillo/rastrillo v0.26.1-0.20260908075707-29e4491631bd |
diff --git a/go.sum b/go.sum| index b214e74..7f17677 100644 |
| --- a/go.sum |
| +++ b/go.sum |
| @@ -1,5 +1,7 @@ |
| amadan.net/oficina/estilo.git v0.0.0-20260924071126-894afdcb71a9 h1:vHOkWeJ7mRwLjPbMihf0f7aqz4CLSe0/NseQsHcJUYQ= |
| amadan.net/oficina/estilo.git v0.0.0-20260924071126-894afdcb71a9/go.mod h1:4u0jNBtIdMLOsJyrScfqoEuYDJF7BBM3qM9YWbzt6aw= |
| +amadan.net/oficina/estilo.git v0.0.0-20260929070530-5b2ce835e773 h1:9DIAhG3TaGG+LE2+8LvU73ZEhfK+oNn2y2p4kFjAAi0= |
| +amadan.net/oficina/estilo.git v0.0.0-20260929070530-5b2ce835e773/go.mod h1:4u0jNBtIdMLOsJyrScfqoEuYDJF7BBM3qM9YWbzt6aw= |
| amadan.net/oficina/home/connect v0.0.0-20260923190447-01166fcfc0a9 h1:K/PaOVdQqRMwifPD6ipiwLeGR5nbFSxm9FxjrDJlZcg= |
| amadan.net/oficina/home/connect v0.0.0-20260923190447-01166fcfc0a9/go.mod h1:YroavXe43Wietec+po8mtSk4a9Bir2h31Q3iAf4MWxI= |
| amadan.net/oficina/home/handoff v0.0.0-20260908102137-481d2d57f489 h1:RPKtyry/71i06o8L+gjAaUyexbmG56kO1YPs601URAM= |
diff --git a/internal/slides/app.go b/internal/slides/app.go| index 5fda220..3d618ab 100644 |
| --- a/internal/slides/app.go |
| +++ b/internal/slides/app.go |
| @@ -7,6 +7,7 @@ import ( |
| "amadan.net/oficina/estilo.git/brand" |
| "amadan.net/oficina/estilo.git/chrome" |
| + "amadan.net/oficina/estilo.git/theme" |
| "amadan.net/oficina/home/connect" |
| "amadan.net/oficina/home/handoff" |
| "amadan.net/oficina/slides/internal/slides/core" |
| @@ -230,6 +231,8 @@ func New(d *db.DB, cfg Config) (*http.ServeMux, *app, error) { |
| // The suite's app icons (the bar's brand, the switcher's tiles), |
| // served from estilo rather than vendored. |
| mux.Handle("GET "+brand.Prefix, brand.Handler()) |
| + // Onest, Calma's typeface, served by estilo under its versioned prefix. |
| + mux.Handle("GET "+theme.FontPrefix, theme.FontHandler()) |
| mux.Handle("GET /static/", assets.Handler()) |
| // The drive surface (api.go, spec §7), mounted HERE rather than in |
| // the chi router above, and this is the one deliberate exception in |
diff --git a/internal/slides/credits/notices.json b/internal/slides/credits/notices.json| index ae11c96..c50457d 100644 |
| --- a/internal/slides/credits/notices.json |
| +++ b/internal/slides/credits/notices.json |
| @@ -32,6 +32,17 @@ |
| } |
| ] |
| }, |
| + { |
| + "Name": "Onest", |
| + "Version": "Google Fonts v11", |
| + "SourceURL": "https://github.com/googlefonts/onest", |
| + "Notices": [ |
| + { |
| + "Name": "OFL.txt", |
| + "Text": "Copyright 2021 The Onest Project Authors (https://github.com/googlefonts/onest)\n\nThis Font Software is licensed under the SIL Open Font License, Version 1.1.\nThis license is copied below, and is also available with a FAQ at:\nhttps://scripts.sil.org/OFL\n\n\n-----------------------------------------------------------\nSIL OPEN FONT LICENSE Version 1.1 - 26 February 2007\n-----------------------------------------------------------\n\nPREAMBLE\nThe goals of the Open Font License (OFL) are to stimulate worldwide\ndevelopment of collaborative font projects, to support the font creation\nefforts of academic and linguistic communities, and to provide a free and\nopen framework in which fonts may be shared and improved in partnership\nwith others.\n\nThe OFL allows the licensed fonts to be used, studied, modified and\nredistributed freely as long as they are not sold by themselves. The\nfonts, including any derivative works, can be bundled, embedded, \nredistributed and/or sold with any software provided that any reserved\nnames are not used by derivative works. The fonts and derivatives,\nhowever, cannot be released under any other type of license. The\nrequirement for fonts to remain under this license does not apply\nto any document created using the fonts or their derivatives.\n\nDEFINITIONS\n\"Font Software\" refers to the set of files released by the Copyright\nHolder(s) under this license and clearly marked as such. This may\ninclude source files, build scripts and documentation.\n\n\"Reserved Font Name\" refers to any names specified as such after the\ncopyright statement(s).\n\n\"Original Version\" refers to the collection of Font Software components as\ndistributed by the Copyright Holder(s).\n\n\"Modified Version\" refers to any derivative made by adding to, deleting,\nor substituting -- in part or in whole -- any of the components of the\nOriginal Version, by changing formats or by porting the Font Software to a\nnew environment.\n\n\"Author\" refers to any designer, engineer, programmer, technical\nwriter or other person who contributed to the Font Software.\n\nPERMISSION & CONDITIONS\nPermission is hereby granted, free of charge, to any person obtaining\na copy of the Font Software, to use, study, copy, merge, embed, modify,\nredistribute, and sell modified and unmodified copies of the Font\nSoftware, subject to the following conditions:\n\n1) Neither the Font Software nor any of its individual components,\nin Original or Modified Versions, may be sold by itself.\n\n2) Original or Modified Versions of the Font Software may be bundled,\nredistributed and/or sold with any software, provided that each copy\ncontains the above copyright notice and this license. These can be\nincluded either as stand-alone text files, human-readable headers or\nin the appropriate machine-readable metadata fields within text or\nbinary files as long as those fields can be easily viewed by the user.\n\n3) No Modified Version of the Font Software may use the Reserved Font\nName(s) unless explicit written permission is granted by the corresponding\nCopyright Holder. This restriction only applies to the primary font name as\npresented to the users.\n\n4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font\nSoftware shall not be used to promote, endorse or advertise any\nModified Version, except to acknowledge the contribution(s) of the\nCopyright Holder(s) and the Author(s) or with their explicit written\npermission.\n\n5) The Font Software, modified or unmodified, in part or in whole,\nmust be distributed entirely under this license, and must not be\ndistributed under any other license. The requirement for fonts to\nremain under this license does not apply to any document created\nusing the Font Software.\n\nTERMINATION\nThis license becomes null and void if any of the above conditions are\nnot met.\n\nDISCLAIMER\nTHE FONT SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT\nOF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE\nCOPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nINCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL\nDAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM\nOTHER DEALINGS IN THE FONT SOFTWARE.\n" |
| + } |
| + ] |
| + }, |
| { |
| "Name": "Rust standard library", |
| "Version": "1.98.0", |
diff --git a/internal/slides/credits_test.go b/internal/slides/credits_test.go| index 5ab9012..cd9623c 100644 |
| --- a/internal/slides/credits_test.go |
| +++ b/internal/slides/credits_test.go |
| @@ -27,7 +27,7 @@ func TestCreditsPublicRouteAndLockedNotices(t *testing.T) { |
| if response.Header().Get("Cache-Control") != "no-store" || response.Header().Get("Referrer-Policy") != "strict-origin" { |
| t.Fatal("credits must preserve the origin for the chained Home sign-out") |
| } |
| - for _, want := range []string{"Open source", "Lucide and Feather", "krilla", "yjs", "Liberation Fonts", "Rust standard library", "No notice file is included in this release.", "/static/credits.css"} { |
| + for _, want := range []string{"Open source", "Lucide and Feather", "Onest", "krilla", "yjs", "Liberation Fonts", "Rust standard library", "No notice file is included in this release.", "/static/credits.css"} { |
| if !strings.Contains(response.Body.String(), want) { |
| t.Fatal("missing attribution", want) |
| } |
diff --git a/internal/slides/static/brand/apple-touch-icon.png b/internal/slides/static/brand/apple-touch-icon.png| index eed92dd..cd9c8a5 100644 |
| Binary files a/internal/slides/static/brand/apple-touch-icon.png and b/internal/slides/static/brand/apple-touch-icon.png differ |
diff --git a/internal/slides/static/brand/brand.css b/internal/slides/static/brand/brand.css| index 2e194c6..27e25ad 100644 |
| --- a/internal/slides/static/brand/brand.css |
| +++ b/internal/slides/static/brand/brand.css |
| @@ -1,4 +1,5 @@ |
| -/* Oficina brand artwork. Source: oficina/estilo brand/. */ |
| +/* Oficina brand artwork. Source: oficina/estilo brand/. The icons carry |
| + their own squircle and transparent corners, so nothing here rounds them. */ |
| [estilo-brand] { |
| display: inline-flex; |
| align-items: center; |
| @@ -10,7 +11,6 @@ |
| flex-shrink: 0; |
| inline-size: 1.75rem; |
| block-size: 1.75rem; |
| - border-radius: 21%; |
| vertical-align: middle; |
| } |
| [estilo-brand-icon="listing"] { |
diff --git a/internal/slides/static/brand/icon-32.png b/internal/slides/static/brand/icon-32.png| index 58f126e..54fffd8 100644 |
| Binary files a/internal/slides/static/brand/icon-32.png and b/internal/slides/static/brand/icon-32.png differ |
diff --git a/internal/slides/static/brand/icon.svg b/internal/slides/static/brand/icon.svg| index ea6ead1..0fb0f9e 100644 |
| --- a/internal/slides/static/brand/icon.svg |
| +++ b/internal/slides/static/brand/icon.svg |
| @@ -1,3 +1 @@ |
| -<svg xmlns="http://www.w3.org/2000/svg" width="1024" height="1024" viewBox="0 0 1024 1024" role="img" aria-label="Slides"><title>Slides</title><rect x="0" y="0" width="1024" height="1024" rx="0" fill="#C45B16"/><g transform="translate(153.6 153.6) scale(29.866666666666664)" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2 3h20" /> |
| - <path d="M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3" /> |
| - <path d="m7 21 5-5 5 5" /></g></svg> |
| +<svg xmlns="http://www.w3.org/2000/svg" width="1024" height="1024" viewBox="0 0 100 100" role="img" aria-label="Slides"><title>Slides</title><defs><clipPath id="s"><path d="M96.00 50.00L95.97 64.13L95.90 68.64L95.77 71.90L95.60 74.54L95.37 76.79L95.09 78.76L94.75 80.51L94.37 82.10L93.92 83.54L93.43 84.86L92.87 86.07L92.26 87.19L91.59 88.22L90.85 89.17L90.05 90.05L89.17 90.85L88.22 91.59L87.19 92.26L86.07 92.87L84.86 93.43L83.54 93.92L82.10 94.37L80.51 94.75L78.76 95.09L76.79 95.37L74.54 95.60L71.90 95.77L68.64 95.90L64.13 95.97L50.00 96.00L35.87 95.97L31.36 95.90L28.10 95.77L25.46 95.60L23.21 95.37L21.24 95.09L19.49 94.75L17.90 94.37L16.46 93.92L15.14 93.43L13.93 92.87L12.81 92.26L11.78 91.59L10.83 90.85L9.95 90.05L9.15 89.17L8.41 88.22L7.74 87.19L7.13 86.07L6.57 84.86L6.08 83.54L5.63 82.10L5.25 80.51L4.91 78.76L4.63 76.79L4.40 74.54L4.23 71.90L4.10 68.64L4.03 64.13L4.00 50.00L4.03 35.87L4.10 31.36L4.23 28.10L4.40 25.46L4.63 23.21L4.91 21.24L5.25 19.49L5.63 17.90L6.08 16.46L6.57 15.14L7.13 13.93L7.74 12.81L8.41 11.78L9.15 10.83L9.95 9.95L10.83 9.15L11.78 8.41L12.81 7.74L13.93 7.13L15.14 6.57L16.46 6.08L17.90 5.63L19.49 5.25L21.24 4.91L23.21 4.63L25.46 4.40L28.10 4.23L31.36 4.10L35.87 4.03L50.00 4.00L64.13 4.03L68.64 4.10L71.90 4.23L74.54 4.40L76.79 4.63L78.76 4.91L80.51 5.25L82.10 5.63L83.54 6.08L84.86 6.57L86.07 7.13L87.19 7.74L88.22 8.41L89.17 9.15L90.05 9.95L90.85 10.83L91.59 11.78L92.26 12.81L92.87 13.93L93.43 15.14L93.92 16.46L94.37 17.90L94.75 19.49L95.09 21.24L95.37 23.21L95.60 25.46L95.77 28.10L95.90 31.36L95.97 35.87Z"/></clipPath><linearGradient id="g" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#cb7227"/><stop offset="1" stop-color="#af5b03"/></linearGradient><filter id="h" x="-40%" y="-60%" width="180%" height="220%"><feGaussianBlur stdDeviation="5.5"/></filter></defs><g clip-path="url(#s)"><rect width="100" height="100" fill="url(#g)"/><g filter="url(#h)" opacity=".7"><rect x="4.00" y="39.2" width="0.73" height="16.7" fill="#fec6a5"/><rect x="5.60" y="37.1" width="1.25" height="18.3" fill="#f7b989"/><rect x="6.80" y="30.5" width="1.06" height="24.4" fill="#ffdec9"/><rect x="8.83" y="32.0" width="0.92" height="22.1" fill="#ffc79d"/><rect x="11.05" y="41.9" width="0.89" height="11.0" fill="#f8ab76"/><rect x="13.29" y="29.6" width="1.15" height="22.0" fill="#ffbf99"/><rect x="15.03" y="19.4" width="0.94" height="31.1" fill="#ffd0ad"/><rect x="17.27" y="26.9" width="0.90" height="22.1" fill="#ffd3b5"/><rect x="18.95" y="25.7" width="1.18" height="22.2" fill="#eab18a"/><rect x="20.22" y="16.6" width="0.87" height="30.4" fill="#fbb991"/><rect x="21.63" y="9.9" width="0.62" height="36.2" fill="#f9b178"/><rect x="23.67" y="20.5" width="1.29" height="24.3" fill="#f0bd9b"/><rect x="25.21" y="29.2" width="0.84" height="14.7" fill="#f1b585"/><rect x="26.54" y="26.1" width="1.05" height="17.1" fill="#ffbf91"/><rect x="28.30" y="17.1" width="0.82" height="25.3" fill="#fcc9a0"/><rect x="29.70" y="19.5" width="0.66" height="22.3" fill="#fecbad"/><rect x="31.22" y="28.8" width="0.92" height="12.5" fill="#f6b683"/><rect x="33.20" y="26.3" width="1.01" height="14.4" fill="#ffd1ad"/><rect x="34.55" y="14.8" width="0.89" height="25.8" fill="#ffbe99"/><rect x="35.70" y="8.4" width="1.30" height="32.0" fill="#fac5a7"/><rect x="36.97" y="10.7" width="0.93" height="29.7" fill="#ebb992"/><rect x="38.68" y="19.2" width="1.30" height="21.2" fill="#feb885"/><rect x="40.93" y="12.1" width="0.90" height="28.6" fill="#ffd5b4"/><rect x="42.26" y="5.8" width="1.22" height="35.2" fill="#ffd6bc"/><rect x="43.84" y="11.6" width="1.20" height="29.8" fill="#fedbc5"/><rect x="45.18" y="23.4" width="1.14" height="18.3" fill="#ffd7b9"/><rect x="47.02" y="28.3" width="0.89" height="14.0" fill="#fed1af"/><rect x="48.51" y="20.9" width="1.05" height="21.9" fill="#fecfab"/><rect x="49.83" y="18.2" width="1.07" height="25.0" fill="#ffdbc8"/><rect x="51.43" y="26.3" width="1.19" height="17.4" fill="#fed4b4"/><rect x="52.56" y="32.5" width="1.19" height="11.6" fill="#fed3b6"/><rect x="54.77" y="24.0" width="0.85" height="20.7" fill="#eab58f"/><rect x="56.66" y="11.9" width="1.29" height="33.2" fill="#f1ba9a"/><rect x="58.31" y="16.9" width="0.88" height="28.5" fill="#edb181"/><rect x="59.64" y="23.9" width="1.08" height="21.7" fill="#fdc69b"/><rect x="61.20" y="21.7" width="1.20" height="24.1" fill="#fecfae"/><rect x="62.30" y="14.9" width="0.78" height="30.9" fill="#fecea7"/><rect x="63.94" y="12.2" width="0.84" height="33.6" fill="#ffccac"/><rect x="65.73" y="25.5" width="0.75" height="20.3" fill="#f6bb8b"/><rect x="66.97" y="33.2" width="1.16" height="12.5" fill="#fec092"/><rect x="68.57" y="29.7" width="0.96" height="15.9" fill="#efba9b"/><rect x="69.87" y="22.2" width="0.76" height="23.4" fill="#fec396"/><rect x="71.46" y="22.3" width="1.03" height="23.1" fill="#ecbc95"/><rect x="73.22" y="31.9" width="0.84" height="13.3" fill="#f7ae7e"/><rect x="75.52" y="24.9" width="0.64" height="20.2" fill="#fee1ce"/><rect x="77.03" y="12.7" width="0.91" height="32.3" fill="#efbf9e"/><rect x="78.56" y="12.1" width="0.97" height="32.9" fill="#ffb183"/><rect x="80.59" y="23.3" width="1.30" height="21.8" fill="#fedfca"/><rect x="82.37" y="20.5" width="1.19" height="24.9" fill="#e5b692"/><rect x="83.58" y="13.9" width="0.64" height="31.8" fill="#f9b483"/><rect x="85.45" y="16.7" width="0.72" height="29.5" fill="#ffd2b5"/><rect x="87.10" y="31.1" width="1.17" height="15.6" fill="#febf8e"/><rect x="88.80" y="35.6" width="1.13" height="11.8" fill="#e9b190"/><rect x="90.54" y="26.5" width="1.28" height="21.8" fill="#fdbd8b"/><rect x="92.52" y="26.4" width="0.79" height="23.0" fill="#feceab"/><rect x="94.33" y="36.8" width="1.20" height="13.8" fill="#f7b182"/></g></g><path d="M96.00 50.00L95.97 64.13L95.90 68.64L95.77 71.90L95.60 74.54L95.37 76.79L95.09 78.76L94.75 80.51L94.37 82.10L93.92 83.54L93.43 84.86L92.87 86.07L92.26 87.19L91.59 88.22L90.85 89.17L90.05 90.05L89.17 90.85L88.22 91.59L87.19 92.26L86.07 92.87L84.86 93.43L83.54 93.92L82.10 94.37L80.51 94.75L78.76 95.09L76.79 95.37L74.54 95.60L71.90 95.77L68.64 95.90L64.13 95.97L50.00 96.00L35.87 95.97L31.36 95.90L28.10 95.77L25.46 95.60L23.21 95.37L21.24 95.09L19.49 94.75L17.90 94.37L16.46 93.92L15.14 93.43L13.93 92.87L12.81 92.26L11.78 91.59L10.83 90.85L9.95 90.05L9.15 89.17L8.41 88.22L7.74 87.19L7.13 86.07L6.57 84.86L6.08 83.54L5.63 82.10L5.25 80.51L4.91 78.76L4.63 76.79L4.40 74.54L4.23 71.90L4.10 68.64L4.03 64.13L4.00 50.00L4.03 35.87L4.10 31.36L4.23 28.10L4.40 25.46L4.63 23.21L4.91 21.24L5.25 19.49L5.63 17.90L6.08 16.46L6.57 15.14L7.13 13.93L7.74 12.81L8.41 11.78L9.15 10.83L9.95 9.95L10.83 9.15L11.78 8.41L12.81 7.74L13.93 7.13L15.14 6.57L16.46 6.08L17.90 5.63L19.49 5.25L21.24 4.91L23.21 4.63L25.46 4.40L28.10 4.23L31.36 4.10L35.87 4.03L50.00 4.00L64.13 4.03L68.64 4.10L71.90 4.23L74.54 4.40L76.79 4.63L78.76 4.91L80.51 5.25L82.10 5.63L83.54 6.08L84.86 6.57L86.07 7.13L87.19 7.74L88.22 8.41L89.17 9.15L90.05 9.95L90.85 10.83L91.59 11.78L92.26 12.81L92.87 13.93L93.43 15.14L93.92 16.46L94.37 17.90L94.75 19.49L95.09 21.24L95.37 23.21L95.60 25.46L95.77 28.10L95.90 31.36L95.97 35.87Z" fill="none" stroke="#fff" stroke-opacity=".18" stroke-width="1"/><rect x="18" y="24" width="64" height="42" rx="5" fill="#fff"/><g fill="#924b00"><rect x="30" y="46" width="8" height="12" rx="2"/><rect x="44" y="38" width="8" height="20" rx="2"/><rect x="58" y="32" width="8" height="26" rx="2"/></g><rect x="47.5" y="66" width="5" height="9" fill="#fff"/><rect x="37" y="74" width="26" height="5" rx="2.5" fill="#fff"/></svg> |
diff --git a/internal/slides/static/theme.css b/internal/slides/static/theme.css| index 5da4384..8ba18fc 100644 |
| --- a/internal/slides/static/theme.css |
| +++ b/internal/slides/static/theme.css |
| @@ -1,169 +1,73 @@ |
| -/* day — rastrillo's default theme: an everyday blue on white and grey. |
| - Structure lives in tokens.css; this file is colour, type and shape. |
| - rastrillo new writes it once as static/theme.css. |
| - |
| - The look: the ordinary, personable interface. A white page, a plain |
| - grey text scale, one friendly blue that means "this does something", |
| - and the conventional green/amber/red for status. Nothing here is |
| - trying to be memorable — day is the theme an app ships on while it |
| - works out what it wants to look like, and the one that never gets in |
| - the way of the content. Semantic status colours are functional and |
| - never the accent, so a pill can never be mistaken for a link. |
| +/* estilo — the Oficina suite's theme: Calma. |
| + |
| + Calma replaced rastrillo's day on 2026-09-29, by Paul's decision after |
| + six rounds of design directions (AGENTS.md, decisions table, row 8). |
| + Until then estilo WAS day, byte for byte; it is now its own theme, and |
| + theme_test.go gates it on its own terms: the same token set day |
| + declares (so rastrillo's tokens.css finds every name it uses), every |
| + contrast pair rastrillo gates, in both schemes — for this file AND for |
| + every app's accent block (apps.go) — and a golden per app so no value |
| + moves without the diff saying so. |
| + |
| + The look: quiet, even and exact. A cool off-white page with white |
| + cards, one grey text scale, soft 12px shapes with a long low shadow. |
| + Colour belongs to the apps: every app's hue sits on one ring of equal |
| + OKLCH lightness, so no app shouts over another, and the interface |
| + tints to the app you are in (apps.go — --rst-accent and friends are |
| + re-declared per app). This file's own accent is Oficina's, the suite's, |
| + used where no app is in charge (sign-in, the team's home). |
| + |
| + Status tones are day's, unchanged: they are functional, not brand, and |
| + a pill must never be mistaken for a link. |
| ── One block, both schemes ─────────────────────────────────────────── |
| - Every token is declared once, as light-dark(<light>, <dark>), under a |
| - single :root that sets color-scheme: light dark. The browser picks the |
| - half that matches the resolved scheme, so there is no second copy of |
| - the palette to keep in sync and no way to author dark half-done. The |
| - two rules at the bottom are the whole toggle: setting color-scheme on |
| - :root[data-theme=…] re-resolves every light-dark() in the file at |
| - once, in both directions, which is why an explicit choice beats the OS |
| - without restating a single colour. |
| - |
| - Tokens with one value in both schemes — the font stack, the radii — |
| - are written plain, because light-dark(x, x) says nothing twice. |
| - |
| - light-dark() is a colour function: it may only stand where a <color> |
| - is expected. So a shadow token wraps its colour in it and writes the |
| - geometry once, outside the call — `0 8px 24px light-dark(a, b)`, never |
| - `light-dark(0 8px 24px a, …)`, which no browser would accept as a |
| - box-shadow. |
| - |
| - ── The shape axis ──────────────────────────────────────────────────── |
| - Radius and shadow are the theme's now, not tokens.css's: a theme that |
| - can only change colour cannot change how an app feels. day is soft and |
| - unremarkable — 8px cards, 6px controls, shadows with a wide blur and |
| - little alpha, the depth of paper resting on paper. |
| - |
| - ── WCAG 2.2 AA, measured ───────────────────────────────────────────── |
| - Normal text needs 4.5:1; large text and UI component boundaries need |
| - 3:1. Every pair below was computed from these exact hex values, in |
| - both schemes. If you change a token, recompute its rows. |
| - |
| - LIGHT ratio requirement |
| - --rst-text on --rst-surface 16.91 4.5:1 text |
| - --rst-text on --rst-bg 16.91 4.5:1 text |
| - --rst-text on --rst-surface-2 15.77 4.5:1 text |
| - --rst-text on --rst-accent-soft 15.21 4.5:1 text |
| - --rst-text-muted on --rst-surface 7.56 4.5:1 text |
| - --rst-text-muted on --rst-bg 7.56 4.5:1 text |
| - --rst-text-muted on --rst-surface-2 7.05 4.5:1 text |
| - --rst-text-muted on --rst-accent-soft 6.80 4.5:1 text |
| - --rst-text-faint on --rst-surface 5.29 4.5:1 text |
| - --rst-text-faint on --rst-bg 5.29 4.5:1 text |
| - --rst-text-faint on --rst-surface-2 4.93 4.5:1 text |
| - --rst-text-faint on --rst-accent-soft 4.76 4.5:1 text |
| - --rst-accent on --rst-surface 5.28 4.5:1 text + focus ring |
| - --rst-accent on --rst-bg 5.28 4.5:1 text + focus ring |
| - --rst-accent on --rst-surface-2 4.93 4.5:1 text |
| - --rst-accent on --rst-accent-soft 4.75 4.5:1 text |
| - --rst-on-accent on --rst-accent 5.28 4.5:1 button label |
| - --rst-on-accent on --rst-accent-strong 7.18 4.5:1 button label, hover |
| - --rst-line-strong on --rst-surface 3.63 3:1 control border |
| - --rst-line-strong on --rst-bg 3.63 3:1 control border |
| - --rst-line-strong on --rst-surface-2 3.39 3:1 control border |
| - pill neutral fg on its own tint 9.02 4.5:1 text |
| - pill positive fg on its own tint 6.49 4.5:1 text |
| - pill warning fg on its own tint 6.15 4.5:1 text |
| - pill negative fg on its own tint 5.30 4.5:1 text |
| - --rst-on-accent on negative fg (fill) 6.47 4.5:1 danger button label |
| - |
| - DARK ratio requirement |
| - --rst-text on --rst-surface 13.74 4.5:1 text |
| - --rst-text on --rst-bg 15.32 4.5:1 text |
| - --rst-text on --rst-surface-2 14.63 4.5:1 text |
| - --rst-text on --rst-accent-soft 13.02 4.5:1 text |
| - --rst-text-muted on --rst-surface 7.56 4.5:1 text |
| - --rst-text-muted on --rst-bg 8.43 4.5:1 text |
| - --rst-text-muted on --rst-surface-2 8.05 4.5:1 text |
| - --rst-text-muted on --rst-accent-soft 7.16 4.5:1 text |
| - --rst-text-faint on --rst-surface 6.33 4.5:1 text |
| - --rst-text-faint on --rst-bg 7.06 4.5:1 text |
| - --rst-text-faint on --rst-surface-2 6.74 4.5:1 text |
| - --rst-text-faint on --rst-accent-soft 6.00 4.5:1 text |
| - --rst-accent on --rst-surface 6.95 4.5:1 text + focus ring |
| - --rst-accent on --rst-bg 7.75 4.5:1 text + focus ring |
| - --rst-accent on --rst-surface-2 7.40 4.5:1 text |
| - --rst-accent on --rst-accent-soft 6.59 4.5:1 text |
| - --rst-on-accent on --rst-accent 7.86 4.5:1 button label |
| - --rst-on-accent on --rst-accent-strong 10.29 4.5:1 button label, hover |
| - --rst-line-strong on --rst-surface 4.26 3:1 control border |
| - --rst-line-strong on --rst-bg 4.75 3:1 control border |
| - --rst-line-strong on --rst-surface-2 4.53 3:1 control border |
| - pill neutral fg on its own tint 8.44 4.5:1 text |
| - pill positive fg on its own tint 10.18 4.5:1 text |
| - pill warning fg on its own tint 9.62 4.5:1 text |
| - pill negative fg on its own tint 7.85 4.5:1 text |
| - --rst-on-accent on negative fg (fill) 8.99 4.5:1 danger button label |
| - |
| - The tightest pair in the set is --rst-accent on --rst-accent-soft in |
| - light, at 4.75:1 against a 4.5:1 floor. Put a token on a surface not |
| - listed above and you are guessing; recompute first. |
| - |
| - --rst-line is a hairline divider between rows, not a control border or |
| - a meaningful graphic, so 1.4.11's 3:1 does not apply to it. Control |
| - borders use --rst-line-strong, which does clear 3:1. |
| - |
| - --rst-header-rule is not in the table either, and deliberately so |
| - (design doc §6-v2.2): the page header's rule is decoration, not |
| - structure — the heading's size, weight and spacing carry the |
| - structure — so no contrast floor applies to it and it is not in |
| - ui/contrast_test.go's pair table. Do not argue it up to 3:1. |
| - |
| - Pagination chips are the one deliberate exception: they are bordered |
| - with --rst-line rather than --rst-line-strong, because a page strip |
| - ringed in hard outlines shouts louder than the list it belongs to. |
| - 1.4.11 is satisfied without that border — each chip's meaning is |
| - carried by its text label at 4.5:1 or better, and the current page |
| - adds a filled background, a heavier weight and aria-current on top. |
| - |
| - --rst-shadow-pop, --rst-shadow-knob, --rst-shadow-lift and |
| - --rst-overlay are not in the table: they paint a translucent shadow or |
| - scrim over whatever sits underneath, not text over a fixed |
| - background, so a contrast ratio does not apply. The scrim deepens in |
| - dark, matching --rst-shadow-pop's own jump: black reads lighter |
| - against a dark backdrop, so the overlay needs more alpha to still |
| - read as a dimming layer. |
| + As day: every colour is light-dark(<light>, <dark>) under one :root |
| + with color-scheme: light dark, and the two [data-theme] rules at the |
| + bottom are the whole toggle. |
| + |
| + ── WCAG 2.2 AA ─────────────────────────────────────────────────────── |
| + Every pair rastrillo's own gate checks is checked by |
| + TestContrastMeetsWCAG, for this file and each app's accent, light and |
| + dark, through rastrillo's ui.ContrastRatio. The tightest, at the time |
| + of writing: faint text on an accent-tinted surface, 4.63:1 (Files, |
| + dark); a control border on the sunk surface, 3.2:1 (light). |
| ──────────────────────────────────────────────────────────────────── */ |
| :root { |
| color-scheme: light dark; |
| - /* Type: the family only. Sizes and spacing are structural and stay in |
| - tokens.css. */ |
| - --rst-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; |
| + /* Type: the family only. Sizes and spacing stay in tokens.css. Onest |
| + where it is served (fonts.go), the system face where it is not. */ |
| + --rst-font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; |
| - /* Shape: soft, ordinary, unremarkable. */ |
| - --rst-radius: 8px; |
| - --rst-radius-sm: 6px; |
| + /* Shape: soft and exact. */ |
| + --rst-radius: 12px; |
| + --rst-radius-sm: 8px; |
| --rst-radius-pill: 999px; |
| - /* Surfaces and lines */ |
| - --rst-bg: light-dark(#ffffff, #111418); |
| - --rst-surface: light-dark(#ffffff, #1a1f26); |
| - --rst-surface-2: light-dark(#f6f7f8, #15191f); |
| - --rst-line: light-dark(#e5e7eb, #2a3038); |
| - --rst-line-strong: light-dark(#7f8792, #79828e); |
| - |
| - /* The page header's rule, derived rather than authored: the accent |
| - folded into the line at 18%, so a theme that changes its accent |
| - gets a matching rule with no second value to keep in step. day's |
| - is barely there — a hairline you would call grey until you put it |
| - beside plain's. Decorative: it carries no contrast floor. */ |
| + /* Surfaces and lines: a cool off-white page, white cards, a sunk grey. */ |
| + --rst-bg: light-dark(#f5f6f8, #15171c); |
| + --rst-surface: light-dark(#ffffff, #1c1f26); |
| + --rst-surface-2: light-dark(#eceef2, #23262e); |
| + --rst-line: light-dark(#e3e6eb, #2d313a); |
| + --rst-line-strong: light-dark(#7f8591, #7a818e); |
| + |
| + /* The page header's rule: the accent folded into the line, as day. */ |
| --rst-header-rule: color-mix(in oklab, var(--rst-accent) 18%, var(--rst-line)); |
| /* Text */ |
| - --rst-text: light-dark(#1a1d21, #e8eaed); |
| - --rst-text-muted: light-dark(#4b5563, #a8b0ba); |
| - --rst-text-faint: light-dark(#656c78, #98a1ac); |
| - |
| - /* Accent */ |
| - --rst-accent: light-dark(#2464e0, #7ba7ff); |
| - --rst-accent-strong: light-dark(#1a4fc0, #a3c0ff); |
| - --rst-accent-soft: light-dark(#eef3fe, #17233a); |
| - --rst-on-accent: light-dark(#ffffff, #0b1220); |
| - |
| - /* Status tones */ |
| + --rst-text: light-dark(#262a33, #eceef2); |
| + --rst-text-muted: light-dark(#565c69, #b4bac6); |
| + --rst-text-faint: light-dark(#626875, #8f96a3); |
| + |
| + /* Accent: Oficina's, hue 262 on the ring (apps.go). Each app |
| + re-declares these four. */ |
| + --rst-accent: light-dark(#2e5bb4, #87b1fd); |
| + --rst-accent-strong: light-dark(#214a9b, #afcbfe); |
| + --rst-accent-soft: light-dark(#e9f1ff, #1f2b42); |
| + --rst-on-accent: light-dark(#ffffff, #111418); |
| + |
| + /* Status tones: day's, unchanged. */ |
| --rst-tone-neutral-fg: light-dark(#374151, #c3c9d1); |
| --rst-tone-neutral-bg: light-dark(#eef0f2, #262c34); |
| --rst-tone-positive-fg: light-dark(#166534, #6ee7a8); |
| @@ -173,11 +77,11 @@ |
| --rst-tone-negative-fg: light-dark(#b91c1c, #f79aa0); |
| --rst-tone-negative-bg: light-dark(#fee2e2, #331819); |
| - /* Depth */ |
| - --rst-shadow-pop: 0 8px 24px light-dark(rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.5)); |
| - --rst-shadow-knob: 0 1px 2px rgba(0, 0, 0, 0.3); |
| - --rst-shadow-lift: 0 1px 2px rgba(0, 0, 0, 0.08); |
| - --rst-overlay: light-dark(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.6)); |
| + /* Depth: a long, low, cool shadow; paper lifted, not stacked. */ |
| + --rst-shadow-pop: 0 18px 44px -14px light-dark(rgba(20, 24, 33, 0.28), rgba(0, 0, 0, 0.6)); |
| + --rst-shadow-knob: 0 1px 2px rgba(20, 24, 33, 0.3); |
| + --rst-shadow-lift: 0 1px 1px rgba(20, 24, 33, 0.04), 0 14px 36px -14px light-dark(rgba(20, 24, 33, 0.22), rgba(0, 0, 0, 0.55)); |
| + --rst-overlay: light-dark(rgba(20, 24, 33, 0.45), rgba(0, 0, 0, 0.6)); |
| } |
| /* The whole toggle. Setting color-scheme re-resolves every light-dark() |
| @@ -185,3 +89,11 @@ |
| restating a colour. */ |
| :root[data-theme="light"] { color-scheme: light; } |
| :root[data-theme="dark"] { color-scheme: dark; } |
| + |
| +/* The accent for Slides: hue 56 on Calma's ring (estilo theme/apps.go). */ |
| +:root { |
| + --rst-accent: light-dark(#924b00, #eb9c62); |
| + --rst-accent-strong: light-dark(#793e02, #f9bc91); |
| + --rst-accent-soft: light-dark(#feece0, #3c2514); |
| + --rst-on-accent: light-dark(#ffffff, #111418); |
| +} |
diff --git a/internal/slides/templates/layout.html b/internal/slides/templates/layout.html| index 2b04a4f..384dd07 100644 |
| --- a/internal/slides/templates/layout.html |
| +++ b/internal/slides/templates/layout.html |
| @@ -36,6 +36,7 @@ |
| <link rel="icon" type="image/png" sizes="32x32" href="{{asset "static/brand/icon-32.png"}}"> |
| <link rel="icon" type="image/svg+xml" href="{{asset "static/brand/icon.svg"}}"> |
| <link rel="apple-touch-icon" sizes="180x180" href="{{asset "static/brand/apple-touch-icon.png"}}"> |
| +<link rel="stylesheet" href="/static/estilo/fonts/v1/fonts.css"> |
| <link rel="stylesheet" href="{{asset "static/tokens.css"}}"> |
| <link rel="stylesheet" href="{{asset "static/theme.css"}}"> |
| <link rel="stylesheet" href="{{asset "static/brand/brand.css"}}"> |
diff --git a/internal/slidestest/fontlink_test.go b/internal/slidestest/fontlink_test.go| new file mode 100644 |
| index 0000000..633db53 |
| --- /dev/null |
| +++ b/internal/slidestest/fontlink_test.go |
| @@ -0,0 +1,24 @@ |
| +package slidestest |
| + |
| +import ( |
| + "bytes" |
| + "os" |
| + "path/filepath" |
| + "testing" |
| + |
| + "amadan.net/oficina/estilo.git/theme" |
| +) |
| + |
| +// The layout names Onest's stylesheet by a literal path; this keeps that |
| +// literal equal to estilo's versioned prefix, so an estilo font move |
| +// fails here rather than every page quietly falling back to the system |
| +// face. |
| +func TestLayoutLinksEstilosFonts(t *testing.T) { |
| + layout, err := os.ReadFile(filepath.Join("..", "slides", "templates", "layout.html")) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + if want := `href="` + theme.FontPrefix + `fonts.css"`; !bytes.Contains(layout, []byte(want)) { |
| + t.Errorf("layout.html does not link %s", want) |
| + } |
| +} |
diff --git a/internal/slidestest/vendored_test.go b/internal/slidestest/vendored_test.go| index 2fdf046..a591eea 100644 |
| --- a/internal/slidestest/vendored_test.go |
| +++ b/internal/slidestest/vendored_test.go |
| @@ -24,7 +24,27 @@ const vendoredTheme = "day" |
| // record that the edit was on purpose, so the next reader (and the next |
| // upgrade) can tell it from drift. |
| var vendoredIsMine = map[string]bool{ |
| - // "tokens.css": true, |
| + // Calma with Slides' accent, from estilo (estilo AGENTS.md, decisions |
| + // table, row 8) rather than rastrillo's day. Pinned to estilo instead, |
| + // by TestThemeIsEstilosForSlides below. |
| + "theme.css": true, |
| +} |
| + |
| +// TestThemeIsEstilosForSlides pins static/theme.css to the estilo this app |
| +// is built against. After an estilo upgrade, re-write it with |
| +// `go run ./scripts/writetheme` — never by hand. |
| +func TestThemeIsEstilosForSlides(t *testing.T) { |
| + want, ok := theme.ForApp("slides") |
| + if !ok { |
| + t.Fatal("estilo's theme ring has no slides") |
| + } |
| + got, err := os.ReadFile(filepath.Join("..", "slides", "static", "theme.css")) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + if !bytes.Equal(got, want) { |
| + t.Error("static/theme.css differs from estilo's theme for slides; run go run ./scripts/writetheme") |
| + } |
| } |
| // The scaffold delivered these files once; they are app-owned from |
diff --git a/scripts/credits.py b/scripts/credits.py| index f236a6f..ad816ae 100755 |
| --- a/scripts/credits.py |
| +++ b/scripts/credits.py |
| @@ -51,7 +51,7 @@ def go_inventory(): |
| tool = str(Path(temp) / 'notices') |
| host = json.loads(run(['go', 'env', '-json', 'GOHOSTOS', 'GOHOSTARCH'])) |
| run(['go', 'build', '-o', tool, 'amadan.net/oficina/estilo.git/cmd/oficina-notices'], env=ENV | {'GOOS': host['GOHOSTOS'], 'GOARCH': host['GOHOSTARCH'], 'CGO_ENABLED': '0'}) |
| - return json.loads(run([tool, '-package', './cmd/slides', '-lucide', '-exclude', EXCLUDE], env=ENV | {'GOOS': 'linux', 'GOARCH': 'arm64', 'CGO_ENABLED': '0', 'GOWORK': 'off'})) |
| + return json.loads(run([tool, '-package', './cmd/slides', '-lucide', '-onest', '-exclude', EXCLUDE], env=ENV | {'GOOS': 'linux', 'GOARCH': 'arm64', 'CGO_ENABLED': '0', 'GOWORK': 'off'})) |
| class NoticeText(HTMLParser): |
diff --git a/scripts/writetheme/main.go b/scripts/writetheme/main.go| new file mode 100644 |
| index 0000000..489e108 |
| --- /dev/null |
| +++ b/scripts/writetheme/main.go |
| @@ -0,0 +1,21 @@ |
| +// Command writetheme re-writes internal/slides/static/theme.css from the |
| +// estilo this module pins: Calma, with Slides' accent. Run it from the |
| +// repository root after upgrading estilo; TestThemeIsEstilosForSlides |
| +// fails until you do. |
| +package main |
| + |
| +import ( |
| + "os" |
| + |
| + "amadan.net/oficina/estilo.git/theme" |
| +) |
| + |
| +func main() { |
| + css, ok := theme.ForApp("slides") |
| + if !ok { |
| + panic("estilo's theme ring has no slides") |
| + } |
| + if err := os.WriteFile("internal/slides/static/theme.css", css, 0o644); err != nil { |
| + panic(err) |
| + } |
| +} |