notes
All repositories: gitoria
5.6 KB
// components/styles.hl — the app's own CSS, served as /__hl/app.css. It INHERITS THE WORLDAPI THEME (theme/theme.hl, copied// verbatim from layouts.worldapi.org dbe3de7 — never edited here) and adds only what the notes need: the ident login in the// header, the note list and the editor's frame. Components carry no Style blocks: markup is domain tags (<note-list>,// <note-reader>, <note-editor>, …), this file lays them out. The layout is the theme's list-first shell (theme/shell/list-first.hl:// the list on the phone, a tap opens the note alone; side by side from 60rem), the header the theme's AppHeader.// Tokens: shared/tokens.hl (layouts' file, byte-equal); the app sets only its accent (yellow). 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) — the theme's own elements (links, headings, fields, buttons,// `.muted`, `p.empty`, the 44 px taps) are NOT repeated here.// MOBILE FIRST: every rule outside a block is the phone's; the one `@media (min-width: 60rem)` block only ADDS the wide layout.inherit '../theme/theme.hl'import { var } from 'hl:web/css'import { yellow, colorText, colorTextStrong, colorTextMuted, colorBackgroundSunken, colorAccentText, colorSurface, colorDanger } from '../shared/tokens.hl'colorAccent = var(yellow) // the app's accent: the only token this app sets'.message' { color = colorDanger }'.message:empty' { display = 'none' }'#loginerror' { margin = '0' padding = '.5rem var(--layout-gutter)' background = colorBackgroundSunken }// ---- the login in the header (components/main.hl) -------------------------------------------------------------------------// SIGNED OUT: the ident icon at the far right (phone) opens the dropdown with ident's selector and the login button; from 60rem// they stand 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' { width = layoutTap height = layoutTap 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) 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 }'#ident-panel::backdrop' { background = 'transparent' }// ident's selector (its shadow DOM in ident's design, restyled to the accent through its custom properties and parts)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' }'ident-selector::part(button)' { minHeight = layoutTap padding = '.35rem .8rem' whiteSpace = 'nowrap' }'ident-selector::part(status)' { minHeight = layoutTap padding = '.35rem .8rem' }'ident-selector::part(identity)' { minHeight = layoutTap }// ---- the notes: the list (list-first's aside) and the opened note (its main) ------------------------------------------------noteList { display = 'grid' gap = '.6rem' alignContent = 'start' }'note-list > header' { display = 'flex' alignItems = 'center' justifyContent = 'space-between' gap = '1rem' }'note-list h1' { margin = '0' }'note-list p' { margin = '0' }'#notes' { margin = '0' padding = '0' listStyle = 'none' }noteReader { display = 'block' minWidth = '0' }noteEditor { display = 'grid' gridTemplateColumns = 'minmax(0, 1fr)' gap = '.8rem' }// the editor's wrapper: a block that may shrink (a wide table scrolls inside the editor, it does not widen the page)noteText { display = 'block' minWidth = '0' }'note-editor footer' { display = 'flex' flexWrap = 'wrap' alignItems = 'center' gap = '.6rem' }'note-editor a.back' { marginBottom = '0' }'.ask' { display = 'none' alignItems = 'center' gap = '.6rem' margin = '0' }'.ask.open' { display = 'flex' flexWrap = 'wrap' }// the page's clock (components/notes.hl): an invisible endless 1 s animation, each round is a ticknotesTick { position = 'fixed' left = '0' top = '0' width = '1px' height = '1px' opacity = '0' pointerEvents = 'none' animation = 'notes-tick 1s linear infinite' }'@keyframes notes-tick' = {'from' = { opacity = '0' }to = { opacity = '0' }}'@media (min-width: 60rem)' = {// signed out, from 60rem the selector and the login button stand in the header themselves (no icon, no dropdown)'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
Latest commits
- c08c655anotes 013: theme re-copied from layouts 76f99f6 (menu marks the current page), current = true on the menu item, e2e marker checks, reportmre
- 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