calendar
All repositories: gitoria
6.9 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 calendar needs: the ident login in the// header, the events on the days and the editor's frame. The month view carries its own layout Style (components/month-view, a// fork); the theme already tiles its day cells and removes its frames. Markup is domain tags, this file lays them out.// Layout: the theme's content-first shell (components/main.hl), the header the theme's AppHeader.// Tokens: shared/tokens.hl (layouts' file, byte-equal); the app sets only its accent (light blue). 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`, the 44 px taps) are NOT repeated here.// MOBILE FIRST: every rule outside a block is the phone's (taps ≥ 44 px, fields 16 px); the one `@media (min-width: 60rem)` block// only ADDS the wide layout (the day's event chips go dense there, on purpose).inherit '../theme/theme.hl'import { var } from 'hl:web/css'import { blueLight, colorText, colorTextStrong, colorTextMuted, colorBackgroundSunken, colorAccentText, colorSurface, colorDanger } from '../shared/tokens.hl'colorAccent = var(blueLight) // 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 events on the days (the month view's cells) --------------------------------------------------------------------// PHONE: a cell is 48 px wide, so a chip is the cell's width and at least layoutTap (44 px, the theme's button size) high; its// text is cut with an ellipsis. The cell has no side padding so the chip may be that wide.dayEvents { display = 'grid' gap = '.15rem' marginTop = '.2rem' textAlign = 'left' }'button.unused' { display = 'none' }'button.hidden' { display = 'none' }'button.event,button.more' { display = 'block' minWidth = '0' width = '100%' padding = '.15rem .2rem' overflow = 'hidden' fontSize = '.75rem' fontWeight = '500' lineHeight = '1.3' textAlign = 'left' textOverflow = 'ellipsis' whiteSpace = 'nowrap' color = colorAccent background = colorBackgroundSunken }'button.more' { color = colorTextMuted background = 'transparent' }'#notify-ask' { color = colorAccentText background = colorAccent }// the switches (time/all day, the event's own reminders or the calendar's): the chosen one is the accent, the other `quiet`'kind-switch button:not(.quiet)' { color = colorAccentText background = colorAccent }// ---- the editors (event, reminder settings): a full-page scrim with one panel -----------------------------------------------eventEditor { position = 'fixed' inset = '0' zIndex = '40' display = 'grid' placeItems = 'center' padding = '1rem' background = 'color-mix(in srgb, ' + colorBackgroundSunken + ' 82%, transparent)' }'event-editor.closed' { display = 'none' }'event-editor form' { display = 'grid' gap = '.7rem' width = '100%' maxWidth = '28rem' maxHeight = '100%' overflowY = 'auto' padding = '1rem' background = colorSurface borderRadius = radiusLarge }'event-editor h2' { margin = '0' }'event-editor label' { display = 'grid' gap = '.2rem' margin = '0' fontSize = '.85rem' fontWeight = '400' color = colorTextMuted }'event-editor input,event-editor textarea' { width = '100%' color = colorTextStrong }fieldRow { display = 'grid' gridTemplateColumns = 'minmax(0, 1fr) minmax(0, 1fr)' gap = '.5rem' }'form.allday label.timed' { display = 'none' }'form.allday field-row' { gridTemplateColumns = 'minmax(0, 1fr)' }'kind-switch,form-buttons' { display = 'flex' flexWrap = 'wrap' gap = '.5rem' }'form-buttons button.danger' { marginLeft = 'auto' }'@media (min-width: 60rem)' = {// the desktop's chips are small on purpose (a pointer; four of them stand in one cell): under 44 px, deliberately'button.event,button.more' = { minHeight = '0' padding = '.05rem .3rem' borderRadius = radiusSmall }// 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
- 90bf9e2ecalendar mission 006 WIP: theme dbe3de7, theme shell (AppHeader/MainMenu/UserMenu/Sidebar/ContentFirst), styles cut to the app's own rules, check-theme gate, e2e toolsmre
- 3c5604f9identkit: refuse a taken ident port, cold-start deadline, abort on dead ident, clear no-code error (as notes)mre
- 4996bbe7paths: projects moved into /media/STORAGE/projects/WorldAPI/mre
- f5bf0803calendar mission 004: re-vendor Hybriel to the shared static build 0f396652; compose cache volume + tmpfs; notify-paths gate in deploy.sh; gate start waits 150 s; reportmre
- eb86526fmission brief 004mre
- 2f953b16deploy.sh: wait up to DEPLOY_URL_WAIT (120 s) for 200 after the restart, as the other apps (cold compile, hybriel#148)mre
- 9078e1b7calendar mission 003 (2/2): report, LOG, STATUS (cause: timers only in an open, front, touched page; gate old 5/2 new 7/0; Hybriel gaps Web Push + page-shown hook, STOP)mre
- 31ffe910calendar mission 003 (1/2): calendar#9 — missed reminders shown when the app is back, timers set again when it is shownmre
- 26c997d3mission brief 003mre
- c6809c76calendar mission 002: report, LOG, STATUS (test bug; fixed gate 78/0 at 00:30 05:40 12:00 19:59 20:01; 23:30 not run, quota stop)mre
- 00f72783calendar mission 002 (2/2): TEST bug — the reminder steps get their own identity (carol): alice's all-day Vacation (20th-22nd) from the events steps added 2 reminders from the 12th 20:00 to the 19th 23:00; Tokyo check no longer skipped in the Tokyo eveningmre
- 54fb0ce1calendar mission 002 (1/2): gate clock override GATE_CLOCK=HH:MM (this process and every page get Date shifted to that local time today)mre
- c838ee79mission brief 002mre
- f2bc67ecdocker-compose: init: true (hybriel#156, PID 1 ignored SIGTERM, every restart waited 10 s)mre
- 2881119fcalendar mission 001 (4/4): code order — README layout + same-output test, STATUS, LOG, report; tests/letcount.py (sub-folders), tests/realdata-baseline.mjs, tests/realdata-compare.pymre
- 3b2a4cd0calendar mission 001 (3/4): code order — let only where reassigned (147 dropped incl. components/month-view; 110 left: 67 reassigned, 43 loop-bound); gates 78/0 (3 of 4 runs; 1 known 'next month' flake) + 18/0, live-data run = step 2mre
- f5ce6b1dcalendar mission 001 (2/4): code order — topics, map, thin faces: lib/util.hl, lib/events(-helpers).hl (+calendarView/settingsView/soonOf), lib/settings.hl, lib/users.hl (+userOfLoginCode, tagOf), lib/api(-helpers).hl; project.hl = map; login route takes &req/&sessions (failed-login reason now kept); gates 78/0 + 18/0mre
- c6fbd011calendar mission 001 (1/4): code order — files moved: lib/events.hl, lib/users.hl, components/styles.hl (imports only); gates 78/0 + 18/0, live-data run identicalmre
- d6c59290calendar: Hybriel master 06617221 (plugin allocators 3a781359 + 413f60e4, mpackdb 2cb7ae5e, http1 773de63e); gates 78/0 + 18/0mre
- 7bd0337ccalendar: Hybriel master 190aa11d (fc838894 GC correctness, #126 closure scopes, #127); gates 78/0 + 18/0mre