gitoriaLog in with ident

calendar

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit76edaa6276edaa62calendar: Hybriel master ff51cf46 (re-vendor round, static workaround removed)mre76edaa62/components/month-view/README.md

1.9 KB

  1. # Month view
  2. > This is the CALENDAR'S COPY (calendar.worldapi.org#2): it also shows the user's events on the days and holds the
  3. > editor (see the app's README). The description below is the plain component; `dates.hl` is added.
  4. A month with prev / next buttons on top, the month's name and the year between them, and the days below.
  5. Weeks start on Monday; the days of the neighbouring months are dimmed; today is marked. Month and weekday
  6. names follow the browser's language, today follows the browser's time zone.
  7. Live demo: https://components.hybriel.worldapi.org/month-view
  8. ## Use it in an app
  9. Copy the folder `components/month-view/` (files `month-view.hl`, `clock.hl`, `month-view.js`) and the month-view
  10. rules of `styles.hl` into the app, serve `month-view.js` as a file route, then compose it into a page:
  11. ```
  12. import MonthView from './month-view.hl'
  13. View {
  14. MonthView { }
  15. script { src = "/month-view.js" }
  16. }
  17. ```
  18. - One month view per page: a composed component's members are the page's state (COMPONENTS.md §12).
  19. - Colours are the semantic tokens of `shared/tokens.hl` only; the accent is the app's `colorAccent`.
  20. ## What it shows
  21. The server's month at first (UTC date), then the browser's own today and language once the page runs; paging
  22. starts from there. Setting the start month from the page (`MonthView { year = 2026 month = 1 }`) is not tested.
  23. ## Data out
  24. None yet: the page cannot read the month shown, and an `emit` from the component did not reach a handler in the
  25. page (see STATUS.md). The first app that needs the month (calendar events) adds it.
  26. ## Markup and states
  27. `<month-view>` holds a `<header>` (buttons `#month-prev`, `#month-next`, title `#month-title`) and a `<table>` of six
  28. weeks. A day is an `<li>` with `<time datetime="YYYY-MM-DD">`; class `outside` = a neighbouring month's day,
  29. `today` = today. Narrow screens: the table fills the width with smaller cells; wide: taller cells.
  30. Do not use it for: choosing a date in a form (see the date picker, when it exists).

Branches

Latest commits

  • 76edaa62calendar: Hybriel master ff51cf46 (re-vendor round, static workaround removed)mre
  • 90a3fc2cdeploy.sh: back up live storage/.sessions/.env before every deploy (newest 5 kept)mre
  • 6722b72ddeploy.sh: never send .git or .gitignore to Byrodinmre
  • be099807State of 2026-09-27, before the move to gitoriamre