From 4fdcaf4203a195b0f4fcb21938e09f1473dff583 Mon Sep 17 00:00:00 2001 From: Damon Blais Date: Mon, 16 Nov 2026 19:02:54 -0700 Subject: [PATCH 1/3] refactor(site): remove unused tool blurbs No caller read tools[].text; the homepage already shows each library's README summary. --- src/data/site.ts | 35 +++++++++++++---------------------- 1 file changed, 13 insertions(+), 22 deletions(-) diff --git a/src/data/site.ts b/src/data/site.ts index 867f680..393bb96 100644 --- a/src/data/site.ts +++ b/src/data/site.ts @@ -1,5 +1,5 @@ // Copy is taken as written from the current site, the organisation profile and -// the three library READMEs. The `html` fields carry inline markup from those sources. +// the three library READMEs. export const siteName = 'Totative' @@ -35,11 +35,10 @@ interface ToolFacts { version: string } -const tool = (name: string, text: string, facts: ToolFacts) => { +const tool = (name: string, facts: ToolFacts) => { const tarball = `${name}-${facts.version}.tar.gz` return { name, - text, ...facts, href: `https://github.com/Totative/${name}`, release: `https://github.com/Totative/${name}/releases/tag/${facts.version}`, @@ -52,25 +51,17 @@ const tool = (name: string, text: string, facts: ToolFacts) => { } export const tools = [ - tool( - 'go-avscan', - 'asks the machine’s antivirus about a folder: AMSI, clamd, or a command you name.', - { - summary: - 'Asks the machine’s antivirus about a folder of files: Windows AMSI, a clamd daemon, or a command you name.', - version: 'v0.4.0', - }, - ), - tool( - 'go-keyring', - 'one credential store for a Go desktop app, with a sealed-file fallback inside Flatpak.', - { - summary: - 'One credential store for a Go desktop app: the OS keyring, with a sealed-file fallback inside a Flatpak.', - version: 'v0.3.0', - }, - ), - tool('go-codepair', 'pairs two devices on a LAN with a short typed code.', { + tool('go-avscan', { + summary: + 'Asks the machine’s antivirus about a folder of files: Windows AMSI, a clamd daemon, or a command you name.', + version: 'v0.4.0', + }), + tool('go-keyring', { + summary: + 'One credential store for a Go desktop app: the OS keyring, with a sealed-file fallback inside a Flatpak.', + version: 'v0.3.0', + }), + tool('go-codepair', { summary: 'Pair two devices on a LAN with a short human-typed code and an authenticated key exchange.', version: 'v0.3.0', From 3b332ad22b8aec44b21d466bc0ce7400a6ea4081 Mon Sep 17 00:00:00 2001 From: Damon Blais Date: Mon, 16 Nov 2026 19:02:59 -0700 Subject: [PATCH 2/3] refactor(brand): remove unused mark inliner No caller passed kind=mark; the brand page serves the public/brand files instead. --- src/assets/brand/totative-mark-dark.svg | 1 - src/components/Brand.astro | 18 +++++------------- src/layouts/Base.astro | 2 +- 3 files changed, 6 insertions(+), 15 deletions(-) delete mode 100644 src/assets/brand/totative-mark-dark.svg diff --git a/src/assets/brand/totative-mark-dark.svg b/src/assets/brand/totative-mark-dark.svg deleted file mode 100644 index ef5cffc..0000000 --- a/src/assets/brand/totative-mark-dark.svg +++ /dev/null @@ -1 +0,0 @@ -Totative diff --git a/src/components/Brand.astro b/src/components/Brand.astro index c498f9c..db45f34 100644 --- a/src/components/Brand.astro +++ b/src/components/Brand.astro @@ -1,21 +1,13 @@ --- -import markSvg from '../assets/brand/totative-mark-dark.svg?raw' import wordmarkSvg from '../assets/brand/totative-wordmark-dark.svg?raw' -interface Props { - kind: 'mark' | 'wordmark' -} - -const { kind } = Astro.props - -// The brand files are inlined with their two fixed fills swapped for classes, so -// each design colours them from its own palette. The clip-path ids are prefixed -// because the mark and the wordmark both name theirs "above" and "below". -const svg = (kind === 'mark' ? markSvg : wordmarkSvg) - .replace(/ width="\d+" height="\d+"/, ` class="brand brand-${kind}"`) +// Fills become classes so the stylesheet colours the wordmark. Clip-path ids +// are prefixed so they stay unique if another SVG on the page reuses the names. +const svg = wordmarkSvg + .replace(/ width="\d+" height="\d+"/, ' class="brand"') .replaceAll('fill="#F2EEF8"', 'class="wm-ink"') .replaceAll('fill="#B26BFF"', 'class="wm-accent"') - .replaceAll(/(id="|url\(#)(above|below)/g, `$1${kind}-$2`) + .replaceAll(/(id="|url\(#)(above|below)/g, '$1wordmark-$2') --- diff --git a/src/layouts/Base.astro b/src/layouts/Base.astro index 6b9cf49..04bea1f 100644 --- a/src/layouts/Base.astro +++ b/src/layouts/Base.astro @@ -47,7 +47,7 @@ const ogType = progress ? 'article' : 'website' {progress &&