gitoria
All repositories: gitoria
19.5 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/repohead.hl, gitoria#16 — styled only, its markup is gitoria#22's) -------------------------// 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 is marked (the head is not told the page:// CSS reads which view the page holds)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 }'repo-nav a:hover' { textDecoration = 'none' color = colorTextStrong background = colorSurface }'body:has(#repoaddress) repo-nav #navhome,body:has(code-view) repo-nav #navcode,body:has(repo-pulls) repo-nav #navpulls,body:has(repo-releases) repo-nav #navreleases,body:has(repo-tickets) repo-nav #navtickets,body:has(repo-settings) repo-nav #navsettings' { color = colorAccent background = colorSurface }// ---- 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
- w64-org-slash
Latest commits
- 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
- 7f992d62gitoria#23: phone first on the shared theme — brand, branch and pull links 44 px, readme code 14 px; gate block "phone first" (15 pages at 390 + the three dropdowns, fails 20 on old), dropdown-aware login/logout clicks, check-theme in GATESmre
- a2a840a5gitoria#23 WIP (quota stop): theme from layouts, styles inherit it, shell on the theme's header/menus/sidebar, phone measurement script; gates not runmre
- 12b665b0mission brief 005mre
- b680c483Revert "gitoria#22: RepoTabs wrapping component for the repo tabs (active tab, no content for a missing repo)"mre
- 4fda244fgitoria#22: RepoTabs wrapping component for the repo tabs (active tab, no content for a missing repo)mre
- 0fd5e280mission brief 004mre
- e1d425e7paths: projects moved into /media/STORAGE/projects/WorldAPI/mre
- e59ff114deploy.sh: wait up to DEPLOY_URL_WAIT (120 s) for 200 after the restart, as the other apps (cold compile, hybriel#148)mre
- bcafcceb003: compose cache volume + tmpfs /tmp, gate start waits 120 s, report/LOG/STATUSmre
- bed3f2d5Re-vendor Hybriel to the shared static build 0f396652 (plugins; bin/ is git-ignored)mre
- 3207e128mission brief 003mre
- 18ab71fbtests/ticketskit: wait up to 120 s for tickets (native Hybriel cold compile ~25 s, hybriel#148)mre