Commit 201996e977

201996e9774f1250196c924fb13f4f1abe9123f8

parent: 31ebfac18d

Verified · cmc ci/build: success ci/lint: success

cmc <hello@cleberg.net> · 2026-11-12 17:13 UTC

Move tints from style attributes to classes

The production CSP (style-src 'self') blocks style attributes, so the app
band and software icon tints did not apply. They are now .t-<name> classes
in styles.css.

Layout: unified · split

content/templates/app.html +3 −2
@@ -1,14 +1,15 @@
11{# An app page, for everything under apps/. Selected by the [[pages]] rule in orgo.toml.
22
33 The org files are krz.sh's app pages (krz/krz.sh content/apps/), so the keywords are
4 theirs: #+TINT, #+ICON, #+HERO, #+TAGLINE, #+PLATFORMS, #+APPSTORE, #+REPO, #+PRIVACY,
4 theirs: #+TINT (copied into styles.css as a .t-<dir> class, since the CSP blocks style
5 attributes), #+ICON, #+HERO, #+TAGLINE, #+PLATFORMS, #+APPSTORE, #+REPO, #+PRIVACY,
56 #+HIGHLIGHT_n ("title | text") and #+SHOT_n ("src | alt | caption"). The body is the
67 app's write-up. #}
78{% extends "base.html" %}
89{% block mainclass %}app{% endblock %}
910{% block main %}
1011{%- set k = page.keywords %}
11<section class="band" style="--tint: {{ k.tint }}">
12<section class="band t-{{ (page.url | split("/"))[1] }}">
1213<div class="band-in">
1314<div class="band-copy">
1415<p class="back"><a href="{{ root }}index.html">All apps</a></p>
content/templates/data/work.html +9 −9
@@ -1,17 +1,17 @@
11{#- The work on the home page that is not an app. Imported by home.html; the apps
22 themselves are the pages under apps/.
33
4 `teaser` is the unannounced app: no page, no link. Software entries carry a tint for
5 their icon. The Audit Labs chain is in the order evidence moves through it. -#}
6{%- set teaser = {"name": "Coming", "tint": "#2f4858"} -%}
4 `teaser` is the unannounced app: no page, no link. Each software entry's icon tint is
5 a .t-<name> class in styles.css, since the CSP blocks style attributes. The Audit Labs chain is in the order evidence moves through it. -#}
6{%- set teaser = {"name": "Coming"} -%}
77
88{%- set software = [
9 {"name": "orgo", "url": "https://gitbay.org/krz/orgo", "desc": "builds this site", "tint": "#248a3d"},
10 {"name": "gitbay", "url": "https://gitbay.org", "desc": "a CLI-first git forge", "tint": "#3634a3"},
11 {"name": "org-live", "url": "https://org.krz.sh", "desc": "org on the web", "tint": "#0c817b"},
12 {"name": "nfogen", "url": "https://gitbay.org/krz/nfogen", "desc": "NFO files", "tint": "#6c6c70"},
13 {"name": "SkunkyArt", "url": "https://gitbay.org/krz/skunky-art", "desc": "DeviantArt frontend", "tint": "#c93400"},
14 {"name": "1kb", "url": "https://rogue.krz.sh/1kb/#g", "desc": "tiny roguelike", "tint": "#d70015"},
9 {"name": "orgo", "url": "https://gitbay.org/krz/orgo", "desc": "builds this site"},
10 {"name": "gitbay", "url": "https://gitbay.org", "desc": "a CLI-first git forge"},
11 {"name": "org-live", "url": "https://org.krz.sh", "desc": "org on the web"},
12 {"name": "nfogen", "url": "https://gitbay.org/krz/nfogen", "desc": "NFO files"},
13 {"name": "SkunkyArt", "url": "https://gitbay.org/krz/skunky-art", "desc": "DeviantArt frontend"},
14 {"name": "1kb", "url": "https://rogue.krz.sh/1kb/#g", "desc": "tiny roguelike"},
1515] -%}
1616
1717{%- set audit_chain = [
content/templates/home.html +1 −1
@@ -94,7 +94,7 @@ along the way.</p>
9494<h2>Software</h2>
9595<ul>
9696{%- for s in work.software %}
97<li><a href="{{ s.url }}"><i style="--tint: {{ s.tint }}" aria-hidden="true">{{ s.name[:1] | upper }}</i><strong>{{ s.name }}</strong><span>{{ s.desc }}</span></a></li>
97<li><a href="{{ s.url }}"><i class="t-{{ s.name | lower }}" aria-hidden="true">{{ s.name[:1] | upper }}</i><strong>{{ s.name }}</strong><span>{{ s.desc }}</span></a></li>
9898{%- endfor %}
9999</ul>
100100</section>
theme/static/styles.css +6
@@ -152,6 +152,12 @@ pre code { color: #323232; }
152152@media (prefers-reduced-motion: reduce) { .screen .apps img { transition: none; } }
153153
154154/* A band per app: the top of each app page */
155/* Tints for app bands (.t-<apps dir>) and software icons (.t-<name>). They are classes
156 because the CSP's style-src 'self' blocks style attributes. */
157.t-hutch { --tint: #3d5a80; } .t-domain-dig { --tint: #1c57bd; } .t-gitbay { --tint: #4338ca; } .t-orgstar { --tint: #5b7a2e; }
158.t-daybyday { --tint: #c2410c; } .t-moonrise { --tint: #0a1424; } .t-hellsite { --tint: #2a5bd7; }
159.t-orgo { --tint: #248a3d; } .w-software .t-gitbay { --tint: #3634a3; } .t-org-live { --tint: #0c817b; } .t-nfogen { --tint: #6c6c70; }
160.t-skunkyart { --tint: #c93400; } .t-1kb { --tint: #d70015; }
155161.band { background: color-mix(in srgb, var(--tint) 80%, #000); color: #f5f5f7; }
156162.band-in { max-width: var(--wide); margin: 0 auto; padding: var(--s-section) var(--pad); display: grid; grid-template-columns: 5fr 7fr; gap: var(--s-gutter); align-items: center; }
157163.band-head { display: flex; align-items: center; gap: var(--s-4); }