Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions knip.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
// Host `uv` runs scripts/scan_runtime.py; it is not an npm package.
"ignoreBinaries": ["uv"]
}
1 change: 0 additions & 1 deletion src/assets/brand/totative-mark-dark.svg

This file was deleted.

18 changes: 5 additions & 13 deletions src/components/Brand.astro
Original file line number Diff line number Diff line change
@@ -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')
---

<Fragment set:html={svg} />
35 changes: 13 additions & 22 deletions src/data/site.ts
Original file line number Diff line number Diff line change
@@ -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'

Expand Down Expand Up @@ -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}`,
Expand All @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/Base.astro
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const ogType = progress ? 'article' : 'website'
<a class="skip" href="#main">Skip to content</a>
{progress && <div class="progress" aria-hidden="true" />}
<header class="head shell">
<a class="logo" href="/" aria-label="Totative home"><Brand kind="wordmark" /></a>
<a class="logo" href="/" aria-label="Totative home"><Brand /></a>
<nav aria-label="Site">
<a href="/writeups/" aria-current={inWriteups ? 'page' : undefined}>Write-ups</a>
<a class="wide" href="/brand/" aria-current={inBrand ? 'page' : undefined}>Brand</a>
Expand Down
Loading