Fix the logo's pop-in with a traced vector logo

The logo was an 880 KB SVG wrapping a 1254px PNG, downloaded again on
every page load. Keep that PNG as the master (artwork/logo.png) and have
scripts/logo.py trace it with potrace into a 6 KB logo.svg (favicon,
README) and logo.js, which brand.js draws inline in the header and on the
login page so the logo arrives with the page. Remove the unused
logo-white.svg.

Static files now carry content ETags, so reloads get 304s instead of
downloading the UI again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
abrown38andClaude Opus 5.5 committed 2026-10-08 18:01:22 +00:00
1 parent cf49df0346
commit 0f04dbb4b1
15 files changed
+215 -23049

No files matched your search

+13
View File
@@ -1,7 +1,12 @@
// The Jarl logo and the login page's wordmark, drawn as inline SVG so they
// appear together with the page instead of loading afterwards.
//
// The "JARL" wordmark for the login page: angular Norse-style letters
// drawn as paths (no font needed), over a rule with DNS nodes. The letters
// use the text color and the rule the accent color, so it follows the
// theme.
import * as logoData from "./logo.js";
const NS = "http://www.w3.org/2000/svg";
function el(tag, attrs, ...children) {
@@ -37,3 +42,11 @@ export function wordmark() {
return el("svg", { class: "wordmark", viewBox: "-4 -4 288 162", role: "img", "aria-label": "Jarl" },
el("title", null, "Jarl"), letterG, rule);
}
// logo returns the Jarl logo (traced from artwork/logo.png by
// scripts/logo.py) as an SVG of the given size in pixels.
export function logo(size, cls) {
return el("svg", { class: cls || "logo", width: size, height: size, viewBox: logoData.viewBox, "aria-hidden": "true", focusable: "false" },
el("g", { transform: logoData.transform },
...logoData.layers.map(([fill, d]) => el("path", { fill, d }))));
}