45 lines
6.9 KiB
Markdown
45 lines
6.9 KiB
Markdown
# Hero comparison: SLP Software (SLS) vs Andrea Slop Fotografie (ASF)
|
|
|
|
Input for the requirements of `hero-module`. Sources: SLS = `src/features/landing/components/Hero.tsx`, `src/features/landing/data/content.ts` (`heroContent`), `src/prerender/StaticLanding.tsx`, `src/variants/e/Era2026.tsx` (read from the code by the CMS session, 2026-11-16); ASF = `web/src/components/Hero/*`, `web/src/content/heroContent.ts`, `types.ts` (delivered by the ASF session, 2026-11-16). Nothing here is a design decision yet; the decisions of Bryan are at the end.
|
|
|
|
## Comparison
|
|
|
|
| Aspect | SLS (Tailwind) | ASF (Chakra) | Same / different | Consequence for the CMS content |
|
|
|---|---|---|---|---|
|
|
| Small label above the title | `eyebrow` ("Web & .NET development"), shown in the code strip below | `tagline` ("Lifestyle fotograaf · Huizen"), a small uppercase label above the title, in the same `h1` | Same idea (short label), different place | One short text field ("tagline"); the site decides where it goes |
|
|
| Title | `heading` ("SLP software: websites, apps & meer", screen-reader only) and `displayHeading` (3 lines: "Websites," / "apps" / "& meer."); the era variant joins the lines with a space | `title` ("Andrea Slop"), one string, in the `h1` with the tagline | Different: SLS has a visual line split | One title text; line breaks as a separate optional representation (decision needed) |
|
|
| Lead / subtitle | `lead` (long paragraph, about 250 characters) | none | SLS only | Optional "subtitle/lead" text field |
|
|
| Code line | `codeLine` ("var website = slp.Bouw(uwIdee);") with blinking caret | none | SLS only, a style element | Not CMS content unless Bryan wants it editable (decision needed) |
|
|
| Buttons | Two: "Bekijk pakketten" (anchor `#pakketten`), "Plan een gesprek" (anchor `#contact`). Labels hardcoded in `Hero.tsx`; the era variant takes them from `nl.json` (`era.e2026.ctaPackages/ctaContact`) | One: `cta` `{label "Lees meer", to "/over-mij"}`, an internal route | Same idea (label + target), different count and target kind (page anchor vs site route) | 0..2 buttons, each label + target; the target is free text that the site interprets (anchor, route or address) |
|
|
| Images | None | `slides[]`, 8 images of 220 to 440 KB, JPG, one file per slide, no srcset or variants, object-fit cover, 100svh | Different | 0..n slides: the SLS hero has zero |
|
|
| Per slide | n/a | `id` (stable), `src`, `alt` (also read by the screen reader as "Photo n of N: alt"). No per-slide label, link or caption | ASF only | Slide: image, alt text, order; stable id |
|
|
| Display | Static, no slider | Slider: 6 s per slide, crossfade, slow zoom, pause on mouse hover / keyboard focus / hidden tab / pause button (WCAG 2.2.2), arrows and swipe, wrap-around; one slide = no arrows and no autoplay | Different | Optional "display" value (single / slideshow) that every site renders as it supports; the site keeps the timing and animation |
|
|
| Reduced motion | Not relevant (no motion beyond the caret) | `prefers-reduced-motion`: no autoplay, no progress bar, no pause button, no zoom | ASF only | Stays in the site |
|
|
| Noscript | The prerendered landing contains the hero text | Slide 1 stays as a static `<img>`; progress bar hidden; arrows and pause need JS | Both readable without JS | The first HTML must contain the hero (LCP) without JS |
|
|
| LCP | The text (heading) | The first slide image | **Different** | Host injection per kind: text for SLS; for ASF the first slide `<img>` with `fetchpriority="high"`, `width`/`height`, `srcset` and a matching `<link rel="preload" as="image">` |
|
|
| Loading | Everything in one page, text only | Active slide first; next and previous after `onLoad` plus 2 frames; the rest while advancing | ASF only | The host writes only slide 1 into the HTML; the site loads the rest from the data block |
|
|
| Prerender | `StaticLanding` renders the `Hero` into `#root` at build time (no hydration; `createRoot` replaces it) | Prerendered with the first slide and a preload link; slides 2 to 8 are empty wrappers | Same pattern (baked HTML, replaced by the app) | Host injection fills the baked hero and puts the full hero in the data block |
|
|
| Variants | Five era variants (Era1989 to Era2026) in `variants/e/`; only `Era2026` shows the hero content, it joins `displayHeading` | One layout | SLS only | Same content for every variant; the site renders it. The CMS has no layout choice |
|
|
| Where the text is now | `content.ts` (`heroContent`), button labels in `Hero.tsx` and `nl.json` (era) | `heroContent.ts`; aria texts ("Uitgelicht werk", "n van N", "Foto n van N") in the components | Both in code | Title, tagline, lead, buttons and alt texts move to the CMS; the aria texts go to the site's own language file, not the CMS |
|
|
| Socials | none in the hero | `HeroSocials` bottom left, from `siteContent.socials` | ASF only | Outside the hero module (site-wide) |
|
|
| CMS data today | Packages and banner via markers in `index.html`; the hero is not part of it | Packages and banners via markers and `#cms-data` (`{siteUrl, offerings, banners}`); the hero is not part of it | Same host contract | The data block gets a `hero` key; the baked hero stays the fallback (fail-open) |
|
|
| Image address | n/a | Vite import with hashed name in `/assets/` | n/a | CMS media URLs: the preload URL must equal the `img` src exactly; CSP `img-src` must allow the media host (same origin avoids a change) |
|
|
|
|
## What is the same (core of the CMS content)
|
|
|
|
Title (text), a short tagline, optional lead text, 0..2 buttons (label + target), and a list of 0..n slides (image, alt text, order). The sites differ in presentation, count and kind of buttons, and in whether slides exist.
|
|
|
|
## Decisions of Bryan (relayed by SLP Software - SLS - Main, 2026-11-16)
|
|
|
|
1. Same approach as packages and forms: the CMS delivers **content only**; every site keeps its own layout and presentation (ASF Chakra, SLS Tailwind). No layouts or sketch choice in the CMS or in the react package. A sketch choice may come later, with a third site.
|
|
2. The hero content comes **entirely from the CMS**: texts (title, tagline/subtitle), buttons (label, link) and images (0..n slides with image, alt text and optionally text per slide). Optionally a "display" field (for example single / slideshow) that every site renders according to its own support.
|
|
3. The comparison (this file) comes first; the question file is adjusted to what remains. Bryan answers both in one go.
|
|
4. The hero LCP (image or text) must be in the first HTML (prerender / host injection), and content is live (NFR-10).
|
|
|
|
## Facts from the sites that the design must respect
|
|
|
|
- ASF: the order of the slides decides the LCP; the first CMS slide must be in the first HTML with a preload whose URL is exactly the `img` src.
|
|
- ASF proposes the data shape `hero {title, tagline, cta{label,url}, slides[{id, imageUrl, width, height, alt, srcset?}]}` and delivers golden files after Bryan approves the requirements.
|
|
- ASF aria texts and the 6-second timing stay in the site; they move to the site's language file.
|
|
- SLS has no images; its hero has a lead and two buttons.
|