gitoria
All repositories: gitoria
19.7 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 here'html ident-menu > button.ident-toggle' { width = '2.75rem' height = '2.75rem' }time { 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' minHeight = '1.5em' color = colorDanger }'.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' }// SIGNED OUT: the ident icon at the far right (phone) opens the dropdown with ident's selector and the login button; from 60rem the// dropdown stands open in the header. Signed in (class `in`) it is not shown: the user menu stands there (the selector stays in// the page — /login.js keeps its state).identMenu { display = 'block' flex = 'none' }'ident-menu.in' { display = 'none' }'ident-menu > button.ident-toggle' { minHeight = '0' marginRight = '-.5rem' padding = '0' color = colorText }'ident-menu svg.ident-icon' { width = '2rem' height = '1.32rem' }'svg.ident-icon .ident-d' { fill = colorTextStrong }'svg.ident-icon .ident-d-side' { fill = colorTextMuted }'svg.ident-icon .ident-i' { fill = colorAccent }'#ident-panel:popover-open' { position = 'fixed' inset = 'var(--layout-header) max(var(--layout-gutter), calc((100% - var(--layout-column)) / 2)) auto auto' display = 'grid' gap = '.6rem' width = 'auto' minWidth = '14rem' maxWidth = 'calc(100vw - 2 * var(--layout-gutter))' height = 'auto' margin = '.25rem 0 0' padding = '.75rem' color = colorText background = colorSurface border = '0' borderRadius = radiusLarge boxShadow = '0 .75rem 2rem ' + colorBackgroundSunken }'#ident-panel::backdrop' { background = 'transparent' }// the identity selector (gitoria#14): ident's shadow DOM, restyled to the accent; hidden on a repo address (class onrepo, main.hl:// ident answers only the main address) — the login button staysidentSelector { '--ident-accent' = colorAccent '--ident-accent-text' = colorAccentText '--ident-background' = colorSurface '--ident-border' = colorSurface '--ident-font' = '600 1rem/1.4 system-ui, sans-serif' minWidth = '0' }'ident-selector::part(button)' { minHeight = '2.75rem' padding = '.35rem .8rem' border = 'none' whiteSpace = 'nowrap' }'ident-selector::part(status)' { minHeight = '2.75rem' padding = '.35rem .8rem' border = 'none' }'ident-selector::part(identity)' { minHeight = '2.75rem' border = 'none' }'ident-selector::part(panel)' { border = 'none' }'ident-selector.onrepo' { display = 'none' }'#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. It WRAPS inside its own row (two rows on a phone) —// 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 = 'flex' flexWrap = 'wrap' gap = '.15rem .25rem' minWidth = '0' marginInline = '-.75rem' }'repo-nav a' { display = 'inline-flex' alignItems = 'center' justifyContent = 'center' minWidth = '2.75rem' minHeight = '2.75rem' padding = '0 .75rem' 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 }accessTokens { 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' }// 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 .number' { justifyContent = 'center' minWidth = '2.75rem' marginLeft = '-.5rem' color = colorTextMuted }'#ticketlist .subject' { flex = '1 1 12rem' fontWeight = '600' }'#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 12rem' fontWeight = '600' }'#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' { 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 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)' = {'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' }'ident-menu > button.ident-toggle' = { display = 'none' }'#ident-panel,#ident-panel:popover-open' = { position = 'static' inset = 'auto' display = 'flex' alignItems = 'center' gap = '.5rem' width = 'auto' minWidth = '0' maxWidth = 'none' height = 'auto' margin = '0' padding = '0' overflow = 'visible' color = 'inherit' background = 'transparent' border = '0' boxShadow = 'none' }identSelector = { position = 'relative' }'ident-selector::part(panel)' = { position = 'absolute' top = '100%' right = '0' zIndex = '30' boxShadow = '0 .75rem 2rem ' + colorBackgroundSunken }}
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
Latest commits
- 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
- 9b0516fdgitoria#22: mark the tab underline functional (check-theme), chain E2E: serve/measure split, bring the lisbeth tab to frontmre
- 19bc1df8gitoria#22: all repo pages under ONE layout level (components/repo.hl, hl:web D-CHAIN): a tab click replaces only the page in the slot; head and tab nav stay the same DOM nodesmre
- 40658417tests/browser.mjs: wait for the page to be live (hydrated) before clicking Merge — a click on the server-rendered button before the client mounted was lost (flaky 'Clashing change' under load)mre
- 48a6154bre-vendor Hybriel 5406d146 (hl:web batches 9+10: #72 emits while the socket is closed delivered after reconnect, browser boot linear, faster list appends; contains int 6–14 + m406)mre
- e972e8d7tests: short-id-switch (GITORIA_SWITCH_IDENT_PORT/_PORT) and ssh tunnel (GITORIA_GATE_TUNNEL_PORT) ports from env, defaults unchangedmre
- f06f5349re-vendor Hybriel 6f8a0689 (int 6–11: streaming cursors, #203 index heal + close() fix, fd403 listDir/cursor fds, hl:time browser side, hl:web batches 5+6)mre
- c7d3cc87docker-compose: nofile 65536 (Hybriel int 6+ boot opened >1024 files in the tracker)mre
- f0e7ff8cdeploy: backup copies index files first and *.mpack data last (hot-copy skew, hybriel #203)mre
- fe5f707cgitoria 010: report, mission, comment on why current = true staysmre
- 9705ca86gitoria 010: gate: menu marker in the server HTMLmre
- 8cff663agitoria 010: main-menu.hl from layouts 0bcc629 (route marker)mre
- 359c79f7gitoria 010: re-vendor Hybriel master f9614007 (plugins whole, bin/ git-ignored)mre
- 6bd7fb3cgitoria 009: theme re-copied from layouts 76f99f6 (menu marks the current page), current = true on the menu item, e2e marker checks, reportmre
- 44de915cidentkit: refuse a taken ident port, cold-start deadline, abort on dead ident, clear no-code error (as notes)mre
- 2bf5343egitoria 007: theme re-copied from layouts dbe3de7 (44 px taps), redundant tap overrides dropped, crumbs class, real-browser walk test, reportmre
- 18843648deploy.sh: a gate without a 'passed,' line (check-theme) no longer ends the script silently (grep under pipefail) — print check-theme's summary, as layouts doesmre
- e6dff0cbgitoria#23: report 005, STATUS, LOGmre