8e1ef8831c
2 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
59b595170f
|
A calendar a phone can read, and tap targets a thumb can hit
The private calendar rendered as six hundred pixels of nothing on a phone.
The cause was two adjacent rules in board.css with opposite outcomes:
.cal, .cal tbody, .cal tr, .cal td { display: block } /* (0,1,1) */
.cal__pad { display: none } /* (0,1,0) */
.cal__day:not(:has(.cal__event)) { display: none } /* (0,2,0) */
`.cal td` outranks `.cal__pad`, so every cell belonging to a neighbouring
month stayed on screen as a 92px empty box; `.cal__day:not(:has(…))`
outranks `.cal td`, so every real day disappeared. A month with no events
drew four blank boxes and nothing else, with correct HTML throughout —
which is why reading the file looked right and no test could see it.
Both calendars are now a column of every day of the month below 640px,
with the weekday beside the number (the column header is hidden there),
the days carrying something standing out, and a line saying so when the
month is empty. The public agenda gets the same shape deliberately: the
private calendar lists the public events, and a member moves between the
two. Every rule that decides `display` now names its cell's own class.
Measured rather than reasoned about, in headless Chromium at 320 and 390
across all 22 members-area screens and the public site in three languages:
- padding cells 0px tall, 31 of 31 days drawn, no horizontal overflow
- the ☰ ran off the right edge of a 320px Portuguese home page, because
«Comunidade» is three letters longer than «Comunidad»; the bar now
gives way at 360px
- the navigation links were 37x17, the calendar's + was 7x15, the footer
links 16px tall. A `pointer: coarse` block in each stylesheet raises
them to 44, padding only, so the desktop is untouched. Links inside a
sentence are left alone, as WCAG exempts them.
Registro de actividad and Contenido stop being a sideways-scrolling table
on a phone and stack one card per row, the two columns that do not
describe themselves labelled from `data-label`.
Guards: three stylesheet tests that compute specificity and run the
cascade for a padding cell, a day cell and the weekday label, in both
stylesheets — each verified by putting the shipped rules back. Plus three
request-level tests: an empty month says so and still draws its 31 days,
a month with events does not claim to be empty, and every day carries the
right weekday.
Members area only to deploy — no migration, no schema change — except the
agenda and the stylesheet, which reach the site through the pipeline.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NizVpJ2dwzCbjCrTLCjeHn
|
||
|
|
5e8ee5ad20
|
Two calendars: one for everybody, one for the members
**Public events are posts.** A new Evento category brings three fields with it — event_date, event_time, event_location — and the first is required, because a post's own `date` is when it was announced and an event announced three weeks early would otherwise land in the agenda on the wrong day. Members propose events through the same queue as everything else, and the date survives approval untouched: the event the member described is the event that gets published. An event's page leads with the day, the time and the place before the title, shows its picture full width, and offers "añadir a mi calendario" — a real .ics beside the page, generated because the editor writes `outputs: ["HTML", "ics"]` into an event's frontmatter and nothing else asks for that format. It carries Event structured data as well as the BlogPosting it already had, which is what puts a date beside the result in a search listing. /page/agenda/ is a month grid per month, every month from the first event to the last built at build time, with a script that shows one and moves between them. That arrangement is the point: with JavaScript off every month is on the page as a list, with it on nothing is fetched to change months, and the month it opens on is the reader's rather than the one the site was built in. Hugo exposes no AddDate, so the length of a month is a table plus the leap rule and the first weekday falls out of formatting the date — it looks like something simpler was missed, and it is not. **The private calendar** is a sixth section: rows in SQLite, written by admins, read by every member, never published. It shows the public events too, marked, so a member has one place to look rather than two — they come from the content_cache the editor's listing already fills, which is why migration 5 adds three columns to it and to submissions. The grid is Python's own calendar.Calendar: no date arithmetic of mine anywhere in it. Two things the tests found on the way: gitea.py let `requests`' own exceptions through. They inherit from OSError, not from GiteaError, so the calendar's careful "keep working while the git server is down" would have been defeated by a refused connection — the page would have 500ed instead. Every transport failure is now a GiteaError, raised at the one place that touches the wire. This is the third bug of exactly that shape in this module. An admin's erasure clears events.created_by rather than reassigning it. The meeting still happens after they leave; the event belongs to the association. 509 tests pass, and the site builds with Hugo 0.135.0 under the pipeline's own --panicOnWarning. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NizVpJ2dwzCbjCrTLCjeHn |