Area plates: shadowless and centred, and a book stack for Education

Merged
LU
3d ago
+269-32

Each area plate's ground shadow falls to the right. Centring the whole image therefore pushed the bricks left of centre. On phones the shadow also shrank the small icons. This PR also replaces the education plate.

Shadowless plates

  • scripts/rebrand/area_plate_bricks.py writes shadowless copies as assets/images/doors/area-<area>-bricks.webp. The shadow is pure black at up to 18% opacity (a Three.js ShadowMaterial), so the script subtracts it and restores the opacity and colour of brick edges that sat over it. It then trims each copy to its bricks.
  • The homepage and welcome-page doors (via the new layouts/partials/doors/area_plate.html) show these copies. So do the single plates on the resources, topic, earlier-cluster, Educators' Corner and Replication Hub pages. They all centre with plain object-fit: contain, with no offsets.

Education: a book stack under a mortarboard

  • This replaces the pop-up gatefold. It is candidate A from Claude in the area-plate exploration (see #1310).
  • Its renderer is committed as assets/js/castle/education-render.js. It takes its brick system, lights and camera scale from the castle.
  • render_area_illustrations.py now renders each plate with its own renderer: the harness takes ?renderer=, and the script accepts area names. Research and community re-render byte-identical.
  • Alt text follows the new picture on every page that shows it.

The first commit centred the shadowed bricks using measured bounds. The second commit replaces that with the shadowless copies, which looked better at every width.

Checked in screenshots at 1440 and 390 px on the homepage, welcome page, resources, an earlier cluster, Educators' Corner and a Replication Hub page. check_seo_html.py passes on a full build.

Homepage, desktop

Homepage areas at 1440 px, before and after

Homepage, phone (390 px)

Homepage areas at 390 px, before and after

Welcome page, desktop

Welcome page areas at 1440 px, before and after

Welcome page, phone (390 px)

Welcome page areas at 390 px, before and after

Teaching resources, desktop

Teaching resources header at 1440 px, before and after

šŸ¤– Generated with Claude Code