Page features: directory and blog post tabs, image converter, version names

- Featured event badge: above the event's card from lg up, left out on phones
- Version names from the tag (The Region Cards Update) in the site and admin footers
- Tools -> Image converter (JPG, PNG, WebP in the browser) and Download as in Media
- People directory sections take several tags, a tab each (migration 078)
- Tab blocks split a blog post into tabs; contents follow the open tab (migration 079)
- The side nav sun fades out as the page scrolls into the footer

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aidan Dona 2026-10-16 19:37:07 -05:00
parent a6c66d4607
commit 31afa889d6
28 changed files with 878 additions and 70 deletions

View file

@ -49,7 +49,7 @@ sitePages.get("/site-pages/:id", (c) => {
const rows = db
.prepare(
`SELECT id, anchor, title, blurb, accent, preset, scope_id, event_type, view, tag_id, org_kinds
`SELECT id, anchor, title, blurb, accent, preset, scope_id, event_type, view, org_kinds
FROM page_sections WHERE page_id = ? ORDER BY sort_order, id`,
)
.all(id);
@ -64,6 +64,17 @@ sitePages.get("/site-pages/:id", (c) => {
.all(id)) {
picked.set(section_id, [...(picked.get(section_id) ?? []), org_id]);
}
// A People directory's tags (078), in order.
const tags = new Map();
for (const { section_id, tag_id } of db
.prepare(
`SELECT t.section_id, t.tag_id FROM page_section_tags t
JOIN page_sections s ON s.id = t.section_id
WHERE s.page_id = ? ORDER BY t.section_id, t.sort_order, t.id`,
)
.all(id)) {
tags.set(section_id, [...(tags.get(section_id) ?? []), tag_id]);
}
// A hidden page is only for those signed in: never kept.
const send = hidden ? (body) => c.json(body, 200, NO_STORE) : (body) => json(c, body);
@ -74,6 +85,7 @@ sitePages.get("/site-pages/:id", (c) => {
...section,
blocks: blocks.get(String(sectionId)) ?? [],
org_ids: picked.get(sectionId) ?? [],
tag_ids: tags.get(sectionId) ?? [],
})),
},
});