web: the muted text that was never muted, and the stylesheet fetched every time
Every text-[color:var(--ink)]/50, border-[color:var(--ink)]/10 and
bg-[color:var(--ink)]/5 in the templates compiled to nothing. Tailwind v3
cannot put an opacity on an arbitrary var() colour, so all 538 of them were
dropped from output.css without a word. Meta text rendered at full ink, card
borders fell back to Tailwind's default grey (bright white rings at night),
and the washes, backdrops and hover pills simply weren't there, on the news
site, the casino and the adventure pages alike.
The palette is now written once per phase and casino room as bare rgb
channels (--ink-rgb and friends), the plain vars are built from them, and
tailwind.config.js exposes ink, muted, accent, warn and card as real colours.
The classes are text-ink/80, border-ink/10, bg-accent/20 now, and they compile.
Restoring the intended opacities as-is would have traded flat for illegible:
ink at 50% measures 2.7 to 2.9:1 on the lit phases. So secondary text gets
its own colour, --muted, per phase and per casino room, taken as faint as it
can go while still clearing 4.5:1 on both the card and the page. Everything
that was ink at 35 to 70% is text-muted. The 20-30% ones are separators and
empty-cell dashes and stay faint.
The bg-theme-* chips carry white text everywhere they appear, and eight of
them measured 2.5 to 3.2:1. Same hues, taken just dark enough to pass (4.6 to
4.7:1). eu, lego and adventure already passed and are unchanged, and the
underline and border colours keep the old pastels since they carry no text.
Static files came out of the embedded FS with no Last-Modified, no ETag and
no Cache-Control, so every page view downloaded the stylesheet and every
script in full, and the service worker's "cheap 304" never happened. Each
file is hashed once now. Templates link through {{asset}}, which appends
?v=<hash>; a request naming the current hash is served immutable for a year,
and everything else gets the hash as its ETag and revalidates to a 304. The
service worker serves versioned URLs cache-first, drops older versions of the
same file as new ones land, and moves to cache v6.
This commit is contained in:
@@ -5,16 +5,16 @@
|
||||
carries no token, so they get no link — their damage still counts and still
|
||||
holds its rank, they just aren't named. */}}
|
||||
{{define "defenderrow"}}
|
||||
<li class="flex items-baseline gap-3 py-1.5 border-b border-[color:var(--ink)]/5 last:border-0">
|
||||
<li class="flex items-baseline gap-3 py-1.5 border-b border-ink/5 last:border-0">
|
||||
<span class="flex-1 min-w-0">
|
||||
{{if .Token}}<a href="/adventure/who/{{.Token}}" class="font-semibold hover:text-theme-adventure transition truncate">{{.Name}}</a>
|
||||
{{else}}<span class="font-semibold text-[color:var(--ink)]/55 italic truncate">{{.Name}}</span>{{end}}
|
||||
{{if .Level}}<span class="text-xs text-[color:var(--ink)]/40 ml-1.5">lv {{.Level}}</span>{{end}}
|
||||
{{else}}<span class="font-semibold text-muted italic truncate">{{.Name}}</span>{{end}}
|
||||
{{if .Level}}<span class="text-xs text-muted ml-1.5">lv {{.Level}}</span>{{end}}
|
||||
</span>
|
||||
{{if .Fights}}
|
||||
<span class="text-xs text-[color:var(--ink)]/50 shrink-0 tabular-nums">{{.Damage}} dmg · {{.Fights}} bout{{if ne .Fights 1}}s{{end}}</span>
|
||||
<span class="text-xs text-muted shrink-0 tabular-nums">{{.Damage}} dmg · {{.Fights}} bout{{if ne .Fights 1}}s{{end}}</span>
|
||||
{{else}}
|
||||
<span class="text-xs text-[color:var(--ink)]/35 shrink-0">not yet in it</span>
|
||||
<span class="text-xs text-muted shrink-0">not yet in it</span>
|
||||
{{end}}
|
||||
</li>
|
||||
{{end}}
|
||||
@@ -62,10 +62,10 @@
|
||||
Matrix command stays on the page for everyone else, because it is still
|
||||
the only door for a visitor who isn't signed in — and the blow-by-blow of
|
||||
the fight arrives there whichever door you came through. -->
|
||||
<div id="adv-actions" class="adv-actions mt-6 rounded-3xl bg-[color:var(--card)] border-2 border-theme-adventure/30 p-5 shadow-pete">
|
||||
<div id="adv-actions" class="adv-actions mt-6 rounded-3xl bg-card border-2 border-theme-adventure/30 p-5 shadow-pete">
|
||||
{{if .YouOnBoard}}
|
||||
{{if .YouFought}}
|
||||
<p class="text-sm text-[color:var(--ink)]/75">
|
||||
<p class="text-sm text-ink/75">
|
||||
<span class="font-semibold text-theme-adventure">You've taken your bout today.</span>
|
||||
Come back tomorrow. One fight each, per day, and everyone in the right-hand column below still has theirs.
|
||||
</p>
|
||||
@@ -75,7 +75,7 @@
|
||||
the page can't go on saying "unspent" over a fight that just
|
||||
happened. */}}
|
||||
<div data-offer>
|
||||
<p class="text-sm text-[color:var(--ink)]/75 mb-3">
|
||||
<p class="text-sm text-ink/75 mb-3">
|
||||
<span class="font-semibold text-theme-adventure">Your bout is unspent.</span>
|
||||
Damage counts whether you win the fight or not. Turning up is the mechanic, and the blow-by-blow lands in Matrix.
|
||||
</p>
|
||||
@@ -88,9 +88,9 @@
|
||||
</div>
|
||||
{{end}}
|
||||
{{else}}
|
||||
<p class="text-sm text-[color:var(--ink)]/75">
|
||||
<p class="text-sm text-ink/75">
|
||||
<span class="font-semibold text-theme-adventure">Taking your bout:</span>
|
||||
say <code class="rounded bg-[color:var(--ink)]/8 px-1.5 py-0.5 font-mono text-xs">!adventure siege fight</code>
|
||||
say <code class="rounded bg-ink/[.08] px-1.5 py-0.5 font-mono text-xs">!adventure siege fight</code>
|
||||
to me in Matrix. One a day, each. Damage counts whether you win the fight or not; turning up is the mechanic.
|
||||
</p>
|
||||
{{end}}
|
||||
@@ -103,7 +103,7 @@
|
||||
<!-- The muster. Two columns, and the right-hand one is the point: a bout not
|
||||
taken today is damage the pool never sees. -->
|
||||
<section class="mt-6 grid gap-6 sm:grid-cols-2">
|
||||
<div class="rounded-3xl bg-[color:var(--card)] border-2 border-[color:var(--ink)]/10 p-6 shadow-pete">
|
||||
<div class="rounded-3xl bg-card border-2 border-ink/10 p-6 shadow-pete">
|
||||
<div class="flex items-baseline justify-between mb-3">
|
||||
<h2 class="font-display text-xl font-bold">In it today</h2>
|
||||
<span class="siege-chip siege-chip-fought">{{len .Siege.Fought}}</span>
|
||||
@@ -111,31 +111,31 @@
|
||||
{{if .Siege.Fought}}
|
||||
<ul class="text-sm">{{range .Siege.Fought}}{{template "defenderrow" .}}{{end}}</ul>
|
||||
{{else}}
|
||||
<p class="text-sm text-[color:var(--ink)]/50">Nobody's swung at it yet today. The pool doesn't move on its own.</p>
|
||||
<p class="text-sm text-muted">Nobody's swung at it yet today. The pool doesn't move on its own.</p>
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
<div class="rounded-3xl bg-[color:var(--card)] border-2 border-[color:var(--ink)]/10 p-6 shadow-pete">
|
||||
<div class="rounded-3xl bg-card border-2 border-ink/10 p-6 shadow-pete">
|
||||
<div class="flex items-baseline justify-between mb-3">
|
||||
<h2 class="font-display text-xl font-bold">Bout still going spare</h2>
|
||||
<span class="siege-chip siege-chip-waiting">{{len .Siege.Waiting}}</span>
|
||||
</div>
|
||||
{{if .Siege.Waiting}}
|
||||
<ul class="text-sm">{{range .Siege.Waiting}}{{template "defenderrow" .}}{{end}}</ul>
|
||||
<p class="mt-3 text-xs text-[color:var(--ink)]/45">Each of these is a free hit the town hasn't taken.</p>
|
||||
<p class="mt-3 text-xs text-muted">Each of these is a free hit the town hasn't taken.</p>
|
||||
{{else}}
|
||||
<p class="text-sm text-[color:var(--ink)]/50">Everyone's been out. Good turnout.</p>
|
||||
<p class="text-sm text-muted">Everyone's been out. Good turnout.</p>
|
||||
{{end}}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{{else}}
|
||||
<header class="rounded-3xl bg-[color:var(--card)] border-2 border-[color:var(--ink)]/10 p-6 sm:p-10 shadow-pete relative overflow-hidden">
|
||||
<header class="rounded-3xl bg-card border-2 border-ink/10 p-6 sm:p-10 shadow-pete relative overflow-hidden">
|
||||
<div class="absolute -top-8 -right-4 text-[12rem] opacity-10 select-none" aria-hidden="true">🏰</div>
|
||||
<div class="relative">
|
||||
<p class="text-sm uppercase tracking-[0.2em] text-[color:var(--ink)]/50">🏰 The Siege</p>
|
||||
<p class="text-sm uppercase tracking-[0.2em] text-muted">🏰 The Siege</p>
|
||||
<h1 class="font-display text-3xl sm:text-4xl font-bold mt-2 leading-tight">Nothing's camped outside town.</h1>
|
||||
<p class="mt-3 text-[color:var(--ink)]/70">
|
||||
<p class="mt-3 text-muted">
|
||||
{{if .Siege.Known}}
|
||||
Quiet month so far. One comes for the town every month — a named thing with a shared health pool, and everybody gets a swing a day at it.
|
||||
{{else}}
|
||||
@@ -150,21 +150,21 @@
|
||||
<!-- The history is what makes the live bar mean something. A won siege ends
|
||||
at zero and draws as an empty track; a lost one shows exactly how much
|
||||
was left standing when the window shut. -->
|
||||
<section class="mt-8 rounded-3xl bg-[color:var(--card)] border-2 border-[color:var(--ink)]/10 p-6 shadow-pete">
|
||||
<section class="mt-8 rounded-3xl bg-card border-2 border-ink/10 p-6 shadow-pete">
|
||||
<h2 class="font-display text-xl font-bold mb-4">Sieges past</h2>
|
||||
<ul class="space-y-4">
|
||||
{{range .Siege.History}}
|
||||
<li>
|
||||
<div class="flex items-baseline justify-between gap-3">
|
||||
<span class="font-semibold flex-1 min-w-0 truncate">{{.BossName}} <span class="text-xs font-normal text-[color:var(--ink)]/40">T{{.Tier}}</span></span>
|
||||
<span class="font-semibold flex-1 min-w-0 truncate">{{.BossName}} <span class="text-xs font-normal text-muted">T{{.Tier}}</span></span>
|
||||
<span class="siege-chip {{if .Won}}siege-chip-held{{else}}siege-chip-fell{{end}} shrink-0">{{if .Won}}town held{{else}}broke through{{end}}</span>
|
||||
</div>
|
||||
<div class="mt-1.5 siege-track siege-track-sm">
|
||||
<div class="siege-fill {{if .Won}}siege-fill-spent{{end}}" style="width: {{.HPPercent}}%"></div>
|
||||
</div>
|
||||
<div class="mt-1.5 flex flex-wrap items-baseline justify-between gap-x-3 text-xs text-[color:var(--ink)]/50">
|
||||
<div class="mt-1.5 flex flex-wrap items-baseline justify-between gap-x-3 text-xs text-muted">
|
||||
<span>
|
||||
{{if .Won}}Felled by {{.Defenders}} defender{{if ne .Defenders 1}}s{{end}}{{else}}{{.HPRemaining}} HP still standing when the window shut{{end}}{{if .MVP}} · most bouts: <span class="font-semibold text-[color:var(--ink)]/70">{{.MVP}}</span>{{if .MVPFights}} ({{.MVPFights}}){{end}}{{end}}
|
||||
{{if .Won}}Felled by {{.Defenders}} defender{{if ne .Defenders 1}}s{{end}}{{else}}{{.HPRemaining}} HP still standing when the window shut{{end}}{{if .MVP}} · most bouts: <span class="font-semibold text-muted">{{.MVP}}</span>{{if .MVPFights}} ({{.MVPFights}}){{end}}{{end}}
|
||||
</span>
|
||||
{{if .When}}<span class="shrink-0">{{.When}}</span>{{end}}
|
||||
</div>
|
||||
@@ -239,4 +239,4 @@
|
||||
</script>
|
||||
{{end}}
|
||||
|
||||
{{define "scripts"}}<script src="/static/js/adventure-actions.js" defer></script>{{end}}
|
||||
{{define "scripts"}}<script src="{{asset "/static/js/adventure-actions.js"}}" defer></script>{{end}}
|
||||
|
||||
Reference in New Issue
Block a user