~ knotless Search/
↑↓ move↵ open⇧↵ all results

zat.dev/zds

atproto pds · mirror of https://tangled.org/zat.dev/zds

0
0
54 lines · 3.2 KB Raw History
# Resident web presentation

`account.html` owns the account portal markup, styles, bundled icons, and browser
interaction code. `../account.zig` builds the whole document at compile time,
once per skin (the shared appearance layer, the skin's `account.css`, the
build version and the icon license spliced in), so serving it allocates
nothing. Every grouped surface is a `.card`, which is what a skin restyles
and what garden's scene treats as paper. No frontend runtime dependency or
asset service is required.

`appearance.css` and `appearance.js` are the shared resident appearance layer:
palette tokens, the ambient glass background, and the theme and accent saved by
the homepage preferences (`zds.theme`, `zds.accentHue` in `localStorage`). The
account portal layers its own `<style>` and then the selected skin on top.

`authorize.css` and `authorize.js` style and drive the OAuth sign-in, account
picker and consent cards rendered by `src/atproto/oauth/page.zig`. Every
action there also works as a plain form post or link; the script adds
passkeys, inline reveals and the details dialog. Check them on a phone with
the keyboard down, in both themes, and at a desktop width.

`skin.zig` and `skins/` hold operator-selected skins (`ZDS_WEB_SKIN`) for the
homepage and the OAuth cards. `fonts/` holds the built-in reading fonts that
`ZDS_WEB_FONT` picks from (OFL, see `fonts/OFL.txt`); see [skins](https://tangled.org/zat.dev/zds/blob/main/src/internal/web/skins/README.md).

Keep visual experiments here. Account policy, authentication, authorization, and
storage remain in their existing server modules; the page calls existing XRPCs.
Default icons are decorative local SVGs with their license included in the
document. An operator can replace them per slot with Doodl drawings bundled at
build time (see `docs/iconography-proposal.md`); nothing is loaded remotely.

Check logged-in desktop and narrow-screen layouts when changing presentation.
Run the repository checks when shipping, including permissioned smoke checks
when changing the shared page used by `/account/spaces`.

Every page with the site header shares the homepage's column, so the `zds`
brand never moves between pages: a centred `.shell` at most 780px wide with
16px sides (14px at 430px and below) and 18px above it (24px from 680px), and
a 44px header row with 4px above and below. The homepage, `/stats`,
`/account` and `/api` follow it; check the brand's position on each at a
phone and a desktop width when changing any of them. `/stats` loads the
homepage stylesheet itself for the same palette and background.

`home.html` is the homepage template, embedded by `src/http/landing/mod.zig`.
Its `{s}` placeholders are Zig formatting arguments; escape any literal braces
as `{{` and `}}`. Dynamic values remain escaped by the renderer. Homepage CSS
and browser behavior currently live in `src/http/landing/assets.zig`.

`data-icon-slot` names identify replaceable artwork independently of link
behavior and accessible labels. Header slots are `zds.header.brand`, `.source`,
`.zat`, `.atproto` and `.menu`; the Account link shares
`zds.nav.account` with the account portal. A build with `-Dweb-drawings`
swaps in the configured drawing for each slot; other builds keep the
defaults.