Begin go documentation (ai slop for now)
This commit is contained in:
@@ -16,19 +16,19 @@
|
||||
--------------------------------------------------------------------------- */
|
||||
|
||||
@theme {
|
||||
/* The brand: navy and red, the Norwegian flag muted down. These are the SAME values
|
||||
the Go/WASM section's css/app.css sets, and under the same names — so the Layers
|
||||
menu, the sidebar highlight and the callouts are the same navy on both sides of the
|
||||
site rather than two navies that happen to be close.
|
||||
/* The brand: navy throughout, a muted flag-navy. These are the SAME values the Go/WASM
|
||||
section's css/app.css sets, and under the same names — so the Layers menu, the
|
||||
sidebar highlight and the callouts are the same navy on both sides of the site rather
|
||||
than two navies that happen to be close.
|
||||
|
||||
primary FILLS (white text sits on it) and is the NAVY; accent is TEXT and icons and
|
||||
is the RED (it has to be readable on the surface); primary-subtle/-border are the
|
||||
tinted panel. */
|
||||
primary FILLS (white text sits on it); accent is TEXT and icons (it has to be
|
||||
readable on the surface) and is a slightly deeper navy so a link reads as one;
|
||||
primary-subtle/-border are the tinted panel. Only the flag tile keeps a red. */
|
||||
--color-primary: #1e3a63; /* muted navy — fills; they carry white text */
|
||||
--color-primary-hover: #16294a;
|
||||
--color-primary-subtle: #eef2f8; /* a navy wash — tinted panels, callouts */
|
||||
--color-primary-border: #c5d1e2;
|
||||
--color-accent: #9e1b32; /* dark red — accent TEXT */
|
||||
--color-accent: #1c3a66; /* navy — accent TEXT (links, eyebrow, active rows) */
|
||||
|
||||
/* Lora, the same body face the Go/WASM section vendors. The woff2 files are
|
||||
served out of wwwroot/fonts by the same server, so this section pays no
|
||||
@@ -85,18 +85,32 @@ html {
|
||||
|
||||
/* The dark values for the brand.
|
||||
---------------------------------------------------------------------------
|
||||
Both tokens move, for different reasons. The accent CLIMBS: a dark red on a near-black
|
||||
surface is unreadable, so it goes up to a light rose — still the flag's red, just the
|
||||
only version of it you can read here. The FILL climbs too, which the sky blue it
|
||||
replaced did not have to: navy is dark enough that a navy button on a #101013 page loses
|
||||
its edges and reads as a hole. And the tinted panel inverts outright, because a pale
|
||||
wash on #101013 is not a tint, it is a white box.
|
||||
Navy is too dark to read on a near-black page, so both brand tokens climb to a lighter
|
||||
blue. The accent (TEXT) climbs furthest, to a soft sky a link stays legible in; the fill
|
||||
climbs less, to a steel blue that still looks like a button and still carries white text.
|
||||
And the tinted panel inverts outright, because a pale wash on #101013 is not a tint, it
|
||||
is a white box.
|
||||
|
||||
Same values, same names, as the Go/WASM section's css/app.css. */
|
||||
.dark {
|
||||
--color-accent: #f0a3ad;
|
||||
--color-accent: #9fc1ec;
|
||||
--color-primary: #2b4f80;
|
||||
--color-primary-hover: #37619b;
|
||||
--color-primary-subtle: #182234;
|
||||
--color-primary-border: #2c3e5c;
|
||||
}
|
||||
|
||||
/* The wordmark's logo tile: a muted Norwegian flag. Identical to the Go/WASM section's
|
||||
css/app.css — the two front-ends share one mark. See there for the full note; in short
|
||||
it is the flag's Scandinavian cross (navy cross, off-white outline, red field, offset
|
||||
left) drawn in layered gradients over a red base, constant across themes, with a flat
|
||||
dark scrim on top so the plain white sailboat reads on it without an outline. */
|
||||
.flag-no {
|
||||
background-color: #a83f4c;
|
||||
background-image:
|
||||
linear-gradient(rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.42)),
|
||||
linear-gradient(180deg, transparent 44.5%, #294c76 44.5%, #294c76 55.5%, transparent 55.5%),
|
||||
linear-gradient(90deg, transparent 32.5%, #294c76 32.5%, #294c76 43.5%, transparent 43.5%),
|
||||
linear-gradient(180deg, transparent 39%, #ece6da 39%, #ece6da 61%, transparent 61%),
|
||||
linear-gradient(90deg, transparent 27%, #ece6da 27%, #ece6da 49%, transparent 49%);
|
||||
}
|
||||
|
||||
@@ -93,22 +93,18 @@ function LayerItem(props: { layer: Layer; current?: Layer }) {
|
||||
fallback={
|
||||
<div class="flex cursor-default flex-col gap-0.5 px-3 py-2 opacity-55">
|
||||
<span class="flex items-center gap-2 text-sm font-medium text-ink-muted">
|
||||
<Icon icon={props.layer.icon} size={14} class="shrink-0 text-ink-faint" />
|
||||
{props.layer.name}
|
||||
<span class="rounded-full bg-surface-raised px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wider text-ink-muted">
|
||||
reference
|
||||
</span>
|
||||
</span>
|
||||
<span class="pl-6 text-xs text-ink-muted">{props.layer.tagline}</span>
|
||||
<span class="text-xs text-ink-muted">{props.layer.tagline}</span>
|
||||
</div>
|
||||
}
|
||||
>
|
||||
{/* A plain <a href>, not MenuLink and not the router's <A>. Both of the
|
||||
alternatives are wrong here: MenuLink lays its icon out BESIDE the whole
|
||||
two-line block (so the tagline never lines up under the name, which is what
|
||||
the Go menu does), and the router would try to handle the jump itself — but
|
||||
the other side is served by a different binary, so it has to be a real
|
||||
navigation. */}
|
||||
{/* A plain <a href>, not the router's <A>: the other side is served by a
|
||||
different binary, so crossing to it has to be a real navigation, not a
|
||||
client-side route the router would try to handle itself. */}
|
||||
<a
|
||||
href={props.layer.href}
|
||||
class={
|
||||
@@ -116,11 +112,8 @@ function LayerItem(props: { layer: Layer; current?: Layer }) {
|
||||
(props.current?.href === props.layer.href ? "bg-primary-subtle" : "")
|
||||
}
|
||||
>
|
||||
<span class="flex items-center gap-2 text-sm font-medium text-ink">
|
||||
<Icon icon={props.layer.icon} size={14} class="shrink-0 text-accent" />
|
||||
{props.layer.name}
|
||||
</span>
|
||||
<span class="pl-6 text-xs text-ink-muted">{props.layer.tagline}</span>
|
||||
<span class="text-sm font-medium text-ink">{props.layer.name}</span>
|
||||
<span class="text-xs text-ink-muted">{props.layer.tagline}</span>
|
||||
</a>
|
||||
</Show>
|
||||
);
|
||||
@@ -132,7 +125,10 @@ function Wordmark() {
|
||||
// back where you started.
|
||||
return (
|
||||
<a href="/" class="flex items-center gap-2.5 no-underline">
|
||||
<span class="inline-flex h-8 w-8 items-center justify-center rounded-default bg-fill-neutral text-on-fill-neutral">
|
||||
{/* text-white, not a theme token: the flag tile is the same in both themes, so
|
||||
the boat on top of it has to be too. The flag carries a dark scrim (.flag-no)
|
||||
so the plain white boat reads without a shadow of its own. */}
|
||||
<span class="inline-flex h-8 w-8 items-center justify-center rounded-default flag-no text-white">
|
||||
<Icon icon="sailboat" size={17} />
|
||||
</span>
|
||||
<span class="flex items-baseline gap-1.5">
|
||||
@@ -154,10 +150,13 @@ function Sidebar() {
|
||||
// The same active treatment the Go sidebar uses (app/pages.go: sidebarLink) — a
|
||||
// tinted panel and accent text, not a grey fill. Now that the Solid theme carries the
|
||||
// primary-subtle / accent tokens, the two sidebars are the same sidebar.
|
||||
//
|
||||
// No icons, also matching the Go sidebar: the sidebar is a list of words, and a glyph on
|
||||
// every row is noise to read past. So `block`, not `flex items-center gap-2`.
|
||||
const linkCls = (on: boolean) =>
|
||||
on
|
||||
? "flex items-center gap-2 rounded-default bg-primary-subtle px-2 py-1.5 text-sm font-medium text-accent no-underline"
|
||||
: "flex items-center gap-2 rounded-default px-2 py-1.5 text-sm text-ink-soft no-underline hover:bg-surface-raised hover:text-ink";
|
||||
? "block rounded-default bg-primary-subtle px-2 py-1.5 text-sm font-medium text-accent no-underline"
|
||||
: "block rounded-default px-2 py-1.5 text-sm text-ink-soft no-underline hover:bg-surface-raised hover:text-ink";
|
||||
|
||||
return (
|
||||
<aside class="sticky top-[3.75rem] hidden h-[calc(100vh-3.75rem)] w-56 shrink-0 overflow-y-auto py-10 lg:block">
|
||||
@@ -167,11 +166,6 @@ function Sidebar() {
|
||||
{(item) => (
|
||||
<li>
|
||||
<A href={item.path} end={item.path === "/"} class={linkCls(active(item.path))}>
|
||||
<Icon
|
||||
icon={item.icon}
|
||||
size={14}
|
||||
class={active(item.path) ? "text-accent" : "text-ink-faint"}
|
||||
/>
|
||||
{item.label}
|
||||
</A>
|
||||
</li>
|
||||
@@ -201,7 +195,6 @@ function Sidebar() {
|
||||
jumpTo(navigate, onComponents(), g.id);
|
||||
}}
|
||||
>
|
||||
<Icon icon={g.icon} size={14} class="text-ink-faint" />
|
||||
{g.label}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user