12559d0839
16 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
8936f296ea
|
Textos: the words are data now, starting with the navigation
Renaming «Inicio» was six edits — base.html, home.py's section list,
config.yaml three times, an aria-label, and the breadcrumb schema — and
none of them reachable from Gestión. That is the thing Identidad exists
to end for the site's name, and it stopped before it reached the labels.
The mechanism, and the navigation through it. The rest of the ~560
strings follow in later commits; this one is the path proved end to end.
apps/board/strings/*.yaml is the catalogue, shipped in the image through
the Dockerfile's existing COPY. Only the differences are stored, which
is brand.FACTORY's rule and buys the same thing: a wording I improve
later improves for everyone who has not deliberately overridden it.
The `site.` prefix decides everything — one box or three, SQLite or a
commit of data/ui.yaml, this page load or the next pipeline run.
The fallback order is a judgement rather than an accident: an override
for the asked-for language, then the *shipped* word in that language,
then Spanish. Somebody who reworded only the Spanish has said nothing
about German, and showing a German reader Spanish would be reading an
intention into silence. Verified in a real build: with es overridden,
the Spanish menu says «Escritorio» and the German still says «Start».
The screen is generic — it iterates the catalogue, so extracting another
hundred strings costs nothing here. There is no field list in ui.py and
there must never be one.
Two guards are what make a 560-string extraction mechanical rather than
risky: every t("…") used must exist, and every key defined must be used.
A typo renders as nav.incio on a page; an orphan is a box in Gestión
that changes nothing. Both fail the suite instead. I proved all three
guards (including the one holding t.html to the catalogue) by
introducing the bug each describes and watching it go red.
Two things fixed on the way, both found by the extraction rather than
looked for: home.py and base.html held two copies of the same six words,
so a rename would have reached the members area and not the strip on the
public site; and memberbar.js hardcoded two more in a fingerprinted
script, the one surface no setting could ever reach.
No migration — `strings` is a new table, so CREATE TABLE IF NOT EXISTS
makes it, as activity and site arrived. The erase guard caught the new
members(id) reference by itself, which is the mechanism working.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NizVpJ2dwzCbjCrTLCjeHn
|
||
|
|
f6236a3acf
|
The public agenda is a month too, and it has a year ahead
I fixed the calendar in the members area and left the one on the public site exactly as it was — same bug, other stylesheet. The screenshot that came back was /page/agenda, which is the half I had not touched. So the agenda gets what the calendar got: seven columns at every width, the titles out of the cells below 640px and into a list the dots link to, the padding cells keeping their space, the weekday clipped rather than display:none. The two are one feature seen from two sides — the private calendar lists the public events — so they now have one shape and the guards are written twice, once per stylesheet. And the second half of the report, which is a different bug: you could not get past December 2026. The span rendered ran from the first event to the last, so the → went grey on the last month anybody had announced something in. It now always carries this month and the eleven after it, whatever the events say. An agenda with nothing coming up should look empty, not broken. That change immediately broke the build, which is the useful part: `int "08"` is an error in Go, because a leading zero means octal and 8 is not an octal digit. The month number came off the key string, and August had simply never been inside the span before. It comes off the parsed date now. Measured in Chromium at 390 and 1280 rather than reasoned about: seven columns, 31 day cells, dots on the busy day, the titles in the list below, nothing past the right edge — and four presses of → landing on an empty February 2027 with the arrow still live. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NizVpJ2dwzCbjCrTLCjeHn |
||
|
|
751d452556
|
Fijar: moderators choose what gets read first
Half of this already existed and nothing said so. `threads.pinned` has
been in the schema since the board shipped, with an index on it and a
toggle route, but it was @admin_required, reachable only from inside a
thread, and Inicio ignored it.
Who. Moderators and above, on both halves. Curating what the public
reads is the whole of a moderator's job, and content.py has said so
since the queue was built. Locking a thread rides the same route and is
still an admin's: it stops named people saying anything more to each
other, which is power over people rather than over content, and this
codebase keeps those apart everywhere else.
What is stored. A moment, not a flag — several posts can be pinned and
the newest pin goes first, so the value is the order. `pinned:
'2026-10-13T12:00:00'` in a post's own frontmatter, written only when
true; `threads.pinned_at` beside the flag the wall already had, cleared
on unpinning so that pinning again puts it where a new pin belongs. One
key carrying both means `{{ if .Params.pinned }}` still reads as a
yes/no and nothing has to be kept in step with anything.
translate.py needs nothing: it copies the whole frontmatter and rewrites
only TRANSLATED_KEYS, so a pinned post is pinned in German too. Asserted
against the real list rather than assumed.
Two ways to pin a public post — the switch beside Publicar, and one
press in the Contenido list, because deciding what the site leads with
means looking at the list rather than opening each post to find out what
is in it. Both commit; the file is the record.
Migration 10 adds the columns and recreates the wall's index, which now
names pinned_at. `CREATE INDEX IF NOT EXISTS` leaves an existing index
exactly as it is, so without that a running server keeps the old
definition forever while a fresh install gets the new one. Nothing
breaks either way, which is the problem.
Checked rather than assumed: built with Hugo 0.135.0 and the pipeline's
flags, two pinned posts come out above a newer unpinned one and in
pin order rather than post order, with the pill on the cards and on the
article. And the wall rendered at 390px, where the pinned thread leads
and nothing overflows.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NizVpJ2dwzCbjCrTLCjeHn
|
||
|
|
ae2e86a76a
|
Posts in the order they were written, both halves
Two different causes that look like one bug, and neither is fixed by
the other.
The site. The editor wrote `date: 2026-07-31` with no clock, so
everything published on one day was byte-identical in the field Hugo
sorts by — and Hugo fell through to its next key, the title. A day came
out alphabetised, permanently, because a rebuild changes nothing about
the files. None of the four post feeds applied an explicit sort either,
so all four inherited it.
`stamp()` attaches the clock, in `frontmatter_for`, which every
publishing path goes through. The day is still the one whoever publishes
chose and the URL still carries only the day, so nothing anyone linked
to moves. An edit keeps the time the file already had as long as the day
has not changed — a typo correction must not carry a year-old post to
the top of the page, which is what the hidden date_stamped field is for.
`partials/posts-ordered.html` is the other half: the order stated once
and called from the home page, the section list, llms.txt and the
BlogPosting block. `first N` goes on its result, never its input.
Both halves are needed, and I checked that rather than assuming it:
built with Hugo 0.135.0 and the pipeline's flags, two posts dated the
same day come out 11:00 before 09:00; with the clock removed and the
partial left in place, the alphabetically-first one is back on top.
The members area. Nothing had a tiebreak. `created_at` is
`datetime('now')` — one-second resolution — so two rows written in the
same second compared equal and SQLite was free to return them in either
order. Every ordering ends in the primary key now; activity.py had it
already and was the model.
Two disagreements went with it: Inicio's wall panel orders by `pinned`
like the wall, and its own-submissions panel uses the ranking
Publicaciones uses. The two moderation queues stay oldest-first on
purpose — a queue is not a feed.
And the public agenda sorts a day's events by the hour, which the
private calendar has done since it was written.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NizVpJ2dwzCbjCrTLCjeHn
|
||
|
|
790bd2230f
|
Share buttons, and a card that arrives with its picture
Seven buttons under the title of every post and again after the text — the reader who decides on sight and the one who decides at the end are different people. Four are ordinary links and work with scripting off: WhatsApp, Facebook, Bluesky and Mastodon all take a URL that opens their own composer. The other three cannot be, and the reason is worth writing down rather than rediscovering: Signal has no web intent at all — it is a share target in the operating system's sheet and nowhere else — and Instagram accepts no link from anybody, by design, which is why every site with an Instagram share button is really offering a copied link. Both call navigator.share() where it exists and copy the address where it does not, beside a plain «Copiar enlace» that always works. Mastodon has no central address: the composer lives on whichever server the reader has an account on. It asks once, keeps the answer, and without scripting falls back to the association's own server. The icons are simplified marks in one visual language rather than the official logo files — reproducing those from memory gives something subtly wrong, and subtly wrong looks worse than plainly simple. Each carries its name for a screen reader and in `title` for a cursor. **And the half that was actually broken.** og:image pointed at the original upload: a photograph off a phone, two to five megabytes. WhatsApp fetches preview images on a tight budget and gives up on a file that size, so the card arrived as a title and a link with a blank where the picture should be. Hugo copies static/ and processes assets/, and only the second can be resized — so config.yaml mounts static/uploads and static/brand into assets/ as well, leaving every existing URL and everything the editor commits untouched, and seo-head.html now builds the card: 1200x630, filled from the middle, 93 KB measured against a 22 MB source. The logo fallback is fitted rather than filled and keeps its own format, because a wordmark cropped to a landscape card loses its ends and a transparent PNG turned into JPEG lands on a black square. og:image:width and :height go out with it, from the generated file so they cannot disagree with it. Several clients draw the small card rather than the large one when they would have to fetch the image to find out how big it is. Three guards, each verified by reintroducing its own bug: a button that needs the script says so in the markup; a hidden button is actually hidden (`[hidden]` is a user-agent rule and `display: inline-flex` beat it, so all seven showed and three did nothing); and every encoded link is marked safeURL, without which Go's escaper encoded it a second time and WhatsApp opened with %253A spelled out. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NizVpJ2dwzCbjCrTLCjeHn |
||
|
|
cba9939eb2
|
The last of WordPress
`/wp-cron.php` was reaching the Flask app. The matcher for old WordPress paths listed four of them by name and missed that one, so it fell through to the single-segment profile route — `/wp-cron.php` looks exactly like a member's name — and was answered with a 400 by the CSRF hook. The old install has been POSTing it every few minutes, which means the members area was being woken up by the site it replaced. The matcher is now `/wp-*`, after the uploads rule and never before it, so the migrated pictures still map. `/categoria/…` was redirecting to `/categories/…`, which stopped existing when the taxonomies were removed: one dead address forwarding to another. It goes home now. vielac.at is the old site's own domain rather than a spare name, which is worth saying in the file that redirects it: it is the address in every link shared before the cutover and every search result not yet recrawled. An old WordPress path arriving there lands on vienalatina.com and is caught by the 301s further down — one set of rules rather than two. Deleted with it: `scripts/wp-to-hugo.py`, whose own docstring called it disposable and whose migration happened; its section in the README, which now says what remains of that site instead; and the WordPress core alignment CSS, which no content uses and nothing in the editor can produce. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NizVpJ2dwzCbjCrTLCjeHn |
||
|
|
ff115c1d6b
|
A post can say that a machine wrote it
A switch beside the button that publishes — on the editor, on a member's proposal and on a wall thread — and a pill next to the date wherever the post is read: the article, the cards in the listings, the thread, the wall's list, and the moderator's review screen. Next to the date rather than under the text, because a disclosure somebody meets after reading the thing is not a disclosure. Where it lives follows what the thing is. A public post carries `ai_generated: true` in its own frontmatter, written only when true — the file in the repository is the record, and `ai_generated: false` on every post ever written is noise in git and a question in the mind of whoever reads one. A thread carries a column. A proposal carries a column too, and that is the one place it has to be moved by hand: a proposal is a draft in SQLite until it is approved, so the frontmatter it will end up in does not exist while the decision is being made, and losing it there would lose it exactly when the text stops being private. `content.edit` loads the flag back into the form, for the same reason the byline is carried through: a field read but not written back is a field that one corrected typo silently removes. The pipeline needs nothing. translate.py copies the whole frontmatter and rewrites only TRANSLATED_KEYS, so the flag reaches the German and Portuguese siblings by itself — right rather than lucky, since a translated post was still machine-written. Asserted against the real list, so a key quietly added to it fails the suite. Migration 9: three plain ADD COLUMNs, tested against a database with a thread, a proposal and a cached post already in it. The three words are in partials/t.html with the theme's other labels. This is also the shape the EU AI Act's Article 50 asks for, which is worth knowing for whoever installs this for a second organisation. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NizVpJ2dwzCbjCrTLCjeHn |
||
|
|
8e1ef8831c
|
The writing box shows the formatting, and raw HTML stops reaching the site
The box is now the finished text: bold is bold, a heading is a heading, a
list is a list. No preview pane — a second box beside the first is the
wrong shape on a phone — and nothing is sent anywhere while anybody
types, so the round trip the old «Vista previa» button made on every
press is gone.
Markdown is still the only thing stored, which is what keeps the file in
git, the translation pipeline, Decap and the XSS defence exactly as they
were. The two directions are deliberately not symmetrical:
opening — the server renders the stored markdown into a <template>
the editor adopts, so there is no markdown parser in the
browser and no second opinion about what text means;
saving — the browser walks a closed set of elements back into
markdown. Anything else contributes its text and nothing
more, which is why a paste brings no markup in.
Three heading levels (## ### ####), bold, italic, strikethrough, two
kinds of list, quote, link and clear formatting on the four post boxes;
bold, italic, link and clear on the short ones. A «Markdown» button
swaps to the raw text and back — the escape hatch, and the way to write
a table. With JavaScript off the plain textarea is still there and still
the field that submits; verified by driving the form with scripting
disabled.
Headings had no styles anywhere. `.article-single__body` styled `p` and
nothing else, so three levels would have rendered as three identical
bold lines. Both stylesheets now carry the ladder, along with lists,
quotes and rules.
Two renderer findings, both of which richer writing makes worse:
- config.yaml set Goldmark `unsafe: true`, for WordPress content that
no longer exists — no file under content/ holds a tag. A member's
proposal containing `<img src=x onerror=…>` renders as visible
characters in the moderation queue, which is the one screen a
moderator judges it on, and that flag is what would have run it on
the live site. Off now; the built output is byte-identical.
- A line break meant two things: `breaks: True` here, Goldmark's
hardWraps off there. Turning hardWraps on was the obvious fix and
the wrong one — the files are hard-wrapped at 78 characters, so it
would break every sentence in half. Instead there are two renderers,
one per destination, and the editor writes the hard break CommonMark
means (two spaces) so it survives either way.
Tested by running the serializer itself, in node, against the same
static/board.js the browser loads: 26 cases including the ones that go
wrong — a pasted span, a script, an empty box, a line starting with «-»,
a javascript: href — plus a round trip asserting markdown → HTML →
markdown renders identically for ten real documents.
Then by typing in a browser at 390px with touch emulation, which is what
found the one defect no fixture predicted: pressing Enter in a list
wraps it in a <div>, and reading that as a paragraph ran «uno» and «dos»
together into one word.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NizVpJ2dwzCbjCrTLCjeHn
|
||
|
|
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
|
||
|
81d9fae4a9
|
Identidad, tipografías, y tres herramientas de administración
The second half of the superadministrator's job: not just who may do things, but
what they get to do that nobody else does.
**Identidad** is everything that used to be frozen in config.yaml — the name and
the one-line tagline in all three languages, the association's accounts
elsewhere, a public email, a city and street, a share picture and the footer
line. It commits data/site.yaml the way Marca commits data/brand.yaml.
Hugo cannot have config.yaml overridden by a data file, so the name and tagline
are read through two new partials that prefer the data file and fall back to the
config; every template showing either calls one, so they cannot drift. A site
with no data/site.yaml builds byte-for-byte what it built before — asserted by
building both ways and diffing with the stylesheet fingerprint normalised.
The contact fields are not decoration: they become ContactPoint and
PostalAddress in the Organization schema, which is what puts an association in a
local result rather than only a web one, and the social links become sameAs,
which is how an engine knows an Instagram account and this site are one body.
**Marca** grows a typeface and a roundness. Four system stacks — nothing
downloaded, which is deliberate and a GDPR matter — or an uploaded .woff2,
sniffed by its wOF2 signature, capped at 400 KB, named ahead of the old stack so
a font that fails to load leaves a readable site. The fold-out warning covers
missing accented glyphs, file size, synthesised bold, and licensing: a font is
software, a desktop licence is not a webfont licence, and that liability follows
the platform to every organisation it is installed for. SIL OFL and Apache-2.0
are named, with seven places to find them.
**Three tools.** Estado del sistema exercises the content token against the
repository rather than checking it is non-empty — "present" was never the
problem, a wrong scope broke publishing for three phases while looking fine —
and reports mail, backups, disk and every documented setting the container does
not have. It changes nothing on purpose. Registro de actividad records the dozen
acts that change who can do what; the actor is cleared and not cascaded on
erasure, and log() never raises, because an administrator who could not be
appointed because the note about it could not be saved is worse than a gap in
the notes. Biblioteca de medios lists every picture with the posts that use it
and, finally, shows the orphans — a picture whose post was deleted has stayed in
the repository, deployed and unreferenced, for the life of this site with no way
to see one.
Two bugs found by looking at the rendered pages rather than at the tests:
**Gestión had disappeared from the superadministrator's own navigation.**
base.html asked `g.member.role in ('owner', 'admin')`, right until a role
appeared above both. 622 tests passed while it was broken, because every one of
them signed in as an admin or below. The templates now call the same
`is_at_least` the handlers do, and test_navigation.py covers the tier above
admin — verified by reintroducing the tuple and watching it fail.
And the status screen counted the tombstone as a suspended member.
Migration 8 is plain ADD COLUMNs; `activity` and `site` are new tables, so
CREATE TABLE IF NOT EXISTS covers them with no step at all. The erase guard
caught both the moment they existed, which is that test doing its job.
627 tests pass. Hugo builds clean with the pipeline's flags, both with and
without the two data files.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NizVpJ2dwzCbjCrTLCjeHn
|
|||
|
c2154b6f06
|
A phone can use this site, and the way in is a button
Your screenshot had no navigation at all: brand, three language letters, posts.
The cause is one missing button, and the CSS has been waiting for it since the
WordPress port. `main.css` hid `.site-bar__pages` below 768px and showed it
again on a class, and styled a `.site-bar__hamburger` — the panel's styles, the
button's styles and the animated ✕ were all ported, and the button itself never
was. Nothing in the theme has ever set that class. So for three phases every
phone saw the site with no menu, with every rule involved correct and every
selector pointing at an element that did not exist.
The toggle is a visually hidden checkbox immediately before the menu, with the ☰
as a `<label>` for it in the bar, and one rule doing the work. No JavaScript.
Not `<details>`, which is this project's usual answer and does not work here: on
desktop the menu has to be open and horizontal, and current Chrome hides a
closed `<details>`'s content with `content-visibility` on `::details-content`,
which a `display` rule on the child no longer overrides. A checkbox behaves the
same in every engine, keeps its place in the tab order and keeps its label.
`test_templates.py` now fails if the stylesheet hides the menu behind a state
the header does not carry — the shape of bug this suite keeps meeting, and the
first time it is guarded rather than found by looking.
**Comunidad is a button in the bar** at every width, brand-coloured through the
tokens Marca writes, instead of a word in a menu that on a phone would not open.
Its three translations moved from the `menus.main` blocks into `t.html`: the URL
is the same in every language, so the menu entry was only carrying a label. The
language switcher is rendered twice, in the bar and at the foot of the panel —
a brand, a button, a ☰ and three language letters do not fit across 360px and
CSS cannot move an element between the two.
**Categories and tags are gone**, both taxonomies. Nothing downstream had to
change: the agenda, the event page, the .ics and the private calendar already
keyed on `event_date` rather than on the category, which I checked before
removing anything. The category was only a gate in the editor, so the gate goes
too — **a post carrying a date is an event**, with nothing to tick first and no
way left to say "this is an event" and then not say when. Migration 6 drops the
two columns that held the terms.
`taxonomies: {}` rather than no `taxonomies` key: leaving the key out restores
Hugo's own defaults, which are tags and categories, so deleting the block built
the very pages it was meant to remove.
Also here, found while looking at the output rather than assumed: the breadcrumb
schema emitted a subpage's parent and the page itself both at position 2, and
the members area's six-section nav had no wrap and no scroll, so `/comunidad/`
on a phone scrolled sideways. It wraps now — two lines showing all six, where a
swipe strip would have left Calendario and Gestión off the edge with nothing to
say they were there.
Verified by rendering: headless Chromium at 320px, 390px and 1280px, before and
after opening the menu, and the members area at 390px. No horizontal overflow at
any of them. 548 tests pass; the build is clean with the pipeline's own flags.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NizVpJ2dwzCbjCrTLCjeHn
|
|||
|
7e70004e7b
|
Marca: the admin owns the look, logo included
The brand colours were two identical `:root` blocks — one in the theme, one in
the members area's stylesheet — with a comment in the second reading *"If the
brand colours change, change them in both."* There was no logo anywhere, no
favicon in either `<head>`, and `params.defaultImage` was the empty string with
a comment saying it was waiting for one. Every one of those was a change only
somebody with the repository could make.
`brand.FACTORY` is the single source of truth for the palette now, and
`test_brand.py` parses both stylesheets and fails the build if either drifts
from it. That is what retires the comment: not by merging the two files — they
are served by different things and each has to stand alone — but by making a
divergence fail a test instead of going unnoticed for a month.
**Gestión → Marca**, admins only, saves to two places in one submit, because
the two halves of the site cannot read the same store: SQLite for the members
area, which must render when the git server is down, and `data/brand.yaml` plus
`static/brand/` in the content repository for the public site, which is files
on disk. SQLite is written first and the commits follow — if Gitea is
unreachable the change still takes effect here, `published_at` stays NULL, and
the screen offers to try the publish again. The other order would let a git
outage block a change that does not need git.
The easy half is six colour pickers, each with the name of what it changes, and
a live preview of the real chrome. The three brand shades are worked out from
the brand colour in HLS, so one picked colour gives a coherent set rather than
one red button on an orange background; scaling RGB towards white would have
washed the hue out. A WCAG contrast warning names any pair that will be hard to
read, with its ratio, and saves it anyway: an admin may have a reason, and what
this prevents is shipping an unreadable site without once being told.
The advanced half, behind a fold, is every token as a text field and a free CSS
box appended last so it wins. **The Marca screen deliberately does not load the
generated stylesheet** — every other page does — which is what keeps *Restaurar
lo de fábrica* reachable after somebody writes `* { display: none }` into that
box, and the reason the colours an admin picks do not show on the page where
they pick them. The preview block is where they do.
Only differences from the factory are stored, so a token added later arrives
with its default already in place for every existing install. Both halves serve
a generated stylesheet rather than an inline `<style>`, because the CSP has no
'unsafe-inline' and an inline block would simply not apply.
The logo also fills the gap phase I left: it is the share-card fallback and the
`Organization` logo, ahead of `defaultImage`, and the home page carries
`og:image` for the first time — the front page of the site was the last place
that should share as a bare link.
No SVG and no ICO: the logo takes PNG, JPG or WebP and the favicon PNG, both
identified from their bytes by the sniffer the wall already uses. An SVG is XML
that can carry script and would be served from our own origin.
A new table, so `CREATE TABLE IF NOT EXISTS` is enough and no migration is
involved. `FakeRepo` moved from test_content.py into conftest.py, since two
features commit to the content repository now. Verified by building with Hugo
0.135.0 and the pipeline's flags both ways: with a brand.yaml the second
stylesheet, the favicon and the logo appear, and without one the output is
byte-for-byte identical to the build before any of this existed.
545 tests pass.
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 |
||
|
|
c84a996eef
|
The bar, the share card, the writing box and subpages
**A signed-in member sees the members area from anywhere.** A slim bar above the
public header, with the same five sections /comunidad/ has. Those pages are
files on disk and get cached, so it is drawn in the browser: memberbar.js asks
/comunidad/sesion.json who is reading, and that endpoint is the only thing that
decides — a visitor is told `{"signed_in": false}` and the answer is never
cached. Sign-in also sets vl_sesion=1, a cookie holding one digit that scripts
can read, and without it the script makes no request at all: a stranger reading
one article costs the app nothing. It is a hint, never a credential — the
session cookie stays HttpOnly and signed, and a forged hint earns a reply saying
you are not signed in. Comunidad is now in the public menu in all three
languages, signed in or not.
**The public menu is built from the pages.** It was three names per language in
config.yaml, so a page published through Contenido never appeared on the site at
all and the German and Portuguese menus had to be kept in step by hand. Pages
carry `parent` (another page's basename — the one translate.py already uses to
pair siblings, so it holds in all three languages) and `weight`, both chosen in
the editor, and header.html builds two levels from them. URLs do not change: a
subpage is still /page/<slug>/, only the menu nests, so nothing in the Caddyfile
or the pipeline learns about folders. The dropdown is the theme's own, ported
from WordPress — hover, focus-within, inline on a phone, no script. A parent that
has been deleted is kept and labelled rather than silently dropped on the next
save.
**Sharing and the rest of SEO/GEO.** The groundwork was already here — hreflang,
Open Graph, Twitter card, BlogPosting, llms.txt, robots.txt naming the AI
crawlers — so this closes the gaps. Static pages had *none* of it and shared as
bare links; they now carry WebPage schema and the full set of tags. Both branches
gain og:image with an alt and a twitter:image, falling back to params.defaultImage
(empty until there is a logo, which is the one line to fill in then). The home
page gains Organization with areaServed Wien and a sameAs list; posts and pages
gain BreadcrumbList, and an article's structured data now carries the author's
profile URL. An optional FAQ — `pregunta|respuesta` per line — renders at the
foot of the page and as FAQPage schema, because current guidance for generative
engines puts exactly that shape at the top of what gets quoted, and schema
describing something invisible is what search engines penalise. translate.py
carries both new fields: image_alt joins the translated keys, and faq is
translated half by half so the separator survives.
**The writing boxes.** A markdown toolbar and a Vista previa on every box where
somebody writes prose, opted in with data-markdown. The preview POSTs to
/comunidad/previsualizar and renders with render.to_html — the same function the
board and the site use, so it cannot promise something publishing will not
deliver; a markdown parser in the browser would be a second opinion about what
somebody's text means. Choosing a picture now shows a thumbnail with its name and
size before anything is uploaded, which is the only reason `blob:` joins img-src:
a handle to bytes already in the page, reaching no network.
All of it ours, no dependency added, under a policy that loads scripts from this
origin only. Verified by building the site with Hugo 0.135, the version the
pipeline runs: the nested menu, the page's share tags, the FAQ schema matching
the rendered section, and llms.txt listing the pages.
463 tests pass.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NizVpJ2dwzCbjCrTLCjeHn
|
||
|
|
e52c1e4d49
|
A byline, a way in, and the cell that was not a cell
Three things from a round of looking at the deployed site. **The staggered table rows.** content_list.html had `<td class="actions actions--row">`, and `.actions` is display:flex. A <td> told to be a flex container stops being a table cell: it leaves the row's layout and draws its bottom border at its own content height, so the columns' rules no longer meet. Nothing errors and the page renders, which is how it survived two rounds of somebody looking straight at it — including mine, when I blamed the wrapping on the Miembros table and rebuilt that page as cards. The flex row moves into a <div> inside the cell, and test_templates.py now fails on any <td> carrying the class, beside the guards for the things the CSP silently drops. **A published post did not say who wrote it.** The commit has named the author since the editor was built; the page never did, so a reader could not tell whose article it was. frontmatter_for writes `author`, and `author_url` only when that member has published their own page — a byline linking to a 404 is worse than one that does not link. publish() fills it from whoever wrote the thing, which for an approved proposal is the member and not the moderator; edit() deliberately does not, so fixing a typo in somebody's article never re-signs it. The hidden field carrying the URL back is checked against a path on this site, because a hidden field is a convention and not a promise. scripts/translate.py needed no change, which I checked rather than assumed: it copies the whole frontmatter and translates only the title and description, so an author reaches the German and Portuguese siblings untranslated, as a name should. The theme's single.html renders it, verified by building the site with Hugo 0.135 — `por <a href="/salvador">Salvador Dalí</a>` with the link, `por Salvador Dalí` without. **Contenido had no way in.** The page worked and nothing linked to it: Gestión offered only the static pages, and the Artículos tab exists only once you are already on that screen — so a moderator, who cannot open Gestión at all, had no route to the published articles. Gestión gains an Artículos card, Publicaciones gains *Ya publicado* beside its button, and the button that read "Nuevo página" now reads "Nueva página", since Spanish gives the article a gender and "Nuevo " + the singular cannot be right for both. 439 tests pass. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NizVpJ2dwzCbjCrTLCjeHn |
||
|
|
72894b8907
|
Scaffold Hugo + Decap trilingual site from WordPress migration plan
Static replacement for the WordPress + Polylang + synchronous DeepL stack: - Hugo config: es (default) / de / pt-br, siblings paired by filename basename, WP slugs preserved via /:slug/ permalinks - Theme: CSS ported verbatim from the WP theme; header/footer/lang-switcher and article templates ported from their PHP counterparts (no Google Fonts — zero third-party requests) - seo-head partial: hreflang + x-default, og:locale(:alternate), JSON-LD BlogPosting/Blog with inLanguage (ported from theme/inc/seo.php) - robots.txt AI-crawler allowlist + build-time llms.txt (ported from theme/inc/robots-and-llms.php) - scripts/translate.py: async DeepL step (tag_handling=html, protected community terms, manual_translation freeze, fail-loud, bot commits) - scripts/wp-to-hugo.py: one-shot WP REST → Hugo content converter - Decap CMS admin with Gitea backend, locally-bundled JS - .woodpecker.yml: translate → build → deploy (rsync to Caddy root) - Sample trilingual welcome post + acerca/contacto pages Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017z2rT1oN7vMS4ggo23n5WG |