Begin go documentation (ai slop for now)
This commit is contained in:
@@ -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