gitoria

calendar

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit1110b26f1110b26fcalendar#14: the month name no longer breaks into two lines on a phone (Reminder settings drops to its own row when the header is too narrow), gate checks for one-line title and all header controls on screenmre1110b26f/components/styles.hl

6.4 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 calendar needs: the ident login in the
  3. // header, the events on the days and the editor's frame. The month view carries its own layout Style (components/month-view, a
  4. // fork); the theme already tiles its day cells and removes its frames. Markup is domain tags, this file lays them out.
  5. // Layout: the theme's content-first shell (components/main.hl), the header the theme's AppHeader.
  6. // Tokens: shared/tokens.hl (layouts' file, byte-equal); the app sets only its accent (light blue). 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`, the 44 px taps) are NOT repeated here.
  11. // MOBILE FIRST: every rule outside a block is the phone's (taps ≥ 44 px, fields 16 px); the one `@media (min-width: 60rem)` block
  12. // only ADDS the wide layout (the day's event chips go dense there, on purpose).
  13. inherit '../theme/theme.hl'
  14. import { var } from 'hl:web/css'
  15. import { blueLight, colorText, colorTextStrong, colorTextMuted, colorBackgroundSunken, colorAccentText, colorSurface, colorDanger } from '../shared/tokens.hl'
  16. colorAccent = var(blueLight) // the app's accent: the only token this app sets
  17. '.message' { color = colorDanger }
  18. '.message:empty' { display = 'none' }
  19. '#loginerror' { margin = '0' padding = '.5rem var(--layout-gutter)' background = colorBackgroundSunken }
  20. // ---- the login in the header (components/main.hl) -------------------------------------------------------------------------
  21. // ---- ident's selector in the header (creator 2026-10-24, "you removed the ident widget from all sites"): it stands top right, signed in AND
  22. // signed out, on the phone and on the desktop — never behind an icon or a popover. Its shadow DOM is in ident's design, restyled to the accent
  23. // through its custom properties and parts; the pill is kept compact so brand, selector and the user icon fit one row at 390 px. Its dropdown opens
  24. // under it, as wide as a phone allows.
  25. identSelector { '--ident-accent' = colorAccent '--ident-accent-text' = colorAccentText '--ident-background' = colorSurface '--ident-border' = colorSurface '--ident-font' = '600 .9rem/1.3 system-ui, sans-serif' position = 'relative' flex = '0 1 auto' minWidth = '0' }
  26. 'ident-selector::part(button)' { minHeight = layoutTap padding = '.25rem .6rem' whiteSpace = 'nowrap' }
  27. 'ident-selector::part(status)' { minHeight = layoutTap padding = '.25rem .6rem' whiteSpace = 'nowrap' overflow = 'hidden' textOverflow = 'ellipsis' }
  28. 'ident-selector::part(identity)' { minHeight = layoutTap }
  29. 'ident-selector::part(panel)' { position = 'absolute' top = '100%' right = '0' zIndex = '30' width = 'min(20rem, calc(100vw - 2 * var(--layout-gutter)))' maxWidth = 'none' boxShadow = '0 .75rem 2rem ' + colorBackgroundSunken }
  30. // ---- the events on the days (the month view's cells) --------------------------------------------------------------------
  31. // 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
  32. // text is cut with an ellipsis. The cell has no side padding so the chip may be that wide.
  33. dayEvents { display = 'grid' gap = '.15rem' marginTop = '.2rem' textAlign = 'left' }
  34. 'button.unused' { display = 'none' }
  35. 'button.hidden' { display = 'none' }
  36. 'button.event,
  37. 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 }
  38. 'button.more' { color = colorTextMuted background = 'transparent' }
  39. '#notify-ask' { color = colorAccentText background = colorAccent }
  40. // the switches (time/all day, the event's own reminders or the calendar's): the chosen one is the accent, the other `quiet`
  41. 'kind-switch button:not(.quiet)' { color = colorAccentText background = colorAccent }
  42. // ---- the editors (event, reminder settings): a full-page scrim with one panel -----------------------------------------------
  43. eventEditor { position = 'fixed' inset = '0' zIndex = '40' display = 'grid' placeItems = 'center' padding = '1rem' background = 'color-mix(in srgb, ' + colorBackgroundSunken + ' 82%, transparent)' }
  44. 'event-editor.closed' { display = 'none' }
  45. // the settings dialog is a popover (top layer): the browser's popover defaults (fit-content box, border, margin) give way to the full-page scrim
  46. 'event-editor[popover]' { width = '100%' height = '100%' maxWidth = 'none' maxHeight = 'none' margin = '0' border = '0' overflow = 'hidden' color = colorText }
  47. 'event-editor[popover]:not(:popover-open)' { display = 'none' }
  48. 'event-editor form' { display = 'grid' gap = '.7rem' width = '100%' maxWidth = '28rem' maxHeight = '100%' overflowY = 'auto' padding = '1rem' background = colorSurface borderRadius = radiusLarge }
  49. 'event-editor h2' { margin = '0' }
  50. 'event-editor label' { display = 'grid' gap = '.2rem' margin = '0' fontSize = '.85rem' fontWeight = '400' color = colorTextMuted }
  51. 'event-editor input,
  52. event-editor textarea' { width = '100%' color = colorTextStrong }
  53. fieldRow { display = 'grid' gridTemplateColumns = 'minmax(0, 1fr) minmax(0, 1fr)' gap = '.5rem' }
  54. 'form.allday label.timed' { display = 'none' }
  55. 'form.allday field-row' { gridTemplateColumns = 'minmax(0, 1fr)' }
  56. 'kind-switch,
  57. form-buttons' { display = 'flex' flexWrap = 'wrap' gap = '.5rem' }
  58. 'form-buttons button.danger' { marginLeft = 'auto' }
  59. '@media (min-width: 60rem)' = {
  60. // the desktop's chips are small on purpose (a pointer; four of them stand in one cell): under 44 px, deliberately
  61. 'button.event,
  62. button.more' = { minHeight = '0' padding = '.05rem .3rem' borderRadius = radiusSmall }
  63. }
  64. '#whoami' { fontWeight = '600' color = colorTextStrong fontSize = '.875rem' maxWidth = '6rem' overflow = 'hidden' textOverflow = 'ellipsis' whiteSpace = 'nowrap' flex = '0 1 auto' minWidth = '0' display = 'inline-flex' alignItems = 'center' minHeight = '2.75rem' }
  65. '#logout' { flex = 'none' whiteSpace = 'nowrap' padding = '.25rem .5rem' }

Branches

Latest commits

  • 1110b26fcalendar#14: the month name no longer breaks into two lines on a phone (Reminder settings drops to its own row when the header is too narrow), gate checks for one-line title and all header controls on screenmre
  • 490c658aident#31: the selector's sign-in returns to the page the user started on (return attribute = the login callback with next), gate checkmre
  • 18095868calendar: Reminder settings button opens its dialog again (the dialog's open handler still closed the removed user menu and stopped); old e2e and gate scripts use the new headermre
  • 6eee4b5acalendar header: the selector alone top right plus Log out as before the theme missions; Reminder settings back on the month page (WIP: the settings test still fails)mre
  • 0b909decident selector back in the header (creator 2026-10-24): selector top right signed in and out on phone and desktop, no second Log in button, new gate checks (WIP: gates not re-run after the last edits)mre
  • 0c8f9364Merge branch 'sy-sync'mre
  • 9fab1c8fsync components.hybriel 4922f9c into the month view: prev / next 44 px targets, names formatted in UTC (a UTC+12 zone showed the wrong first weekday); the calendar keeps its own language handling (Accept-Language / browser) and the P1/C13 reminder code; gate: 44 px check (SY)mre
  • 27d3e294theme: sync from layouts 4994037 (list rows stack, td word-keep, heading code, edited tap target)mre
  • 2ac9c1bbdeploy: security gate (tests/security.mjs)mre
  • 6b0a2571merge sc-sec (calendar security) with 99-year sessionsmre
  • 92001e52sessions last 99 years (creator 2026-10-23: logins never expire; only sign out ends them)mre
  • 0f76c99dSecurity audit SC: push endpoint SSRF guard, uploadMax 0, Secure cookie, login session rotation + rate limit, event cap, nosniff, security gatemre
  • 2dd53dccP1: one reminder shows once: arm() one at a time, the page skips reminders the server already pushed; push-twice gatemre
  • 3a29760aC13 report (handoff)mre
  • 33ab66ffCalendar: notification controls move from the month view into Reminder settings (user menu), one consistent state, state read when the dialog opensmre
  • 682a5b43reports: calendar gate countsmre
  • 876d22b2reports/H1-hydrate.mdmre
  • ef0cae45tests/dst.mjs: wait for hydration instead of a fixed 2.5 s sleep before clicking #gomre
  • d9cadecatests/cdp.mjs: HL_CPU_THROTTLE=<rate> optional CPU throttling for gate runsmre
  • efa61227re-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