From 707ff20900a282968c9c816ded4fe5b7e18d09aa Mon Sep 17 00:00:00 2001 From: Jason McCormick Date: Fri, 27 Nov 2026 11:59:34 -0500 Subject: initial add --- examples/index.html | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++++ examples/theme.js | 21 +++++++++++++ 2 files changed, 109 insertions(+) create mode 100644 examples/index.html create mode 100644 examples/theme.js (limited to 'examples') diff --git a/examples/index.html b/examples/index.html new file mode 100644 index 0000000..2e1bb02 --- /dev/null +++ b/examples/index.html @@ -0,0 +1,88 @@ + + + + +Carbon & Signal — Packet Warriors design system + + + + + +
+
PACKETWARRIORS
Design system / 01
+
Precision industrial · Carbon & Signal

Built for
the signal.

Independent engineering for amateur radio. Warm neutrals, deliberate red markings, instrument amber, and Jade for operational feedback.

+
+
Illustrative data · not connected to a radio
+
+
Packet Warriors / Software
XLX OBSERVATORY
Server online
+
+
PACKETWARRIORS
N8EI / Engineering tools
+
+
+
01 / Typography

IBM Plex Sans

Engineering clarity. Human character.

400 body · 600 controls/headings · 700 wordmarks

IBM Plex Mono: N8EI / 145.250 MHz / 18:42:07 UTC
+
02 / Semantic states

Signals, not decoration

ConnectedAttentionFailedIdle
Success: operation complete.
+
+

Carbon & Signal · v1.0 / Local offline specimen · Font uses installed IBM Plex or system fallback

+
+ + diff --git a/examples/theme.js b/examples/theme.js new file mode 100644 index 0000000..35df901 --- /dev/null +++ b/examples/theme.js @@ -0,0 +1,21 @@ +/* Optional. Load before CSS to avoid flash. Do not use for Zensical; it owns its toggle. */ +(() => { + const key = 'pw-theme', root = document.documentElement; + const media = matchMedia('(prefers-color-scheme: dark)'); + let preference = 'auto'; + try { preference = localStorage.getItem(key) || 'auto'; } catch {} + if (!['light','dark','auto'].includes(preference)) preference = 'auto'; + function apply() { + const mode = preference === 'auto' ? (media.matches ? 'dark' : 'light') : preference; + root.dataset.pwTheme = mode; + root.dataset.bsTheme = mode; + } + window.setPacketWarriorsTheme = mode => { + if (!['light','dark','auto'].includes(mode)) return; + preference = mode; + try { localStorage.setItem(key, mode); } catch {} + apply(); + }; + media.addEventListener('change', apply); + apply(); +})(); -- cgit v1.2.3