gitoriaLog in with ident

components

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit57408b6e57408b6ecomponents#14: installable app (manifest, service worker, offline index), own iconmre57408b6e/styles.hl

3.7 KB

  1. // styles.hl — the SITE's own CSS (page layout: header, main, the home list), served as /__hl/app.css. Every component
  2. // carries its own Style in its file (components/*/*.hl). Tokens: shared/tokens.hl (verbatim copy of loreana worldapi-tokens/tokens.hl);
  3. // the site sets only its accent. In a styles file a bare name is a TAG (camelCase → kebab), a quoted name is a
  4. // selector written verbatim. MOBILE FIRST: every rule is the phone's; the min-width block adds the wide layout.
  5. import { var } from 'hl:web/css'
  6. import { blueLight, colorText, colorBackground, colorTextStrong, colorTextMuted, colorBackgroundSunken, colorSurface, colorBorder, colorAccentText } from './shared/tokens.hl'
  7. colorAccent = var(blueLight) // the site's accent: the only token it sets
  8. '*,
  9. *::before,
  10. *::after' { boxSizing = 'border-box' }
  11. html { colorScheme = 'dark' }
  12. body { margin = '0' font = '16px/1.5 system-ui, sans-serif' color = colorText background = colorBackground }
  13. a { color = colorAccent textDecoration = 'none' }
  14. 'a:hover' { textDecoration = 'underline' }
  15. h1 { margin = '0 0 1rem' fontSize = '1.3rem' lineHeight = '1.3' color = colorTextStrong }
  16. h2 { margin = '0' fontSize = '1.1rem' color = colorTextStrong }
  17. '.muted' { color = colorTextMuted }
  18. button { font = 'inherit' fontWeight = '600' padding = '.4rem .9rem' color = colorAccentText background = colorAccent border = '0' borderRadius = '.4rem' cursor = 'pointer' }
  19. 'button:hover' { filter = 'brightness(1.1)' }
  20. 'button.quiet' { color = colorText background = 'transparent' border = '1px solid ' + colorBorder }
  21. 'button.quiet:hover' { background = colorSurface filter = 'none' }
  22. applicationHeader { position = 'sticky' top = '0' zIndex = '5' display = 'flex' flexWrap = 'wrap' alignItems = 'baseline' gap = '.2rem 1rem' padding = '.6rem 1rem' background = colorBackgroundSunken borderBottom = '1px solid ' + colorBorder }
  23. 'application-header .brand' { fontWeight = '800' fontSize = '1.15rem' color = colorAccent }
  24. 'application-header p' { margin = '0' color = colorTextMuted fontSize = '.9rem' }
  25. // ---- offline (mission 046, components/main.hl): the note under the header, and the probe whose endless animation is
  26. // the shell's 1 s tick (it must be rendered for the animation to run — not display none — so: invisible)
  27. offlineNote { display = 'block' padding = '.5rem 1rem' color = colorTextStrong background = colorSurface }
  28. netProbe { position = 'fixed' left = '0' top = '0' width = '1px' height = '1px' opacity = '0' pointerEvents = 'none' animation = 'components-net-tick 1s linear infinite' }
  29. '@keyframes components-net-tick' = {
  30. 'from' = { opacity = '0' }
  31. to = { opacity = '0' }
  32. }
  33. main { display = 'block' maxWidth = '40rem' margin = '0 auto' padding = '1rem' }
  34. // ---- the home ---------------------------------------------------------------------------------
  35. '#components' { display = 'grid' gap = '.5rem' margin = '0' padding = '0' listStyle = 'none' }
  36. '#components li' { display = 'grid' gap = '.15rem' padding = '.7rem 1rem' background = colorSurface border = '1px solid ' + colorBorder borderRadius = '.5rem' }
  37. '#components p' { margin = '0' color = colorTextMuted }
  38. // ---- the Markdown editor demo ------------------------------------------------------------------
  39. 'md-editor-demo h2' { margin = '1rem 0 .3rem' fontSize = '1rem' }
  40. 'md-editor-demo pre' { margin = '0 0 1rem' whiteSpace = 'pre-wrap' overflowWrap = 'anywhere' }
  41. 'md-editor-demo form > md-editor' { margin = '0 0 1rem' }
  42. // ---- the modal demo --------------------------------------------------------------------------------
  43. '.modal-openers' { display = 'flex' flexWrap = 'wrap' gap = '.5rem' }
  44. 'modal-demo input' { font = 'inherit' padding = '.35rem .6rem' color = colorText background = colorBackgroundSunken border = '1px solid ' + colorBorder borderRadius = '.4rem' }

Branches

Latest commits

  • 57408b6ecomponents#14: installable app (manifest, service worker, offline index), own iconmre
  • 317bd09fdeploy.sh: back up live storage/.sessions/.env before every deploy (newest 5 kept)mre
  • becbd59bcomponents#13: modal dialog (<dialog> based, focus wrap, backdrop/Esc/x close with reason, scroll lock, footer buttons)mre
  • 367dd19adeploy.sh: never send .git or .gitignore to Byrodinmre
  • 4b4dabe5State of 2026-09-27, before the move to gitoriamre