feat(parks): give the parks menu five researched, source-cited topics #10

Open
gabogg wants to merge 20 commits from feat/parks-menu-style-options into master
Owner

Summary

The palette question this PR opened is settled: both menus ship tierra. What separates them now is content, not colour.

 /prevencion-en-parques-tierra-sombra      (Menú 03)
-  theme="tierra"   topics: emergencyTopics (generic, 6)
+  theme="tierra"   topics: parkTopics      (researched, 5, cited)

 /prevencion-en-parques-verde-contraste    (Menú 04)
-  theme="bosque"   mode="dark"
+  theme="tierra"   mode="light"            # same palette, generic topics kept as comparison

The five park topics are risks that materialise during a visit, which is what makes them different from the site-wide temario. Earthquakes was a required inclusion.

src/data/parkTopics.ts
├── sismos-en-parques        default         ← required topic
├── incendios-de-vegetacion  rounded-glass
├── tormentas-electricas     timeline-step
├── golpe-de-calor           default
└── crecidas-subitas         rounded-glass

ParkTopic is a sibling of EmergencyTopic, not a variant. It drops the infographic and visual steps and adds the two fields that carry the point of this change:

 type ParkTopic
   id, title, phases, mapNodes
+  figures: { value, label, detail }[]         # the cited statistic
+  sources: { publisher, title, year, url }[]  # what backs it
+  styleVariant: 'default' | 'rounded-glass' | 'timeline-step'
-  infographicItems, visualSteps

The rule the data file enforces: no figure is asserted without a sources entry behind it. Nothing is inferred. Every claim is recorded against its source in docs/research/parks-topics-sources.md, and each page ends with a visible Fuentes block so a reader can check a number without leaving the page.

Sources used, in the priority order the research applied — Venezuelan state bodies first, then Venezuelan academia, then international agencies: MPPRIJP, FUNVISIS (via France 24), INAMEH (via Mongabay), ACFIMAN (via Noticiencias UCV), INPARQUES, OPS/OMS, NOAA/NWS, USGS, CDC/NIOSH, NASA (via Phys.org).

A separate ParkTopicSection renders these instead of extending EmergencyTopicSection, because that component is shared with the frozen risk-management routes and ADR-0002 keeps them untouched.

Evidence

Before: 62 routes. The tierra menu listed the same six generic topics as the risk menu, in two different palettes.

After: 61 routes — the tierra menu has five children instead of six.

$ npm run build
61 page(s) built in 3.96s
Complete!

Each topic renders the variant its data declares — checked against the built HTML, not the source:

$ grep -o "pc-glass-light|pc-brutalist-card|pc-hard-shadow-light" dist/.../$topic/index.html

sismos-en-parques          pc-hard-shadow-light    (default)
incendios-de-vegetacion    pc-glass-light          (rounded-glass)
tormentas-electricas       pc-brutalist-card       (timeline-step)

Every page carries its sources block:

$ grep -c "Fuentes" dist/prevencion-en-parques-tierra-sombra/*/index.html
sismos-en-parques  incendios-de-vegetacion  tormentas-electricas  golpe-de-calor  crecidas-subitas
       ✓                    ✓                        ✓                   ✓                ✓

Preview deploys automatically on every push to this branch and is live at https://pr-10.folletos.gaboggamer.online/.

Merge Danger

Door: Two-way.

Everything here is additive or a prop change. parkTopics, ParkTopicSection and the research doc are new files; ParksMenu gained an optional topicSet prop that defaults to the existing behaviour, so omitting it changes nothing. Reverting restores the previous palette split without data loss.

The one asymmetry: the verde-contraste slug is retained although the green palette is gone, so existing links keep resolving. Renaming it later would be the one-way step, and ADR-0002 governs that.

Blast Radius: Contained.

  • No route renamed, moved or deleted — the ADR-0002 freeze is untouched.
  • EmergencyTopicSection, emergencyTopics and /prevencion-y-gestion-de-riesgo are not modified, so the shared blue topic pages are unaffected.
  • Route count changes 62 → 61; docs/routes.md updated to match.
  • The parks menus are still orphaned from public navigation, same condition as issue #7.

Worth a reviewer's attention

  • Three figures are carried through an outlet, not a primary document. FUNVISIS's two PDFs were unreachable during research (the host refused connections), so the 80% and 2 cm/yr figures are attributed via France 24, which names FUNVISIS and the year. Flagged as an open item in the research doc.
  • The 10:00–17:00 sun-avoidance window is regional health guidance; the PAHO article cited says "las horas de sol y de mayor calor" without naming hours. Flagged for tightening.
  • Two figures were found and deliberately dropped: the US 88% human-caused wildfire share (wrong country) and any Venezuelan flash-flood statistic (none retrievable). The pages teach the mechanism instead of asserting a number that no source supports.

Follow-ups, not in scope

  • Deciding whether the generic topic set is retired in favour of the researched one, which would remove the verde-contraste menu page and its six children.
  • Linking the surviving parks menu from public navigation.
  • astro check reports 33 pre-existing type errors, 22 of them lucide class/className. The CI typecheck step is non-blocking until that is cleared.

🤖 Generated with Claude Code

## Summary The palette question this PR opened is settled: both menus ship `tierra`. What separates them now is content, not colour. ```diff /prevencion-en-parques-tierra-sombra (Menú 03) - theme="tierra" topics: emergencyTopics (generic, 6) + theme="tierra" topics: parkTopics (researched, 5, cited) /prevencion-en-parques-verde-contraste (Menú 04) - theme="bosque" mode="dark" + theme="tierra" mode="light" # same palette, generic topics kept as comparison ``` The five park topics are risks that materialise *during a visit*, which is what makes them different from the site-wide temario. Earthquakes was a required inclusion. ```text src/data/parkTopics.ts ├── sismos-en-parques default ← required topic ├── incendios-de-vegetacion rounded-glass ├── tormentas-electricas timeline-step ├── golpe-de-calor default └── crecidas-subitas rounded-glass ``` `ParkTopic` is a **sibling** of `EmergencyTopic`, not a variant. It drops the infographic and visual steps and adds the two fields that carry the point of this change: ```diff type ParkTopic id, title, phases, mapNodes + figures: { value, label, detail }[] # the cited statistic + sources: { publisher, title, year, url }[] # what backs it + styleVariant: 'default' | 'rounded-glass' | 'timeline-step' - infographicItems, visualSteps ``` The rule the data file enforces: **no figure is asserted without a `sources` entry behind it.** Nothing is inferred. Every claim is recorded against its source in `docs/research/parks-topics-sources.md`, and each page ends with a visible `Fuentes` block so a reader can check a number without leaving the page. Sources used, in the priority order the research applied — Venezuelan state bodies first, then Venezuelan academia, then international agencies: MPPRIJP, FUNVISIS (via France 24), INAMEH (via Mongabay), ACFIMAN (via Noticiencias UCV), INPARQUES, OPS/OMS, NOAA/NWS, USGS, CDC/NIOSH, NASA (via Phys.org). A separate `ParkTopicSection` renders these instead of extending `EmergencyTopicSection`, because that component is shared with the frozen risk-management routes and [ADR-0002](../src/branch/master/docs/adr/0002-frozen-legacy-routes.md) keeps them untouched. ## Evidence **Before:** 62 routes. The tierra menu listed the same six generic topics as the risk menu, in two different palettes. **After:** 61 routes — the tierra menu has five children instead of six. ```text $ npm run build 61 page(s) built in 3.96s Complete! ``` Each topic renders the variant its data declares — checked against the built HTML, not the source: ```text $ grep -o "pc-glass-light|pc-brutalist-card|pc-hard-shadow-light" dist/.../$topic/index.html sismos-en-parques pc-hard-shadow-light (default) incendios-de-vegetacion pc-glass-light (rounded-glass) tormentas-electricas pc-brutalist-card (timeline-step) ``` Every page carries its sources block: ```text $ grep -c "Fuentes" dist/prevencion-en-parques-tierra-sombra/*/index.html sismos-en-parques incendios-de-vegetacion tormentas-electricas golpe-de-calor crecidas-subitas ✓ ✓ ✓ ✓ ✓ ``` Preview deploys automatically on every push to this branch and is live at **https://pr-10.folletos.gaboggamer.online/**. ## Merge Danger **Door:** Two-way. Everything here is additive or a prop change. `parkTopics`, `ParkTopicSection` and the research doc are new files; `ParksMenu` gained an optional `topicSet` prop that defaults to the existing behaviour, so omitting it changes nothing. Reverting restores the previous palette split without data loss. The one asymmetry: the `verde-contraste` **slug is retained** although the green palette is gone, so existing links keep resolving. Renaming it later would be the one-way step, and ADR-0002 governs that. **Blast Radius:** Contained. - No route renamed, moved or deleted — the ADR-0002 freeze is untouched. - `EmergencyTopicSection`, `emergencyTopics` and `/prevencion-y-gestion-de-riesgo` are not modified, so the shared blue topic pages are unaffected. - Route count changes 62 → 61; `docs/routes.md` updated to match. - The parks menus are still orphaned from public navigation, same condition as issue #7. ### Worth a reviewer's attention - **Three figures are carried through an outlet, not a primary document.** FUNVISIS's two PDFs were unreachable during research (the host refused connections), so the 80% and 2 cm/yr figures are attributed via France 24, which names FUNVISIS and the year. Flagged as an open item in the research doc. - **The 10:00–17:00 sun-avoidance window** is regional health guidance; the PAHO article cited says "las horas de sol y de mayor calor" without naming hours. Flagged for tightening. - **Two figures were found and deliberately dropped**: the US 88% human-caused wildfire share (wrong country) and any Venezuelan flash-flood statistic (none retrievable). The pages teach the mechanism instead of asserting a number that no source supports. ## Follow-ups, not in scope - Deciding whether the generic topic set is retired in favour of the researched one, which would remove the `verde-contraste` menu page and its six children. - Linking the surviving parks menu from public navigation. - `astro check` reports 33 pre-existing type errors, 22 of them lucide `class`/`className`. The CI typecheck step is non-blocking until that is cleared. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Adds .pc-theme-tierra and .pc-theme-bosque, which redefine the same
semantic slots :root already defines (--color-primary, --color-secondary,
--color-tertiary, backgrounds, --gradient-overlay, --shadow-hard) plus a
few surface tokens the parks menu needs.

Scoping them to a container rather than editing :root keeps the rest of
the site on the orange/blue identity while the parks palette is under
review. Both themes keep the emergency orange in --pc-alert at #d84a00
rather than #f25c05: white text on #f25c05 is about 3.4:1, below the 4.5
the design guide's WCAG requirement implies, and #d84a00 is already in
the guide as the dark end of --gradient-alert.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Replaces the generic "Acceso Rápido" trio (emergency numbers, emergency
backpack, what to do first) for the parks menu with three modules written
for open public spaces: what to check and pack before leaving, what to do
in the first minutes when someone goes missing, and how to coexist with
wildlife, vegetation and fire risk.

The scope covers urban parks and plazas and, as agreed, small public
reserves: open natural areas with trails and wildlife where phone signal
and on-site staff may both be missing. Several items address that case
specifically (download the map, do not search off-trail alone).

Content lives in data rather than in the pages so the two style options
share one source and can only differ by palette.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ParksMenu.astro holds the whole menu and takes a single `theme` prop
("tierra" or "bosque") that picks the palette class. Both style options
render this one component, so the only difference between them is colour
— which is the point of the comparison.

Two deliberate departures from the menu it is modelled on:

- Mobile-first, per the design guide's new layout rule 1. The risk cards
  are one markup tree that reflows (row on the phone, card on `md:`)
  instead of the existing pages' `hidden md:grid` plus `grid md:hidden`
  pair, so there is one set of cards to edit rather than two. The
  emergency number is the first element in the DOM and a 48px tap target.
- Stroke icons from lucide-react instead of emoji, matching the comps the
  palettes were chosen from.

The risk cards still link to the existing /prevencion-y-gestion-de-riesgo
topic pages; this change adds no child routes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Two thin pages over ParksMenu.astro, one per palette under review:

- /prevencion-en-parques-tierra-sombra — "tierra", light sand ground,
  light cards with a green bar; Layout mode="light".
- /prevencion-en-parques-verde-contraste — "bosque", deep green ground,
  mid-green cards with a lime bar; Layout mode="dark" so the sponsors
  footer follows the dark treatment.

Neither is linked from any page: they are review surfaces, and only one
palette is expected to survive the decision. Both keep <SponsorsFooter />
via Layout.

New routes only — no existing route is renamed, moved or deleted, so the
ADR-0002 freeze is untouched.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Adds both /prevencion-en-parques-* routes to the route table with their
source files, data sources and orphan status, and updates the total from
48 to 50 (1+1+1+6+1+6+2+8+24), verified against `getStaticPaths` and the
50 index.html files in dist/.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Author
Owner

Preview deployment

This PR is now served from the VPS, so the two palette options can be compared in a browser instead of in a mockup:

Option URL
E — tierra (light sand ground) https://pr-10.folletos.gaboggamer.online/prevencion-en-parques-tierra-sombra
F — bosque (dark green ground) https://pr-10.folletos.gaboggamer.online/prevencion-en-parques-verde-contraste
Site root (all 50 routes) https://pr-10.folletos.gaboggamer.online/

Built from feat/parks-menu-style-options, served by the existing Caddy instance through its previews/*.conf drop-in directory. This upload was done by hand; the Forgejo Actions workflow that rebuilds on every push and tears the preview down on close is still being wired up.

Known gap in this preview: the style switch on the 24 /[slug]-[style]-[mode] routes does not appear here. It is gated on process.env.VERCEL_ENV === 'preview' (BrochurePage.astro:33), which is never set outside Vercel. Making that gate host-neutral is part of the CI work, not this PR.

🤖 Generated with Claude Code

## Preview deployment This PR is now served from the VPS, so the two palette options can be compared in a browser instead of in a mockup: | Option | URL | | --- | --- | | **E — tierra** (light sand ground) | https://pr-10.folletos.gaboggamer.online/prevencion-en-parques-tierra-sombra | | **F — bosque** (dark green ground) | https://pr-10.folletos.gaboggamer.online/prevencion-en-parques-verde-contraste | | Site root (all 50 routes) | https://pr-10.folletos.gaboggamer.online/ | Built from `feat/parks-menu-style-options`, served by the existing Caddy instance through its `previews/*.conf` drop-in directory. This upload was done by hand; the Forgejo Actions workflow that rebuilds on every push and tears the preview down on close is still being wired up. **Known gap in this preview:** the style switch on the 24 `/[slug]-[style]-[mode]` routes does not appear here. It is gated on `process.env.VERCEL_ENV === 'preview'` (`BrochurePage.astro:33`), which is never set outside Vercel. Making that gate host-neutral is part of the CI work, not this PR. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Adds the two park routes to `menuOptions` in index.astro as "Menú 03"
and "Menú 04", so both palettes are reachable from the home page instead
of only by typing the URL. The grid is already `sm:grid-cols-2`, so four
cards fall into two rows with no layout change.

Both entries are labelled as options under evaluation, and a comment
records that the losing one is deleted along with its page once the
palette is chosen.

This does not touch the ADR-0002 freeze: that ADR makes the *URL* of `/`
immutable ("never be renamed, moved, or deleted"), not its contents.

Also updates docs/routes.md, which called both routes orphaned — they are
now linked from `/`, and the reachability paragraph said otherwise.

Images are placeholders drawn from existing assets (a tree in the rain, a
forest fire); the repo has no real park photography, so the press team
will need to supply it before this ships.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The park menu cards pointed at /prevencion-y-gestion-de-riesgo/[topic],
so tapping a risk from a green menu landed on the original blue page.
Those pages cannot simply be recoloured: they are shared with the risk
menu, which must stay blue, and their URLs are frozen by ADR-0002.

So each option gets its own six children under its own path, rendering
the same EmergencyTopicSection with the same emergencyTopics data inside
its palette wrapper, with the back button pointing at its own menu.
ParksMenu takes a `topicBase` prop rather than hardcoding the path, so
the component does not need to know the route names.

This works because EmergencyTopicSection carries no hardcoded palette
classes — all 20 of its colour references are var(--color-*) tokens, so
the wrapper retints it with no changes to the component.

Build goes 50 -> 62 pages; docs/routes.md updated to match, verified
against the index.html count in dist/.

Known gap: SismosInteractiveInfographic, rendered only for topic.id
'sismos', has 42 hardcoded Tailwind palette classes and stays blue/cyan
inside both park themes. It is shared with the frozen pages, so
converting it to tokens is a separate change with its own regression
risk.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Update the shared ParksMenu heading, the browser titles of both style
option pages and their topic pages, and the two dashboard entry labels.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Add an `npm run check` script so type errors can be inspected locally.

This is not yet wired as a blocking CI gate: `astro check` currently
reports 33 pre-existing errors, 22 of which are lucide-react icons given
`class` where the React prop types expect `className`. These are type-only
mismatches — Astro forwards `class` at runtime and the site builds — but
they need a separate pass before the check can gate pull requests.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ci: deploy PR previews from Forgejo Actions
Some checks failed
PR Preview / build (pull_request) Failing after 3m25s
PR Preview / teardown (pull_request) Has been skipped
9ebab032a8
Build the site on every pull request push and publish it to
pr-<N>.folletos.gaboggamer.online, replacing the manual upload. The
preview is removed again when the pull request closes, so stale previews
do not accumulate.

The deploy hop uses a key restricted by an authorized_keys forced
command, so it can only request `deploy <n>` or `teardown <n>` and cannot
obtain a shell. Host and credentials come from repository secrets and are
never committed.

The typecheck step is non-blocking for now: `astro check` reports 33
pre-existing errors that need their own pass before it can gate merges.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ci: re-run preview deploy after firewall fix
All checks were successful
PR Preview / build (pull_request) Successful in 44s
PR Preview / teardown (pull_request) Has been skipped
d0d470297c
Job containers get an ephemeral bridge subnet that SSH-GUARD dropped, so
the deploy step could not reach sshd. The allowlist now covers the Docker
bridge pool.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ci: re-run preview deploy on the pinned job network
Some checks failed
PR Preview / build (pull_request) Failing after 2m53s
PR Preview / teardown (pull_request) Has been skipped
c2b781a076
Job containers now attach to a network with a fixed subnet that the ssh
allowlist already covers, instead of an ephemeral one drawn from a pool
that spans two private ranges.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ci: re-run preview deploy
Some checks failed
PR Preview / build (pull_request) Failing after 2m53s
PR Preview / teardown (pull_request) Has been skipped
a450e5281f
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ci: re-run preview deploy
All checks were successful
PR Preview / build (pull_request) Successful in 43s
PR Preview / teardown (pull_request) Has been skipped
3348c88a4e
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ci: confirm preview deploy is reproducible
All checks were successful
PR Preview / build (pull_request) Successful in 42s
PR Preview / teardown (pull_request) Has been skipped
057eb7ebe1
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Add `parkTopics`, a park-specific topic set that replaces the generic
site-wide temario on the parks menu. The five topics are earthquakes,
vegetation fires, thunderstorms, heat illness and flash floods — each one
a risk that materialises during a visit rather than at home.

Every figure carries an attributable source, recorded claim by claim in
docs/research/parks-topics-sources.md. Where a primary document could not
be retrieved the record says so and names the outlet carrying the
attribution, rather than presenting the figure as first-hand.

Two deliberate omissions are noted in that file: the US human-caused
wildfire share was dropped because it describes another country, and no
Venezuelan flash-flood statistic is asserted because none was retrievable.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Add `ParkTopicSection`, which renders a park topic and maps its
`styleVariant` onto the three documented styles — default, rounded-glass
and timeline-step — reusing the classes already in global.css rather than
introducing new visual vocabulary. The timeline variant renders the
Antes/Durante/Después phases as numbered steps; the other two keep the
three-column layout.

Each page ends with a visible `Fuentes` block listing publisher, document
and year, so a reader can check any figure without leaving the page.

`ParksMenu` takes a `topicSet` prop to choose between the researched park
topics and the generic set, and sizes the topic grid to match. The
existing behaviour is unchanged when the prop is omitted.

A separate component is used instead of extending `EmergencyTopicSection`
because that one is shared with the frozen risk-management routes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
feat(parks): unify both menus on the tierra palette
All checks were successful
PR Preview / build (pull_request) Successful in 38s
PR Preview / teardown (pull_request) Has been skipped
c6df86e196
Both park menus now use the `tierra` palette in light mode, settling the
palette question the two options existed to answer. What distinguishes
them is no longer colour but content: the first carries the researched,
source-cited topics and the second keeps the generic site-wide temario as
a point of comparison.

The `verde-contraste` slug is retained so existing links keep working,
even though the green palette is no longer applied.

Update the home dashboard labels and summaries to describe the two menus
by their content, and record the new shape in the route inventory — the
first menu now has five children instead of six, bringing the total to 61.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
docs: add ParkTopic to the domain glossary
All checks were successful
PR Preview / build (pull_request) Successful in 37s
PR Preview / teardown (pull_request) Has been skipped
823ff4eed8
Record `ParkTopic` as a sibling of `EmergencyTopic` rather than a variant
of it, and state the rule that separates them: a park topic asserts no
figure without a source backing it.

Also correct the style-variant entry, which claimed the three styles were
brochure-only. Park topics now use the same vocabulary, one variant per
topic rather than a route per variant.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
gabogg changed title from feat(parks): add the parks menu as two palette options to feat(parks): give the parks menu five researched, source-cited topics 2026-09-21 11:12:41 +00:00
fix(parks): accent "GESTIÓN" in the parks menu titles
All checks were successful
PR Preview / build (pull_request) Successful in 1m28s
PR Preview / teardown (pull_request) Has been skipped
8b257ba79c
Correct the menu heading, both page titles, the topic page titles and the
two dashboard labels. Spanish orthography requires the accent, and the
rest of the product copy is accented.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
All checks were successful
PR Preview / build (pull_request) Successful in 1m28s
PR Preview / teardown (pull_request) Has been skipped
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/parks-menu-style-options:feat/parks-menu-style-options
git switch feat/parks-menu-style-options

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch master
git merge --no-ff feat/parks-menu-style-options
git switch feat/parks-menu-style-options
git rebase master
git switch master
git merge --ff-only feat/parks-menu-style-options
git switch feat/parks-menu-style-options
git rebase master
git switch master
git merge --no-ff feat/parks-menu-style-options
git switch master
git merge --squash feat/parks-menu-style-options
git switch master
git merge --ff-only feat/parks-menu-style-options
git switch master
git merge feat/parks-menu-style-options
git push origin master
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
PCivil/folletos-digitales!10
No description provided.