Document the two production-template fixes in the inner-page spec

This commit is contained in:
Keith Solomon
2026-07-01 12:16:52 -05:00
parent 8b7819e932
commit 667cb2ec89
@@ -63,7 +63,7 @@ These rules are scoped to `.page-hero` and only affect the page-hero partial. Th
A small PHP partial that renders a single centered column:
- Wrapper: `<section class="page-intro py-12 lg:py-20 text-center">`
- Container: `<div class="container mx-auto max-w-3xl content-wrapper">`
- Container: `<div class="mx-auto max-w-3xl content-wrapper">` — note: the `container` Tailwind utility is intentionally **not** used here. The project's `styles/base/global.css` defines `.container { max-width: 80.5rem; }` (1288px), and because `global.css` is loaded after the Tailwind utilities in the cascade, `container` would override `max-w-3xl` (768px) on desktop, producing an over-wide intro. Use only `mx-auto max-w-3xl` so the cap applies.
- Inner: a single `<p>` element with `text-lg lg:text-xl leading-relaxed` containing `wp_kses_post( $intro )`.
No new fields, no new CSS file — Tailwind utilities cover the layout.
@@ -73,7 +73,7 @@ No new fields, no new CSS file — Tailwind utilities cover the layout.
`page.php` changes from rendering the body directly to:
1. Output the article container (existing behavior).
2. If `get_field( 'intro' )` is non-empty, call `get_template_part( 'views/partials/page-intro' )`.
2. If `get_field( 'intro' )` is non-empty, call `get_template_part( 'views/partials/page-intro' )` **as a sibling of** the `entry-content` div (not inside it). The intro must be a peer of the body in the layout flow, not a child, so the test's order assertion `introBox.y < contentBox.y` holds (when intro is a child of entry-content, the two bounding boxes share the same top y and the order check fails).
3. Render `the_content` (existing behavior).
4. Render the sidebar if `hasSidebar()` (existing behavior).