gitoriaLog in with ident

ident

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Main branchmain5fdbb6b2ident mission 009: report — scratch folder notemremain/components/styles.hl

12.2 KB

  1. // styles.hl — ALL of the app's CSS, served as /__hl/app.css. Components carry no Style
  2. // blocks: markup is domain tags (<ident-card>, <app-request>, …), this file lays them out.
  3. //
  4. // TOKENS (ticket antcolony#3, mission 021): the WorldAPI palette + semantic tokens are declared in
  5. // `shared/tokens.hl` as hl:web css variables (`static colorText = var(light)`), hand-written, a
  6. // verbatim copy of loreana /media/STORAGE/projects/worldapi-tokens/tokens.hl (vendored like
  7. // plugins/; edit it THERE and cp it here). This file IMPORTS the tokens it uses and writes them as
  8. // members (`color = colorText`, `border = '1px solid ' + colorBorder`); hl:web names each token
  9. // after its member (--color-text), writes all of tokens.hl's tokens into the one :root and every
  10. // use as var(--color-text). The app sets only its accent (`colorAccent = var(…)` below, written
  11. // after the default, so it wins). hl:web does this itself since hybriel#39 (the mission-021 patch is gone).
  12. //
  13. // In a styles file a bare name is a TAG (camelCase → kebab: `identCard` is
  14. // `ident-card`), a quoted name is a selector written verbatim. MOBILE FIRST: every
  15. // rule is the phone's; the one min-width block adds the wide layout.
  16. import { var } from 'hl:web/css'
  17. import { orange, colorText, colorBackground, colorTextStrong, colorBackgroundSunken, colorTextMuted, colorAccentText, colorBorder, colorDanger, colorSurface, colorSuccess, colorWarning } from '../shared/tokens.hl'
  18. colorAccent = var(orange) // the app's accent: the only token this app sets
  19. '*,
  20. *::before,
  21. *::after' { boxSizing = 'border-box' }
  22. html { colorScheme = 'dark' }
  23. body { margin = '0' font = '16px/1.5 system-ui, sans-serif' color = colorText background = colorBackground }
  24. a { color = colorAccent textDecoration = 'none' }
  25. 'a:hover' { textDecoration = 'underline' }
  26. h1 { margin = '0' fontSize = '1.3rem' lineHeight = '1.3' color = colorTextStrong }
  27. h2 { margin = '0' fontSize = '1.1rem' lineHeight = '1.3' color = colorTextStrong }
  28. strong { color = colorTextStrong overflowWrap = 'anywhere' }
  29. input { font = 'inherit' width = '100%' padding = '.55rem .7rem' color = colorTextStrong background = colorBackgroundSunken border = '1px solid ' + colorBorder borderRadius = '.4rem' }
  30. 'input:focus' { outline = '2px solid ' + colorAccent outlineOffset = '1px' }
  31. '#code' { fontSize = '1.4rem' letterSpacing = '.3em' fontVariantNumeric = 'tabular-nums' }
  32. label { display = 'grid' gap = '.25rem' fontSize = '.9rem' color = colorTextMuted }
  33. 'button,
  34. a.button' { display = 'inline-block' font = 'inherit' fontWeight = '600' padding = '.6rem 1.1rem' color = colorAccentText background = colorAccent border = '1px solid ' + colorAccent borderRadius = '.4rem' cursor = 'pointer' justifySelf = 'start' textAlign = 'center' }
  35. 'button:hover,
  36. a.button:hover' { filter = 'brightness(1.1)' textDecoration = 'none' }
  37. 'button.quiet' { color = colorText background = 'transparent' borderColor = colorBorder }
  38. 'button.small' { padding = '.3rem .7rem' fontSize = '.9rem' }
  39. 'button.danger' { color = colorDanger borderColor = colorDanger }
  40. // ---- the shell ---------------------------------------------------------------------------
  41. applicationHeader { display = 'flex' flexWrap = 'wrap' alignItems = 'baseline' gap = '.2rem 1rem' padding = '.6rem 1rem' background = colorBackgroundSunken borderBottom = '1px solid ' + colorBorder }
  42. 'application-header .brand' { fontWeight = '800' fontSize = '1.15rem' color = colorAccent }
  43. 'application-header .tagline' { color = colorTextMuted fontSize = '.85rem' }
  44. main { padding = '1rem' }
  45. // offline (mission 046): the header's note, and the probe's clock (components/main.hl)
  46. offlineNote { flexBasis = '100%' color = colorWarning fontSize = '.9rem' fontWeight = '600' }
  47. netProbe { position = 'absolute' width = '0' height = '0' overflow = 'hidden' animation = 'ident-net-probe 20s .5s infinite' }
  48. '@keyframes ident-net-probe' = { 'from' = { opacity = '1' } to = { opacity = '0.99' } }
  49. // ---- the card (login and signed in) ------------------------------------------------------------------------
  50. identCard { display = 'grid' gap = '1rem' maxWidth = '34rem' margin = '0 auto' padding = '1.2rem 1rem' background = colorSurface border = '1px solid ' + colorBorder borderRadius = '.6rem' }
  51. 'ident-card p' { margin = '0' }
  52. 'ident-card form' { display = 'grid' gap = '.8rem' }
  53. 'ident-card .lead' { color = colorTextMuted fontSize = '.95rem' }
  54. userEmail { display = 'block' color = colorTextMuted fontSize = '.9rem' overflowWrap = 'anywhere' }
  55. formButtons { display = 'flex' flexWrap = 'wrap' gap = '.5rem' }
  56. '.message' { margin = '0' minHeight = '1.5em' color = colorDanger }
  57. '.notice' { margin = '0' color = colorSuccess }
  58. '.notice:empty' { display = 'none' }
  59. fieldHint { color = colorTextMuted fontSize = '.8rem' }
  60. // ---- signed in: account bar, identities, time zone -----------------------------------------
  61. accountBar { display = 'flex' flexWrap = 'wrap' alignItems = 'center' justifyContent = 'space-between' gap = '.5rem' paddingBottom = '.8rem' borderBottom = '1px solid ' + colorBorder }
  62. 'account-bar user-email' { fontSize = '.95rem' }
  63. 'ident-card section' { display = 'grid' gap = '.8rem' }
  64. sectionHead { display = 'flex' flexWrap = 'wrap' alignItems = 'center' justifyContent = 'space-between' gap = '.5rem' }
  65. '#identities' { listStyle = 'none' margin = '0' padding = '0' display = 'grid' gap = '.5rem' }
  66. '#identities li' { display = 'flex' flexWrap = 'wrap' alignItems = 'center' justifyContent = 'space-between' gap = '.5rem' padding = '.7rem .8rem' background = colorBackgroundSunken border = '1px solid ' + colorBorder borderRadius = '.4rem' }
  67. identityMain { flex = '1 1 12rem' display = 'flex' flexWrap = 'wrap' alignItems = 'baseline' gap = '.2rem .5rem' minWidth = '0' }
  68. identityLabel { fontWeight = '700' color = colorTextStrong overflowWrap = 'anywhere' }
  69. identityShortId { fontFamily = 'ui-monospace, monospace' fontSize = '.85rem' color = colorTextMuted letterSpacing = '.08em' userSelect = 'all' }
  70. defaultBadge { fontSize = '.75rem' padding = '0 .4rem' color = colorAccent border = '1px solid ' + colorAccent borderRadius = '1rem' }
  71. identityDetails { flexBasis = '100%' color = colorTextMuted fontSize = '.9rem' overflowWrap = 'anywhere' }
  72. identityActions { display = 'flex' gap = '.4rem' }
  73. '#identities img.avatar, #chooselist img.avatar' { flex = '0 0 auto' width = '32px' height = '32px' objectFit = 'cover' borderRadius = '50%' background = colorSurface }
  74. '#identityform' { padding = '1rem' border = '1px solid ' + colorAccent borderRadius = '.5rem' }
  75. '#avatarpreview' { width = '48px' height = '48px' objectFit = 'cover' borderRadius = '50%' background = colorSurface }
  76. '#avatarpreview.hidden, #avatarremove.hidden' { display = 'none' }
  77. avatarField { display = 'flex' flexWrap = 'wrap' alignItems = 'center' gap = '.6rem' }
  78. '.avatar-note' { flexBasis = '100%' color = colorDanger fontSize = '.85rem' }
  79. '.avatar-note:empty' { display = 'none' }
  80. '#timezonesection' { paddingTop = '.8rem' borderTop = '1px solid ' + colorBorder }
  81. 'application-header nav' { display = 'flex' gap = '1rem' marginLeft = 'auto' fontSize = '.95rem' }
  82. // ---- the login button: the app's request and the identity choice ------------------------
  83. appRequest { display = 'block' padding = '.6rem .8rem' color = colorText background = colorBackgroundSunken borderLeft = '3px solid ' + colorAccent borderRadius = '.3rem' overflowWrap = 'anywhere' }
  84. requestOrigin { display = 'block' color = colorTextMuted fontSize = '.85rem' }
  85. '#chooselist' { listStyle = 'none' margin = '0' padding = '0' display = 'grid' gap = '.5rem' }
  86. '#chooselist li' { display = 'flex' flexWrap = 'wrap' alignItems = 'center' justifyContent = 'space-between' gap = '.5rem' padding = '.7rem .8rem' background = colorBackgroundSunken border = '1px solid ' + colorBorder borderRadius = '.4rem' }
  87. // ---- apps ----------------------------------------------------------------------------------
  88. '#apps' { listStyle = 'none' margin = '0' padding = '0' display = 'grid' gap = '.5rem' }
  89. '#apps li' { display = 'flex' flexWrap = 'wrap' alignItems = 'center' justifyContent = 'space-between' gap = '.5rem' padding = '.7rem .8rem' background = colorBackgroundSunken border = '1px solid ' + colorBorder borderRadius = '.4rem' }
  90. appMain { flex = '1 1 14rem' display = 'grid' gap = '.15rem' minWidth = '0' }
  91. appName { fontWeight = '700' color = colorTextStrong overflowWrap = 'anywhere' }
  92. appOrigins { color = colorTextMuted fontSize = '.9rem' overflowWrap = 'anywhere' }
  93. appKey { fontSize = '.85rem' color = colorTextMuted overflowWrap = 'anywhere' }
  94. code { fontFamily = 'ui-monospace, monospace' fontSize = '.85rem' color = colorTextStrong overflowWrap = 'anywhere' wordBreak = 'break-all' }
  95. secretBox { display = 'grid' gap = '.6rem' padding = '1rem' border = '1px solid ' + colorWarning borderRadius = '.5rem' }
  96. 'secret-box code' { display = 'block' padding = '.5rem .6rem' background = colorBackgroundSunken borderRadius = '.3rem' userSelect = 'all' }
  97. '#appform' { padding = '1rem' border = '1px solid ' + colorAccent borderRadius = '.5rem' }
  98. // ---- notifications: the inbox and the per-app page (piece 4) --------------------------------
  99. 'ident-card.wide' { maxWidth = '46rem' }
  100. unreadTotal { color = colorAccent fontSize = '.9rem' fontWeight = '600' }
  101. '#inbox,
  102. #conns,
  103. #kinds' { listStyle = 'none' margin = '0' padding = '0' display = 'grid' gap = '.5rem' }
  104. '#inbox li' { display = 'flex' alignItems = 'flex-start' gap = '.7rem' padding = '.7rem .8rem' background = colorBackgroundSunken border = '1px solid ' + colorBorder borderRadius = '.4rem' }
  105. '#inbox li.unread' { borderLeft = '3px solid ' + colorAccent }
  106. '#inbox li.read' { opacity = '.75' }
  107. '#inbox img.icon' { flex = '0 0 auto' width = '40px' height = '40px' objectFit = 'cover' borderRadius = '.3rem' background = colorSurface }
  108. noteMain { flex = '1 1 auto' display = 'grid' gap = '.25rem' minWidth = '0' }
  109. noteHead { display = 'flex' flexWrap = 'wrap' alignItems = 'baseline' gap = '.2rem .5rem' }
  110. noteName { fontWeight = '700' color = colorTextStrong overflowWrap = 'anywhere' }
  111. urgentBadge { fontSize = '.75rem' padding = '0 .4rem' color = colorDanger border = '1px solid ' + colorDanger borderRadius = '1rem' }
  112. unreadBadge { fontSize = '.75rem' padding = '0 .4rem' color = colorAccent border = '1px solid ' + colorAccent borderRadius = '1rem' }
  113. noteFrom { color = colorTextMuted fontSize = '.85rem' overflowWrap = 'anywhere' }
  114. noteText { whiteSpace = 'pre-wrap' overflowWrap = 'anywhere' }
  115. noteFoot { display = 'flex' flexWrap = 'wrap' alignItems = 'center' gap = '.4rem .8rem' color = colorTextMuted fontSize = '.85rem' }
  116. 'note-foot .toggle' { marginLeft = 'auto' }
  117. '#connsection,
  118. #kindssection,
  119. #overridesection' { paddingTop = '.8rem' borderTop = '1px solid ' + colorBorder }
  120. '#conns li,
  121. #kinds li' { display = 'flex' flexWrap = 'wrap' alignItems = 'center' justifyContent = 'space-between' gap = '.5rem' padding = '.7rem .8rem' background = colorBackgroundSunken border = '1px solid ' + colorBorder borderRadius = '.4rem' }
  122. '#conns a.conn' { fontWeight = '700' overflowWrap = 'anywhere' }
  123. connDetails { color = colorTextMuted fontSize = '.9rem' overflowWrap = 'anywhere' }
  124. kindMain { flex = '1 1 12rem' display = 'grid' gap = '.15rem' minWidth = '0' }
  125. kindName { fontWeight = '700' color = colorTextStrong overflowWrap = 'anywhere' }
  126. kindPreset { color = colorTextMuted fontSize = '.85rem' overflowWrap = 'anywhere' }
  127. kindSwitches { display = 'flex' gap = '1rem' }
  128. switchRow { display = 'flex' alignItems = 'center' gap = '.5rem' }
  129. switchLabel { fontSize = '.9rem' color = colorTextMuted }
  130. 'button.switch' { minWidth = '3.6rem' padding = '.25rem .6rem' fontSize = '.85rem' color = colorText background = 'transparent' borderColor = colorBorder }
  131. 'button.switch[aria-checked="true"]' { color = colorAccentText background = colorAccent borderColor = colorAccent }
  132. 'button.switch.locked' { opacity = '.45' cursor = 'not-allowed' }
  133. switchOff { display = 'inline-block' minWidth = '3.6rem' textAlign = 'center' color = colorTextMuted }
  134. '#overridesection switch-row' { justifyContent = 'space-between' maxWidth = '16rem' }
  135. '@media (min-width: 40rem)' = {
  136. main = { padding = '3rem 1rem' }
  137. 'ident-card' = { padding = '1.8rem 2rem' }
  138. h1 = { fontSize = '1.5rem' }
  139. }

Branches

Latest commits

  • 5fdbb6b2ident mission 009: report — scratch folder notemre
  • 74235815ident mission 009 (4/4): docs (README files map + same-output test, STATUS, LOG), report, tests/letcount.py + realdata-baseline/comparemre
  • fe183516ident mission 009 (3/4): let only where reassigned — 293 never-reassigned lets are plain declarations; kept: reassigned, loop bodies, names of a file member, a name declared twice in one function; same outputmre
  • d2e7f91bident mission 009 (2/4): one lib file per topic (login, accounts, identities, apps, invites, selector, notify + helpers, util), function routes as thin wrappers in lib/api.hl, project.hl = the map; same outputmre
  • 91017164ident mission 009 (1/4): file moves — the root .hl files into lib/ (api.hl → lib/api-helpers.hl), styles.hl → components/styles.hl; imports adjusted, no other changemre
  • f8bdcbc2ident: Hybriel master 06617221 (plugin allocators 3a781359 + 413f60e4, mpackdb 2cb7ae5e, http1 773de63e); all gates greenmre
  • ff78726cident: Hybriel master 190aa11d (fc838894 GC correctness, #127, #126 closure scopes); gates all greenmre
  • a3a7d21aident: Hybriel master 8efba065 (#126 GC by bytes, #48 lambda params copy); session-writing lambdas take &sessionmre
  • 98226b41antcolony#40: mission references point to the moved missionsmre
  • ff805b9aantcolony#40: history (LOG.md), worker briefs (missions/) and reports moved here from antcolony, numbered per project; old numbers in antcolony docs/mission-map.mdmre
  • 51a7bcdfident: Hybriel master 73267707 (#122); /code uses the new page() signature; pending address passed as parameter; once-checksmre
  • 836f644fident#24: installable app (manifest, service worker, data-free offline /start), own iconmre
  • 8bebbbf2deploy.sh: back up live storage/.sessions/.env before every deploy (newest 5 kept)mre
  • cc063ea2deploy.sh: never send .git or .gitignore to Byrodinmre
  • 81b15b7bState of 2026-09-27, before the move to gitoriamre