experimental: portfolio features (justified layout, unlisted pages, captions, per-album grid, focal point, nav links, cover hero) (#431)

## Was ist das?

Sieben neue Portfolio-Features, alle als **experimental** gekennzeichnet
— in YAML-Kommentaren, Admin-Panel-Labels und Commit-Scopes, damit sie
einzeln nachvollziehbar und revertierbar bleiben.

## Features (je ein Commit)

| Commit | Feature |
| --- | --- |
| `justified rows gallery layout` | Neues Grid-Layout `justified`:
zeilenbasiert, gleiche Höhen, volle Breite — Flexbox ohne JS-Messung,
letzte Zeile bleibt natürlich klein |
| `hide subpages from navigation` | `hidden: true`: Seite aus
Nav/Homepage raus, per Direktlink erreichbar — im Gegensatz zu `enabled:
false` (404) |
| `lightbox captions` | Immich-Asset-Description als Bildunterschrift im
Info-Panel; EXIF-Route liefert bei `exifOnHover: false` jetzt nur noch
die Caption statt 403 |
| `per-album grid overrides` | `grid:` pro Album-Eintrag, Präzedenz
global < Subpage < Album |
| `per-album cover focal point` | `coverPosition:` → `object-position`
auf Cover-Karten, strikt validiert |
| `external links in header navigation` | `navLinks:` in settings.yaml,
nur http(s), sanitisiert |
| `cover splash hero style` | `heroStyle: cover`: Fullscreen-Splash mit
Enter-Link ins Portfolio |

Alle Optionen sind im Admin-Panel editierbar (PageBuilder /
SettingsEditor).

## Tests

- 356 Unit-Tests grün (13 neue: deriveGallery hidden/grid/coverPosition,
sanitizeNavLinks, EXIF-Route-Captions, justified-Layout-Validierung)
- `npx tsc --noEmit`: 0 Fehler
- `npm run build`: sauber
- Justified-Zeilenmathematik und Cover-Splash per Browser-Harness
visuell/numerisch verifiziert (volle Zeilen enden exakt an der
Containerkante, letzte Zeile bleibt natürlich)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: ralksta <ralksta@users.noreply.github.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: lancetm714 <108419425+lancetm714@users.noreply.github.com>
This commit is contained in:
Ralksta
2026-08-14 17:56:22 +02:00
committed by GitHub
parent 2fe1157a5d
commit 84c7eeef40
24 changed files with 916 additions and 84 deletions

View File

@@ -244,6 +244,76 @@
overflow: hidden;
}
/* ── Cover / Splash hero (EXPERIMENTAL) ───────────── */
/* Fullscreen welcome page: one image, the title, a single Enter link. */
.hero--cover {
position: relative;
min-height: calc(100vh - 56px);
min-height: calc(100dvh - 56px);
overflow: hidden;
}
.hero--cover > span,
.hero--cover > img {
position: absolute !important;
inset: 0;
width: 100% !important;
height: 100% !important;
object-fit: cover;
}
.hero__cover-overlay {
position: absolute;
inset: 0;
z-index: 2;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
padding: 64px 40px;
background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.1) 75%);
color: #fff;
}
.hero--cover .hero__title,
.hero--cover .hero__subtitle {
color: #fff;
}
.hero__cover-enter {
display: inline-flex;
align-items: center;
gap: 10px;
margin-top: 36px;
padding: 12px 32px;
border: 1px solid rgba(255, 255, 255, 0.7);
border-radius: var(--radius-lg, 4px);
color: #fff;
font-family: var(--font-caption);
font-size: 0.85rem;
letter-spacing: 0.18em;
text-transform: uppercase;
text-decoration: none;
transition:
background var(--transition-normal),
color var(--transition-normal);
}
.hero__cover-enter:hover,
.hero__cover-enter:focus-visible {
background: #fff;
color: #000;
}
.hero__cover-enter-arrow {
transition: transform var(--transition-normal);
}
.hero__cover-enter:hover .hero__cover-enter-arrow {
transform: translateX(4px);
}
/* HeroCarousel images fill the entire container */
.hero--fullbleed > span,
.hero--fullbleed > img {
@@ -1084,6 +1154,55 @@
}
}
/* ── Justified Rows Layout (EXPERIMENTAL) ───────── */
/* Row-based justified layout: every row fills the container width, all
images in a row share the same height, aspect ratios stay intact.
Flex sizing (grow = aspect ratio) lives inline on the .fade-in wrapper. */
.photo-grid--justified {
display: flex;
flex-wrap: wrap;
gap: var(--grid-gap, 12px);
column-count: unset;
/* More columns → shorter rows, mirroring the density of the other layouts */
--grid-row-height: calc(900px / var(--grid-columns, 3));
}
/* Filler that soaks up leftover space so the last row keeps natural sizes
instead of stretching a lone image to full width */
.photo-grid--justified::after {
content: '';
flex-grow: 999999;
min-width: 0;
}
.photo-grid--justified > .fade-in {
height: var(--grid-row-height);
min-width: 0;
}
.photo-grid--justified .photo-grid__item {
height: 100%;
width: 100%;
margin-bottom: 0;
/* The base .photo-grid__item rule forces aspect-ratio from the grid
setting. Combined with height: 100% that pins the item width to
height × ratio, so it never fills the flex-grown wrapper and rows end
ragged. The wrapper's flex sizing is the only geometry source here. */
aspect-ratio: unset;
}
@media (max-width: 1024px) {
.photo-grid--justified {
--grid-row-height: 240px;
}
}
@media (max-width: 640px) {
.photo-grid--justified {
--grid-row-height: 160px;
}
}
.photo-grid__item img {
width: 100%;
height: 100%;