gitoria
All repositories: gitoria
20.1 KB
// components/styles.hl — the app's CSS, served as /__hl/app.css: it INHERITS THE WORLDAPI THEME (theme/theme.hl, copied from// layouts.worldapi.org — never edited here; docs: layouts.worldapi.org docs/using-the-theme.md) and adds only what gitoria's own// pages need. Components carry no Style blocks: markup is domain tags (<repo-page>, <repo-meta>, …), this file lays them out// (the theme's shell files theme/shell/*.hl carry their own Style).// TOKENS: colours only through the named tokens (shared/tokens.hl = layouts' file, byte-equal); the app sets only its accent// (blue-dark). Corners: radiusSmall (5px: buttons, links, fields, rows) / radiusLarge (10px: panels, boxes). Borderless —// `node theme/check-theme.mjs .` must report 0 problems (a deploy gate).// In a styles file a bare name is a TAG (camelCase → kebab), a quoted name is a selector written verbatim; a selector the theme// already writes may not be written again (hl:web refuses it) — so a few rules here start with `html ` (as the theme does).// PHONE FIRST (gitoria#23): every rule outside a block is the PHONE's (390 px): nothing makes the page wider than the screen// (code, tables and long lines scroll inside their own box), every tap target is at least 44×44 px (2.75rem), every field 16 px// (iOS zooms into smaller ones), no text under 14 px (.875rem). `@media (min-width: 60rem)` (the theme's one breakpoint) at the// bottom only ADDS the wide layout.inherit '../theme/theme.hl'import { var } from 'hl:web/css'import { blueDark, colorText, colorTextStrong, colorTextMuted, colorBackground, colorBackgroundSunken, colorAccentText, colorSurface, colorDanger, colorSuccess } from '../shared/tokens.hl'colorAccent = var(blueDark) // the app's accent: the only token this app sets// ---- phone first: targets, fields, text --------------------------------------------------------------------------// the theme (layouts dbe3de7) sets 44 px targets, 16 px fields and the shells' sizes itself; only gitoria's own component stays heretime { color = colorTextMuted fontSize = '.875rem' whiteSpace = 'nowrap' }dl { display = 'grid' gridTemplateColumns = 'auto minmax(0, 1fr)' gap = '.3rem 1rem' alignItems = 'center' margin = '0' }dt { color = colorTextMuted }dd { margin = '0' overflowWrap = 'anywhere' }'dd > a' { display = 'inline-flex' alignItems = 'center' minHeight = '2.75rem' }'form label' { display = 'grid' gap = '.35rem' }'form input' { width = '100%' }'.message' { margin = '0' color = colorDanger }'.message:empty' { display = 'none' } // an empty error line must not leave a dead strip under the button'.notice' { margin = '0' color = colorSuccess }// ---- the shell (components/main.hl: the theme's AppHeader, MainMenu, UserMenu, Sidebar, ContentFirst) ------------------// the signed-in name at the top of the user menu (UserMenu's own `p.who` look)'user-menu p#whoami' { fontSize = '.875rem' }// ---- ident's selector in the header (creator 2026-10-24, "you removed the ident widget from all sites"): it stands top right, signed in AND// signed out, on the phone and on the desktop — never behind an icon or a popover. Its shadow DOM is in ident's design, restyled to the accent// through its custom properties and parts; the pill is kept compact so brand, selector and the user icon fit one row at 390 px. Its dropdown opens// under it, as wide as a phone allows.identSelector { '--ident-accent' = colorAccent '--ident-accent-text' = colorAccentText '--ident-background' = colorSurface '--ident-border' = colorSurface '--ident-font' = '600 .9rem/1.3 system-ui, sans-serif' position = 'relative' flex = '0 1 auto' minWidth = '0' }'ident-selector::part(button)' { minHeight = '2.75rem' padding = '.25rem .6rem' border = 'none' whiteSpace = 'nowrap' }'ident-selector::part(status)' { minHeight = '2.75rem' padding = '.25rem .6rem' border = 'none' whiteSpace = 'nowrap' overflow = 'hidden' textOverflow = 'ellipsis' }'ident-selector::part(identity)' { minHeight = '2.75rem' border = 'none' }'ident-selector::part(panel)' { position = 'absolute' top = '100%' right = '0' zIndex = '30' width = 'min(20rem, calc(100vw - 2 * var(--layout-gutter)))' maxWidth = 'none' border = 'none' boxShadow = '0 .75rem 2rem ' + colorBackgroundSunken }'#loginerror' { margin = '0' padding = '.5rem var(--layout-gutter)' background = colorBackgroundSunken }// the display-name prompt of a first login: in the content column, under the headernamePrompt { display = 'block' paddingInline = 'max(var(--layout-gutter), calc((100% - var(--layout-column)) / 2))' paddingTop = '1rem' }'name-prompt form' { display = 'grid' gap = '.6rem' padding = '1rem' background = colorSurface borderRadius = radiusLarge }// ---- offline (mission 046, components/main.hl): the note under the header, and the probe whose endless animation is// the shell's 1 s tick (it must be rendered for the animation to run — not display none — so: invisible)offlineNote { display = 'block' padding = '.5rem var(--layout-gutter)' color = colorTextStrong background = colorSurface }netProbe { position = 'fixed' left = '0' top = '0' width = '1px' height = '1px' opacity = '0' pointerEvents = 'none' animation = 'gitoria-net-tick 1s linear infinite' }'@keyframes gitoria-net-tick' = {'from' = { opacity = '0' }to = { opacity = '0' }}// ---- grids: the gap spaces the parts, so their own margins go -----------------------------------------------------------repoHome { display = 'grid' gap = '1rem' minWidth = '0' }repoPage { display = 'grid' gap = '1rem' minWidth = '0' }repoHead { display = 'grid' gap = '.75rem' minWidth = '0' }repoList { display = 'grid' gap = '1rem' minWidth = '0' }codeView { display = 'grid' gap = '1rem' minWidth = '0' }'repo-home > *,repo-page > *,repo-head > *,repo-list > *,code-view > *,code-browser > *,code-head > *,code-file > *,code-side section > *,repo-pulls > *,repo-releases > *,repo-tickets > *,repo-settings > *,#ticketsettings > *,access-tokens > *,ssh-keys > *,add-code > *,homepage-file > *,name-prompt form > *,#createform > *,#tokenform > *,#keyform > *,#newticketform > *' { margin = '0' }'repo-head h1' { fontSize = '1.4rem' }// ---- the repositories (main address) ------------------------------------------------------------------------------'#createform,#tokenform,#keyform' { display = 'grid' gap = '.75rem' padding = '1rem' background = colorSurface borderRadius = radiusLarge }'#repos' { display = 'grid' gap = '.5rem' margin = '0' padding = '0' listStyle = 'none' }'#repos li' { display = 'grid' gap = '.1rem' margin = '0' padding = '.25rem 1rem .6rem' background = colorSurface borderRadius = radiusLarge }'#repos .slug' { display = 'flex' alignItems = 'center' minHeight = '2.75rem' fontWeight = '700' fontSize = '1.05rem' overflowWrap = 'anywhere' }'#repos .about' { color = colorText }repoMeta { display = 'flex' flexWrap = 'wrap' gap = '.2rem 1rem' fontSize = '.875rem' color = colorTextMuted }// ---- the repo head (components/repo.hl, the repo layout level, gitoria#16/#22) -------------------------// THE TAB ROW: Readme · Code · Pull requests · Releases · Tickets · Settings. On a phone a 3 × 2 grid of equal cells (a wrapping// flex row left the two rows ragged), from 60rem one row — never wider than the screen; every tab 44 px high. The tab of the page you are on carries aria-current="page" (components/repo.hl,// the repo layout level that STANDS while you switch tabs): bold, strong colour, 2 px accent underline. Hybriel renders a null// attribute as aria-current="" (not omitted), so the selector is [aria-current=page].repoNav { display = 'grid' gridTemplateColumns = 'repeat(3, minmax(0, 1fr))' gap = '.15rem' minWidth = '0' }'repo-nav a' { display = 'inline-flex' alignItems = 'center' justifyContent = 'center' minWidth = '2.75rem' minHeight = '2.75rem' padding = '0 .25rem' textAlign = 'center' fontWeight = '600' color = colorText borderRadius = radiusSmall boxSizing = 'border-box' borderBottom = '2px solid transparent' } // functional: reserves the underline's 2 px so marking a tab moves nothing'repo-nav a:hover' { textDecoration = 'none' color = colorTextStrong background = colorSurface }'repo-nav a[aria-current=page]' { fontWeight = '700' color = colorTextStrong background = colorSurface borderBottomColor = colorAccent } // functional: the underline says "this is the page you are on"// ---- the repo homepage (gitoria#8): README.md / $docs as rendered Markdown (components/markdown.hl) ----repoHomepage { display = 'grid' gap = '1.5rem' minWidth = '0' }homepageFile { display = 'grid' gap = '.5rem' minWidth = '0' }'homepage-file > .path' { color = colorTextMuted fontSize = '.875rem' background = 'transparent' padding = '0' }markdownText { display = 'block' minWidth = '0' }'markdown-text > :first-child' { marginTop = '0' }'markdown-text > :last-child' { marginBottom = '0' }'markdown-text p,markdown-text li' { margin = '.5rem 0' overflowWrap = 'anywhere' }'markdown-text h2,markdown-text h3,markdown-text h4' { margin = '1.2rem 0 .5rem' lineHeight = '1.3' color = colorTextStrong }'markdown-text h2' { fontSize = '1.25rem' }'markdown-text h3' { fontSize = '1.08rem' }'markdown-text h4' { fontSize = '1rem' }'markdown-text ul,markdown-text ol' { margin = '.5rem 0' paddingLeft = '1.4rem' }'markdown-text li' { margin = '.15rem 0' }'markdown-text ul' { listStyleType = 'disc' }'markdown-text ol' { listStyleType = 'decimal' }'markdown-text strong' { color = colorTextStrong }'markdown-text a' { color = colorAccent textDecoration = 'underline' textUnderlineOffset = '.15em' }'markdown-text code' { font = 'max(.875rem, .9em)/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace' padding = '.05em .3em' color = colorTextStrong background = colorBackgroundSunken borderRadius = radiusSmall }'markdown-text pre' { margin = '.5rem 0' padding = '.6rem .8rem' overflowX = 'auto' background = colorBackgroundSunken borderRadius = radiusLarge }'markdown-text pre code' { padding = '0' background = 'transparent' whiteSpace = 'pre' }'markdown-text blockquote' { margin = '.5rem 0' padding = '.1rem .9rem' color = colorTextMuted borderLeft = '3px solid ' + colorSurface } // functional: the bar says "quoted"'markdown-text hr' { height = '1px' margin = '1rem 0' border = '0' background = colorSurface }// a wide table scrolls inside its own box, the page never does'markdown-text table-scroll' { display = 'block' maxWidth = '100%' overflowX = 'auto' margin = '.5rem 0' contain = 'inline-size' }'markdown-text table' { width = 'auto' margin = '0' }'markdown-text th' { fontSize = '.875rem' }// ---- adding code + access tokens (gitoria#7, plain text on the Code page of an empty repo: gitoria#20) ----'#addcode' { padding = '1rem' background = colorSurface borderRadius = radiusLarge }addCode { display = 'grid' gap = '.5rem' minWidth = '0' }'#addcode pre,#tokensecret' { margin = '0' padding = '.6rem .8rem' overflowX = 'auto' font = '.875rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace' color = colorTextStrong background = colorBackgroundSunken borderRadius = radiusLarge }'#addcode pre' { whiteSpace = 'pre-wrap' overflowWrap = 'anywhere' } // a command is read and copied whole: it wraps, it does not hide its endaccessTokens { display = 'grid' gap = '.75rem' minWidth = '0' }sshKeys { display = 'grid' gap = '.75rem' minWidth = '0' }'#tokenlist,#keylist' { display = 'grid' gap = '.5rem' margin = '0' padding = '0' listStyle = 'none' }'#tokenlist li,#keylist li' { display = 'flex' flexWrap = 'wrap' alignItems = 'center' gap = '.2rem 1rem' margin = '0' padding = '.4rem .5rem .4rem 1rem' background = colorSurface borderRadius = radiusLarge }'#tokenlist .slug,#keylist .slug' { fontWeight = '700' marginRight = 'auto' overflowWrap = 'anywhere' }'#keylist .fingerprint' { overflowWrap = 'anywhere' color = colorTextMuted }'#keytext' { font = '1rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace' }// ---- browsing code (gitoria#9): /code, /branch/<name>, /commit/<id> ----codeBrowser { display = 'grid' gap = '1rem' minWidth = '0' }codeHead { display = 'grid' gap = '.3rem' minWidth = '0' }latestCommit { display = 'flex' flexWrap = 'wrap' gap = '0 .8rem' alignItems = 'center' minWidth = '0' padding = '.1rem .8rem .4rem' background = colorSurface borderRadius = radiusLarge }'latest-commit > a' { display = 'inline-flex' alignItems = 'center' minHeight = '2.75rem' }'latest-commit a,code-side li > a:first-child' { font = '.9em/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace' }// at the root the path row would only say the branch's name a second time (the heading above it already does): hidden there'path-crumbs:has(> strong:only-child)' { display = 'none' }// the commit rows (the card at the top and the side list): ONE order everywhere — hash and date, the subject, the author — instead of// a flex line that wrapped differently with every subject'latest-commit > a:first-child,#commits li > a:first-child' { order = '1' }'latest-commit > time,#commits li > time' { order = '2' marginLeft = 'auto' }'latest-commit > span:nth-child(2),#commits li > span:nth-child(2)' { order = '3' flex = '1 1 100%' minWidth = '0' paddingBlock = '.1rem' }'latest-commit > span.muted,#commits li > span.muted' { order = '4' flex = '1 1 100%' fontSize = '.875rem' }// the path: every crumb a 44 px targetpathCrumbs { display = 'flex' flexWrap = 'wrap' alignItems = 'center' gap = '0 .1rem' minWidth = '0' overflowWrap = 'anywhere' }'path-crumbs a' { display = 'inline-flex' alignItems = 'center' justifyContent = 'center' minWidth = '2.75rem' minHeight = '2.75rem' padding = '0 .4rem' borderRadius = radiusSmall }'path-crumbs a:hover' { background = colorSurface }// the folder: one row per entry, the whole row is the link (44 px), rows told apart by stripes (no lines)'#entries,code-side ul' { display = 'grid' margin = '0' padding = '0' listStyle = 'none' }'#entries li' { display = 'flex' alignItems = 'center' justifyContent = 'space-between' gap = '1rem' margin = '0' paddingRight = '.8rem' borderRadius = radiusSmall }'#entries li:nth-child(odd)' { background = colorBackgroundSunken }'#entries li > a,#entries li > span.file' { flex = '1 1 auto' display = 'flex' alignItems = 'center' minWidth = '0' minHeight = '2.75rem' padding = '0 .8rem' overflowWrap = 'anywhere' }'#entries li > span.muted' { flex = 'none' whiteSpace = 'nowrap' fontSize = '.875rem' }'#entries a.dir' { fontWeight = '700' }'#entries a.dir::after' { content = '"/"' }// a file: the lines scroll sideways INSIDE their box (a 19 000 px line too); the box is as wide as the column. A narrow line-number// gutter (4 digits) on the phonecodeFile { display = 'grid' gap = '.5rem' minWidth = '0' }'#lines' { margin = '0' padding = '.5rem 0' overflowX = 'auto' listStyle = 'none' counterReset = 'line' background = colorBackgroundSunken borderRadius = radiusLarge font = '.875rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace' }'#lines li' { counterIncrement = 'line' whiteSpace = 'pre' minHeight = '1.5em' margin = '0' padding = '0 .8rem 0 0' width = 'max-content' minWidth = '100%' }'#lines li::before' { content = 'counter(line)' display = 'inline-block' width = '4ch' marginRight = '.8rem' paddingLeft = '.5rem' boxSizing = 'content-box' textAlign = 'right' color = colorTextMuted userSelect = 'none' }'#lines code' { padding = '0' font = 'inherit' color = colorTextStrong background = 'transparent' }// branches + latest commits: under the file on a phone, a side column from 60remcodeSide { display = 'grid' gap = '1rem' minWidth = '0' }'code-side section' { display = 'grid' gap = '.4rem' minWidth = '0' }'code-side h2' { fontSize = '1.05rem' }'code-side li' { display = 'flex' flexWrap = 'wrap' alignItems = 'center' gap = '0 .8rem' margin = '0' padding = '0 .5rem' overflowWrap = 'anywhere' borderRadius = radiusSmall }'code-side li:nth-child(odd)' { background = colorBackgroundSunken }'code-side li > a,code-side li > strong' { display = 'inline-flex' alignItems = 'center' minWidth = '2.75rem' minHeight = '2.75rem' }// ---- the repo's tickets (gitoria#10): the list of tickets.worldapi.org's project ----repoTickets { display = 'grid' gap = '1rem' minWidth = '0' }'#newticket summary' { padding = '.7rem .9rem' color = colorAccent }'#newticketform' { display = 'grid' gap = '.75rem' }'#ticketlist,#pulllist,#releaselist' { display = 'grid' gap = '.4rem' margin = '0' padding = '0' listStyle = 'none' }'#ticketlist li,#pulllist li,#releaselist li' { display = 'flex' flexWrap = 'wrap' alignItems = 'center' gap = '0 .8rem' margin = '0' padding = '.1rem 1rem .3rem' background = colorSurface borderRadius = radiusLarge overflowWrap = 'anywhere' }'#ticketlist li > a' { display = 'inline-flex' alignItems = 'center' minHeight = '2.75rem' }'#ticketlist li' { display = 'grid' gridTemplateColumns = '3.25rem minmax(0, 1fr) minmax(3.5rem, auto)' columnGap = '.5rem' alignItems = 'center' } // number, subject and state each in their own column: every row lines up'#ticketlist .number' { justifyContent = 'flex-start' minWidth = '2.75rem' color = colorTextMuted }'#ticketlist .state' { justifySelf = 'end' }'#ticketlist time' { gridColumn = '2 / -1' }'#ticketlist .subject' { fontWeight = '600' paddingBlock = '.2rem' }'#ticketlist .state' { fontSize = '.875rem' color = colorTextMuted }// ---- the repo's pull requests (gitoria#11) — a subject's parts are links in a line of text: each 44 px high ----repoPulls { display = 'grid' gap = '1rem' minWidth = '0' }'#pulllist .subject' { flex = '1 1 100%' minWidth = '0' fontWeight = '600' } // the title on its own row: the state badge no longer squeezes it'#pulllist .subject a' { display = 'inline-block' paddingBlock = '.65rem' }'#pulllist .subject a.ticketref' { minWidth = '2.75rem' textAlign = 'center' }'#pulllist .open' { fontSize = '.875rem' color = colorAccent }'#pulllist .nomerge' { display = 'none' }'#pulllist .merged' { fontSize = '.875rem' color = colorTextMuted }'#pulllist .branches' { display = 'inline-flex' flexWrap = 'wrap' alignItems = 'center' gap = '0 .5rem' }'#pulllist .branches a' { display = 'inline-flex' alignItems = 'center' justifyContent = 'center' minWidth = '2.75rem' minHeight = '2.75rem' }'#pulllist button.mergepr' { marginLeft = 'auto' color = colorAccentText background = colorAccent }// ---- the repo's settings (gitoria#18) and "#12" links to tickets ----repoSettings { display = 'grid' gap = '1rem' minWidth = '0' }'#ticketsettings' { display = 'grid' gap = '.75rem' justifyItems = 'start' }'#disconnecttickets.nomerge' { display = 'none' }'a.ticketref' { fontWeight = '600' }'#connecttickets' { color = colorAccentText background = colorAccent }// ---- the repo's releases (gitoria#12) ----repoReleases { display = 'grid' gap = '1rem' minWidth = '0' }'#releaselist .version' { fontSize = '1.05rem' color = colorAccent }'#releaselist .latest' { fontSize = '.875rem' color = colorTextMuted }'#releaselist .subject' { flex = '1 1 12rem' display = 'inline-flex' alignItems = 'center' minHeight = '2.75rem' }// ---- the 404 page (components/notfound.hl): the wrong address may be one long word ----'#notfound code' { overflowWrap = 'anywhere' }// ---- the failed login (components/loginfailed.hl) ----'#home' { display = 'inline-flex' alignItems = 'center' minHeight = '2.75rem' }// ---- from 60rem (the theme's breakpoint): the code browser gets its side column, the repo list its columns, the signed-out// header shows the selector and the login button themselves (no icon) ----'@media (min-width: 60rem)' = {repoNav = { display = 'flex' flexWrap = 'wrap' gap = '.15rem .25rem' marginInline = '-.75rem' }'repo-nav a' = { padding = '0 .75rem' }'code-browser' = { gridTemplateColumns = 'minmax(0, 1fr) 18rem' alignItems = 'start' columnGap = '2rem' }'code-browser > *' = { gridColumn = '1' }'code-browser > code-side' = { gridColumn = '2' gridRow = '1 / span 4' }'#repos li' = { gridTemplateColumns = 'minmax(10rem, 16rem) 1fr auto' alignItems = 'center' gap = '.15rem 1rem' padding = '.25rem 1rem' }}
Branches
- f1-broken-json
- f2-api-bugs
- gp-gate-ports
- heap-revert
- hl25-records
- ident-chooser-selector
- mainmain branch
- p51-public-pr-reads
- records-1112
- s25-no-session-on-login-error
- v59
- w52-person-approval
- w52b-approval-followup
- w52c-header-phone
- w53-pulls-speed-pr
- w54-repo-rename-pr
- w55-rename-org
- w56-owner-members
- w62-pr-close
- w63-force-push
- w64-org-slash
Latest commits
- ac2c4e3fident selector back in the header (creator 2026-10-24): selector top right signed in and out on phone and desktop, no second Log in button, new gate checks (WIP: gates not re-run after the last edits)mre
- b279f536theme: sync from layouts 4994037 (list rows stack, td word-keep, heading code, edited tap target)mre
- 2b01515ctests/ticketskit: a failed start kills the tickets server (own process group); stop() kills the groupmre
- 109cfc5ctests/ticketskit: keep the rotated session cookie of the tickets login (tickets ST2 session rotation)mre
- 7eb6be27sessions last 99 years (creator 2026-10-23: logins never expire; only sign out ends them)mre
- b3911918reports/MG-mobile.md: 404 fixed, rebased gatesMG
- 9da65b42tests/browser.mjs: 404 checks (host, no hydration wait)MG
- 00517fafgitoria: shell 404 page for unknown paths (catch-all route, status 404, JSON 404 under /api), 390 gate checksMG
- d9e977f0reports/MG-mobile.md, LOGMG
- 2f2725actests/browser.mjs: commit-row check (one row, centred date)MG
- 4df1ea01tests/browser.mjs: MG phone checks (list first, no dead strip, one branch heading, tab grid, commit rows, PR title row, ticket columns, wrapping commands)MG
- c52424e9gitoria mobile: repo list before the forms, 3x2 tab grid, no duplicate branch heading, ordered commit rows, aligned ticket rows, pull title on its own row, wrapping clone commands, no dead strip under formsMG
- 3a95252dG3: cache parsed README blocks by sha256 of the text (bounded LRU), reportmre
- 570138cddeploy: security gate (tests/security.mjs)mre
- da6b20fcgitoria SG: security audit fixes (uploadMax 0, Secure cookie on https, session rotation at login, nosniff on function routes, no identity in page data) + tests/security.mjs gate + reportmre
- f98c981fgitoria B1: report wordingmre
- c6364cedgitoria B1: compact Markdown blocks (one kind flag per block/span, empty and false fields omitted); same rendered HTML, page values -67%mre
- cd99d2feWIP gitoria#22: always render the repo level's slot (missing-repo boot hang), pages render nothing without a repo; hydration diagnosis in reports/G2-hydrate.mdmre
- e5404b9breport: commit idsmre
- 63cfa21ereports/G2-repotabs.mdmre