gitoria

notes

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit0bbb3dd90bbb3dd9notes mission 012: delete section of the browser gate de-flaked (openAsk: calm wait, press again when the question closes by itself); report 012mre0bbb3dd9/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

  • 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
  • 1a8603d1notes mission 011 WIP: deploy.sh gate summary also matches check-theme, browser.mjs logout via the user menumre
  • dae2e508notes mission 011 WIP: theme dbe3de7, shell on AppHeader/MainMenu/UserMenu/Sidebar + ListFirst, styles cut to the app's own, check-theme gate, e2e auditmre
  • fd36da27notes mission 010: the note editor is the Hybriel MdEditor block (components.hybriel 1442e58, verbatim); md-editor.js, its route, script tag and offlineFiles retired; gate 66/0, realdata-offline 12/0, round-trip and Chrome E2E tests; report 010mre
  • efa92170notes tests/identkit.mjs: refuse a taken ident port, cold-wait deadline, emit, identities; mission 009 reportmre
  • f3dec0f1Merge branch 'w7'mre
  • d1cf966dre-vendor hybriel 97bcf128: offlineFiles for the editor script, 44 px taps, 390 px offline checks, mission 008mre
  • 4a610a21paths: projects moved into /media/STORAGE/projects/WorldAPI/mre
  • eeaea980report 007: say which runs included the removed checkmre
  • 8a8ad9banotes mission 007: report, LOG, STATUSmre
  • 2cce9c96code order: plain declarations where never reassigned (letcount 0 never); gate: scan every IndexedDB at log-out, soft mode for old-code runs, drop a check that could not failmre
  • 7f6a4090README: offline in Hybriel (hl:web offline, continuation, known md-editor gap); gate waits report instead of crash; realdata-offline checkmre
  • 632223f2notes#4: delete notes-offline.js and sw.js (hl:web's generated worker and kept state replace them)mre
  • 52a2acadgate: offline checks on hl:web's worker/queue, Chrome offline via CDP (reload offline first), one-offline conflict, log-out forgets the kept copymre
  • e5785b03notes#4: the notes page in Hybriel — hl:web offline = [Notes], queued faces notesPut/notesDrop, push notesChanged, value-form notesPull on a tick; notes-offline.js/sw.js no longer loaded or routedmre
  • 510aff75notes#4: server continues a run of saves of one login (by + since), loser keeps writing into its copy; notesFor listmre
  • 0176c4b5mission brief 007mre
  • 06cfa870notes mission 006: re-vendor hybriel 0f396652 (static), reportmre
  • 6c07bd91mission brief w6mre