gitoria

notes

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit3e7e79f53e7e79f5reports/H1-hydrate.mdmre3e7e79f5/components/styles.hl

5.6 KB

  1. // components/styles.hl — the app's own CSS, served as /__hl/app.css. It INHERITS THE WORLDAPI THEME (theme/theme.hl, copied
  2. // verbatim from layouts.worldapi.org dbe3de7 — never edited here) and adds only what the notes need: the ident login in the
  3. // header, the note list and the editor's frame. Components carry no Style blocks: markup is domain tags (<note-list>,
  4. // <note-reader>, <note-editor>, …), this file lays them out. The layout is the theme's list-first shell (theme/shell/list-first.hl:
  5. // the list on the phone, a tap opens the note alone; side by side from 60rem), the header the theme's AppHeader.
  6. // Tokens: shared/tokens.hl (layouts' file, byte-equal); the app sets only its accent (yellow). Borderless:
  7. // `node theme/check-theme.mjs .` must report 0 problems (a deploy gate).
  8. // In a styles file a bare name is a TAG (camelCase → kebab), a quoted name is a selector written verbatim; a selector the theme
  9. // already writes may not be written again (hl:web refuses it) — the theme's own elements (links, headings, fields, buttons,
  10. // `.muted`, `p.empty`, the 44 px taps) are NOT repeated here.
  11. // MOBILE FIRST: every rule outside a block is the phone's; the one `@media (min-width: 60rem)` block only ADDS the wide layout.
  12. inherit '../theme/theme.hl'
  13. import { var } from 'hl:web/css'
  14. import { yellow, colorText, colorTextStrong, colorTextMuted, colorBackgroundSunken, colorAccentText, colorSurface, colorDanger } from '../shared/tokens.hl'
  15. colorAccent = var(yellow) // the app's accent: the only token this app sets
  16. '.message' { color = colorDanger }
  17. '.message:empty' { display = 'none' }
  18. '#loginerror' { margin = '0' padding = '.5rem var(--layout-gutter)' background = colorBackgroundSunken }
  19. // ---- the login in the header (components/main.hl) -------------------------------------------------------------------------
  20. // SIGNED OUT: the ident icon at the far right (phone) opens the dropdown with ident's selector and the login button; from 60rem
  21. // they stand in the header. Signed in (class `in`) it is not shown: the user menu stands there (the selector stays in the page,
  22. // /login.js keeps its state).
  23. identMenu { display = 'block' flex = 'none' }
  24. 'ident-menu.in' { display = 'none' }
  25. 'ident-menu > button.ident-toggle' { width = layoutTap height = layoutTap marginRight = '-.5rem' padding = '0' color = colorText }
  26. 'ident-menu svg.ident-icon' { width = '2rem' height = '1.32rem' }
  27. 'svg.ident-icon .ident-d' { fill = colorTextStrong }
  28. 'svg.ident-icon .ident-d-side' { fill = colorTextMuted }
  29. 'svg.ident-icon .ident-i' { fill = colorAccent }
  30. '#ident-panel:popover-open' { position = 'fixed' inset = 'var(--layout-header) var(--layout-gutter) 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 }
  31. '#ident-panel::backdrop' { background = 'transparent' }
  32. // ident's selector (its shadow DOM in ident's design, restyled to the accent through its custom properties and parts)
  33. identSelector { '--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' }
  34. 'ident-selector::part(button)' { minHeight = layoutTap padding = '.35rem .8rem' whiteSpace = 'nowrap' }
  35. 'ident-selector::part(status)' { minHeight = layoutTap padding = '.35rem .8rem' }
  36. 'ident-selector::part(identity)' { minHeight = layoutTap }
  37. // ---- the notes: the list (list-first's aside) and the opened note (its main) ------------------------------------------------
  38. noteList { display = 'grid' gap = '.6rem' alignContent = 'start' }
  39. 'note-list > header' { display = 'flex' alignItems = 'center' justifyContent = 'space-between' gap = '1rem' }
  40. 'note-list h1' { margin = '0' }
  41. 'note-list p' { margin = '0' }
  42. '#notes' { margin = '0' padding = '0' listStyle = 'none' }
  43. noteReader { display = 'block' minWidth = '0' }
  44. noteEditor { display = 'grid' gridTemplateColumns = 'minmax(0, 1fr)' gap = '.8rem' }
  45. // the editor's wrapper: a block that may shrink (a wide table scrolls inside the editor, it does not widen the page)
  46. noteText { display = 'block' minWidth = '0' }
  47. 'note-editor footer' { display = 'flex' flexWrap = 'wrap' alignItems = 'center' gap = '.6rem' }
  48. 'note-editor a.back' { marginBottom = '0' }
  49. '.ask' { display = 'none' alignItems = 'center' gap = '.6rem' margin = '0' }
  50. '.ask.open' { display = 'flex' flexWrap = 'wrap' }
  51. // the page's clock (components/notes.hl): an invisible endless 1 s animation, each round is a tick
  52. notesTick { position = 'fixed' left = '0' top = '0' width = '1px' height = '1px' opacity = '0' pointerEvents = 'none' animation = 'notes-tick 1s linear infinite' }
  53. '@keyframes notes-tick' = {
  54. 'from' = { opacity = '0' }
  55. to = { opacity = '0' }
  56. }
  57. '@media (min-width: 60rem)' = {
  58. // signed out, from 60rem the selector and the login button stand in the header themselves (no icon, no dropdown)
  59. 'ident-menu > button.ident-toggle' = { display = 'none' }
  60. '#ident-panel,
  61. #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' }
  62. identSelector = { position = 'relative' }
  63. 'ident-selector::part(panel)' = { position = 'absolute' top = '100%' right = '0' zIndex = '30' boxShadow = '0 .75rem 2rem ' + colorBackgroundSunken }
  64. }

Branches

Latest commits

  • 3e7e79f5reports/H1-hydrate.mdmre
  • d98775e8tests/browser.mjs: wait for hydration before the clicks after a goto('/') (tables new note, phone sidebar)mre
  • 1f3198b6tests/cdp.mjs: HL_CPU_THROTTLE=<rate> optional CPU throttling for gate runsmre
  • 39cf9fdfre-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
  • db07aa84tests: short-id-switch ports from env (NOTES_SWITCH_IDENT_PORT/_PORT), defaults unchangedmre
  • ef9f9feere-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
  • 5485467cdocker-compose: nofile 65536 (Hybriel int 6+ boot opened >1024 files in the tracker)mre
  • 86ea4a85deploy: backup copies index files first and *.mpack data last (hot-copy skew, hybriel #203)mre
  • edeab20fnotes mission 015: mission, report, LOG, STATUSmre
  • 542a0383notes mission 015: e2e-chrome E2E_HOST (own cookie jar in the shared Chrome)mre
  • 8b30f510notes mission 015: main-menu from layouts 0bcc629, current = true kept (route marks only /), server-HTML marker checksmre
  • 84b574c4notes mission 015: re-vendor plugins from hybriel f9614007 (incl. web, #117)mre
  • 447da53dnotes mission 014: report — remaining gates and lisbeth E2E proofmre
  • fd9f92c3notes mission 014: report (partial), LOG, STATUSmre
  • b2501360notes mission 014: open() sets asking=false before flush(0) (hybriel#196)mre
  • 9414ce59notes mission 014: merge theme 76f99f6, components 3794c59, strict single-press openAsk (fails on old open())mre
  • c08c655anotes 013: theme re-copied from layouts 76f99f6 (menu marks the current page), current = true on the menu item, e2e marker checks, reportmre
  • 21c8f65dnotes mission 012: STATUSmre
  • 0bbb3dd9notes mission 012: delete section of the browser gate de-flaked (openAsk: calm wait, press again when the question closes by itself); report 012mre
  • f431bdf8notes mission 011: notes on the layouts theme (ListFirst shell), styles cut, check-theme gate, E2E extended; reportmre