Files
AndreaSlopFotografie/.ai/layout-conventions.md
T

34 lines
3.4 KiB
Markdown

# LAYOUT.md conventions
[LAYOUT.md](../LAYOUT.md) shows the abstract set-up of each page of the website. Every page section holds a Mermaid `block-beta` diagram showing only the abstract building blocks (sections) of that page, stacked top-to-bottom in the order they appear — no content/copy, just block names. This is meant to give a fast overview of what's on each page and double as a checklist of elements still to implement.
## Letter/color template
Used by every page except Shell (see exception below):
- Blocks are lettered `A`, `B`, `C`, ... in strict alphabetical order, top-to-bottom matching the page's visual order.
- Each letter has a **permanently fixed color** across the whole document — `A` is always `#e76f51`, `B` is always `#f4a261`, etc. (see template below). Colors are not tied to a block's meaning, only to its letter/position.
- To add a new page: write `block-beta` / `columns 1`, list the section labels as `A["..."]`, `B["..."]`, ... top-to-bottom, then copy the matching `style` lines straight from the template — no color decisions needed.
- If a block gets inserted mid-page, reletter every block from that point on so the sequence stays alphabetical (the style lines move with the letters, unchanged).
- If a page needs more blocks than the template currently has letters for, add a new letter/color rather than cycling back to `A` — never reuse a color, since that would visually suggest two different blocks are "the same element." A new color's stroke is always its fill at 25% darker (multiply each RGB channel by 0.75, round, convert back to hex), kept in the same style: medium-high saturation, similar lightness to the existing set.
- For two sections that sit side-by-side in one row (e.g. Contact's Photo + Contact form), switch that page's diagram to `columns 2`, give full-width blocks a `:2` span, and place the side-by-side pair as plain unspanned nodes next to each other in the code (no composite container needed) — small manual width tweaks to line them up are fine, it only needs to look "good enough."
Current letter → color template (extend with a new letter using the same formula if a 7th block is ever needed):
```
style A fill:#e76f51,stroke:#ad533d,color:#fff,font-size:16px,width:400px,height:125px,stroke-width:2px
style B fill:#f4a261,stroke:#b77a49,color:#fff,font-size:16px,width:400px,height:125px,stroke-width:2px
style C fill:#2a9d8f,stroke:#20766b,color:#fff,font-size:16px,width:400px,height:125px,stroke-width:2px
style D fill:#264653,stroke:#1d353e,color:#fff,font-size:16px,width:400px,height:125px,stroke-width:2px
style E fill:#e9c46a,stroke:#af9350,color:#fff,font-size:16px,width:400px,height:125px,stroke-width:2px
style F fill:#b56576,stroke:#884c59,color:#fff,font-size:16px,width:400px,height:125px,stroke-width:2px
```
## Exception — Shell
The Shell page is structural (the Header/Content/Footer wrapper around every page), not a content page, so it deliberately does not follow the letter/color template above. It uses named ids (`Header`, `Content`, `Footer`), a shorter `height:50px`, and a neutral style for `Content` as a placeholder for "wherever each page's own diagram goes."
## Source of truth
For a page's real section order/content, check the static design in [design/andreaslop-static/](../design/andreaslop-static/) — the matching HTML file there — when unsure which sections exist or their order. If a page's structure is still ambiguous from the design folder, ask the user rather than guessing.