# Prototyping pages for a Gutenberg handoff

Use a static HTML prototype to explore a page before porting it into Drupal
Gutenberg. Use the [page-building guide](https://mangrove.undrr.org/llms-page-building.txt)
for block choice and serialization; this document covers the asset-repository
workflow, not a second block reference.

## Before visual editing

Read the supplied brief and later decisions. Make a compact mapping of required
passages, statistical qualifications, primary actions and destinations to page
sections. Preserve mandatory substance when editing for the web. Flag conflicting
figures or missing sources instead of choosing or inventing an answer. Record
which later decisions supersede the brief.

Map each section and interaction to the
[Mangrove component index](https://mangrove.undrr.org/ai-components/index.json).
Follow `detailsUrl` for markup and lifecycle requirements. Mark custom behavior
explicitly, including how it will enter Drupal: an existing block, an approved
embed or a custom integration that still needs implementation. Decide whether
the page needs the [global UNDRR shell](../mangrove/static-shell.md).

## Keep sources separate from the prototype

Follow an existing project's layout. For a new prototype, this is a useful
starting point, with only the directories the work needs:

```text
project/
  index.html       Authored page
  README.md        Preview, refresh and verification instructions
  assets/          Optimized images, CSS, JavaScript and data snapshots
  sources/         Original briefs, artwork and supplied interactive drafts
  scripts/         Reproducible preparation and snapshot refresh commands
  manifests/       Source/rights notes, brief mapping and unresolved dependencies
```

Preserve original filenames when they identify the brief's sequence. Keep source
artwork unchanged; record provenance and credit/rights information for derivatives.
Label draft visuals and hypothetical data. Record missing downloads and destinations
without making a working control promise unavailable content.

Everything committed here can be published by the asset-library build, including
`source` files. Keep internal briefs, transcripts and uncleared material outside
the published tree; the layout above is not permission to commit them. Verify
[Git ignore rules](../.gitignore) before staging authored `index.html` files, since
generated indexes are ignored by default. Do not force-add a whole source folder.

Serve the page over HTTP using the [local setup](../README.md#local-testing),
with CSS and scripts pinned to the same Mangrove release. Document any extra
image/SVG preparation dependencies beside their scripts.

## Verify and hand off the final behavior

Run `npm test` for repository regressions. Separately check the page's assets,
anchors, heading outline, keyboard operation, focus return, narrow layout and
reduced-motion behavior. Check meaningful content and navigation with JavaScript
or remote assets unavailable. Record the scope and limitations of automated
accessibility scans, including checks still requiring manual assessment.

After the last interaction change, update the README, manifests and verification
notes to describe the current behavior. Remove descriptions and results that
apply only to discarded designs. A small handoff record should state:

- Where each required passage and primary action appears.
- Which images, credits, figures, links and decisions are still pending.
- Which sections use standard blocks and which require custom integration.
- What was verified, against which page revision, and what remains unverified.

During the Gutenberg port, check actual block serialization, deployed text-format
restrictions, script/style delivery and an editor save/reopen round trip. HTML
comments naming destination blocks are planning notes; they do not establish
that the page validates or works in Drupal. Keep final data and editorial approval
separate from interface verification.
