Hero-module: ASF golden files verwerkt in het ontwerp (preload als regio-paar, alleen WebP in LCP)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -15,8 +15,7 @@ Namespaces follow the existing modules (`SlpModularCms.Core.*`, `SlpModularCms.M
|
||||
| `HeroController` | Public read `GET /api/v1/hero` (anonymous, `[PublicSiteEndpoint]`, `public, max-age=60`, rate-limit policy `hero-public`, 204 when there is no active hero); management `GET /api/v1/hero/all` (the full hero including inactive slides and the schedule) and `PUT /api/v1/hero` (policy `AdminOnly`). Same convention as `offerings` and `offerings/all`. |
|
||||
| `HeroImagesController` (admin) | `POST /api/v1/hero/images` (multipart upload, size limit), `PUT /api/v1/hero/images/{id}/focus`, `DELETE /api/v1/hero/images/{id}`. |
|
||||
| `ButtonTargetValidator` | Pure function: accepts `#anchor`, `/path`, `https://host/...`, rejects everything else. |
|
||||
| `HeroHtmlTransform` (`IHtmlPageTransform`) | Fills `<!--CMS:HERO-HTML-->` regions: title lines, tagline, buttons and the first active slide as `<picture>`. Fail-open. |
|
||||
| `HeroPreloadMarkerProvider` (`IIndexHtmlMarkerProvider`) | Writes the one or two `<link rel="preload" as="image">` elements at `<!--CMS:HERO-PRELOAD-->`; shares the `srcset`/`sizes`/`media` generator with the transform so they are byte-for-byte equal. |
|
||||
| `HeroHtmlTransform` (`IHtmlPageTransform`) | Fills the two regions `<!--CMS:HERO-HTML-->…<!--/CMS:HERO-HTML-->` (title, tagline, buttons and the first active slide as `<picture>`) and `<!--CMS:HERO-PRELOAD-->…<!--/CMS:HERO-PRELOAD-->` in the head (one or two `<link rel="preload" as="image">`), both from the same renderer so `srcset`/`sizes`/`media` are byte-for-byte equal. Fail-open. (Changed after the ASF golden files: the preload is a region pair, not a single marker, so no separate marker provider is needed.) |
|
||||
| `HeroPictureRenderer` | Pure: one place that produces the `<picture>`/`<img>` attributes and the preload attributes from a `PublicHeroDto`; golden-tested. |
|
||||
| `HeroDataContributor` (`ICmsDataBlockContributor`) | Adds the key `hero` (the `PublicHeroDto`, or null) to the data block. |
|
||||
| `HeroTexts` + `Texts/nl.json`, `en.json` | Backend texts (validation messages) per `docs/translation-files.md`. |
|
||||
|
||||
Reference in New Issue
Block a user