feat: add noir, monograph, botanica presets + stacked/typographic/mosaic hero styles + showcase/filmstrip/editorial-flow gallery layouts

- 3 new theme presets: noir (darkroom analog), monograph (typographic book), botanica (organic nature)
- 3 new hero styles: stacked (fullbleed + thumbnail strip), typographic (text-only), mosaic (multi-image grid)
- 3 new gallery layouts: showcase (featured + grid), filmstrip (horizontal scroll), editorial-flow (alternating pairs)
- Extended config types, validation, and CSS tokens for all new options
- Updated theming docs with new presets table, descriptions, and example configs
This commit is contained in:
ralksta
2026-02-15 21:58:31 +01:00
parent 4e040c28f3
commit 4b80af1c29
6 changed files with 1238 additions and 74 deletions

View File

@@ -32,7 +32,7 @@ export interface PhotoItem {
interface PhotoGridProps { interface PhotoGridProps {
assets: PhotoItem[]; assets: PhotoItem[];
albumId: string; albumId: string;
layout?: 'masonry' | 'uniform'; layout?: 'masonry' | 'uniform' | 'showcase' | 'filmstrip' | 'editorial-flow';
gridStyle?: React.CSSProperties; gridStyle?: React.CSSProperties;
} }
@@ -136,7 +136,8 @@ export function PhotoGrid({ assets, layout = 'masonry', gridStyle }: PhotoGridPr
{assets.map((asset, index) => ( {assets.map((asset, index) => (
<FadeIn key={asset.id} delay={index < 12 ? index * 50 : 0}> <FadeIn key={asset.id} delay={index < 12 ? index * 50 : 0}>
<div <div
className="photo-grid__item" className={`photo-grid__item${layout === 'showcase' && index === 0 ? ' photo-grid__featured' : ''
}`}
onClick={() => openLightbox(index)} onClick={() => openLightbox(index)}
onKeyDown={(e) => { onKeyDown={(e) => {
if (e.key === 'Enter' || e.key === ' ') { if (e.key === 'Enter' || e.key === ' ') {
@@ -149,7 +150,7 @@ export function PhotoGrid({ assets, layout = 'masonry', gridStyle }: PhotoGridPr
aria-label={`View photo ${index + 1}`} aria-label={`View photo ${index + 1}`}
style={{ style={{
...(asset.dominantColor ? { backgroundColor: asset.dominantColor } : {}), ...(asset.dominantColor ? { backgroundColor: asset.dominantColor } : {}),
...(layout === 'masonry' && asset.aspectRatio ...((layout === 'masonry' || layout === 'showcase') && asset.aspectRatio
? { aspectRatio: `${asset.aspectRatio}` } ? { aspectRatio: `${asset.aspectRatio}` }
: {}), : {}),
}} }}

View File

@@ -158,6 +158,266 @@
opacity: 1; opacity: 1;
} }
/* ── Hero: Stacked Layout ───────────────────────── */
.hero--stacked {
display: flex;
flex-direction: column;
min-height: calc(100vh - 56px);
}
.hero__stacked-image {
position: relative;
flex: 1;
min-height: 70vh;
min-height: 70svh;
}
.hero__stacked-overlay {
position: absolute;
bottom: 0;
left: 0;
right: 0;
z-index: 2;
padding: 48px 40px;
background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 100%);
}
.hero--stacked .hero__title {
font-family: var(--font-serif);
font-size: 3.5rem;
font-weight: 300;
letter-spacing: 0.06em;
text-transform: uppercase;
color: #fff;
margin-bottom: 4px;
}
.hero--stacked .hero__subtitle {
font-family: var(--font-sans);
font-size: 0.8rem;
font-weight: 300;
letter-spacing: 0.2em;
text-transform: uppercase;
color: rgba(255, 255, 255, 0.6);
}
.hero__thumbnail-strip {
display: flex;
gap: 2px;
overflow-x: auto;
scrollbar-width: none;
-ms-overflow-style: none;
background: var(--bg-secondary);
padding: 0;
}
.hero__thumbnail-strip::-webkit-scrollbar {
display: none;
}
.hero__thumbnail-item {
flex: 0 0 auto;
display: flex;
align-items: center;
justify-content: center;
padding: 16px 28px;
background: var(--bg-card);
transition:
background var(--transition-fast),
color var(--transition-fast);
}
.hero__thumbnail-item:hover {
background: var(--bg-card-hover);
}
.hero__thumbnail-label {
font-family: var(--font-sans);
font-size: 0.7rem;
font-weight: 400;
letter-spacing: 0.15em;
text-transform: uppercase;
color: var(--text-secondary);
white-space: nowrap;
transition: color var(--transition-fast);
}
.hero__thumbnail-item:hover .hero__thumbnail-label {
color: var(--text-primary);
}
/* ── Hero: Typographic Layout ───────────────────── */
.hero--typographic {
display: flex;
align-items: center;
justify-content: center;
min-height: calc(100vh - 56px);
padding: 64px 40px;
}
.hero--typographic .hero__content {
text-align: center;
max-width: 700px;
}
.hero--typographic .hero__title {
font-family: var(--font-serif);
font-size: 8rem;
font-weight: 400;
letter-spacing: -0.02em;
line-height: 0.95;
margin-bottom: 16px;
}
.hero--typographic .hero__subtitle {
font-family: var(--font-sans);
font-size: 0.85rem;
font-weight: 300;
letter-spacing: 0.2em;
text-transform: uppercase;
color: var(--text-muted);
margin-bottom: 32px;
}
.hero__divider {
width: 60px;
height: 1px;
background: var(--border-subtle);
margin: 0 auto 32px;
}
.hero__nav--indexed {
display: flex;
flex-direction: column;
gap: 4px;
align-items: center;
}
.hero__nav--indexed .hero__nav-link {
display: inline-flex;
align-items: center;
gap: 12px;
font-family: var(--font-sans);
font-size: 0.85rem;
font-weight: 300;
letter-spacing: 0.06em;
color: var(--text-secondary);
padding: 6px 0;
text-decoration: none;
text-transform: none;
border-bottom: none;
transition: color var(--transition-fast);
}
.hero__nav--indexed .hero__nav-link:hover {
color: var(--text-primary);
}
.hero__nav-index {
font-family: var(--font-caption, monospace);
font-size: 0.65rem;
font-weight: 400;
letter-spacing: 0.1em;
color: var(--text-muted);
min-width: 20px;
}
/* ── Hero: Mosaic Layout ────────────────────────── */
.hero--mosaic {
position: relative;
min-height: calc(100vh - 56px);
}
.hero__mosaic-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-template-rows: 1fr 1fr;
gap: 2px;
min-height: calc(100vh - 56px);
}
.hero__mosaic-cell {
position: relative;
overflow: hidden;
}
.hero__mosaic-cell img {
object-fit: cover;
}
/* Cell 1: spans 2 rows on the left */
.hero__mosaic-cell--1 {
grid-row: 1 / 3;
}
/* Cell 2: wide, top right */
.hero__mosaic-cell--2 {
grid-column: 2 / 4;
}
/* Remaining cells fill naturally */
.hero__mosaic-overlay {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 2;
text-align: center;
padding: 40px 48px;
background: rgba(0, 0, 0, 0.6);
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
border-radius: var(--radius-md);
border: 1px solid rgba(255, 255, 255, 0.08);
}
.hero--mosaic .hero__title {
font-family: var(--font-serif);
font-size: 3rem;
font-weight: 300;
letter-spacing: 0.06em;
text-transform: uppercase;
color: #fff;
margin-bottom: 4px;
}
.hero--mosaic .hero__subtitle {
font-family: var(--font-sans);
font-size: 0.8rem;
font-weight: 300;
letter-spacing: 0.2em;
text-transform: uppercase;
color: rgba(255, 255, 255, 0.6);
margin-bottom: 24px;
}
.hero--mosaic .hero__nav {
display: flex;
flex-direction: row;
gap: 16px;
justify-content: center;
flex-wrap: wrap;
}
.hero--mosaic .hero__nav-link {
font-size: 0.7rem;
letter-spacing: 0.12em;
color: rgba(255, 255, 255, 0.7);
text-transform: uppercase;
text-decoration: none;
padding: 4px 0;
border-bottom: 1px solid transparent;
transition:
color var(--transition-fast),
border-color var(--transition-fast);
}
.hero--mosaic .hero__nav-link:hover {
color: #fff;
border-bottom-color: #fff;
}
/* ── Section Labels ──────────────────────────────── */ /* ── Section Labels ──────────────────────────────── */
.section-label { .section-label {
font-family: var(--font-sans); font-family: var(--font-sans);
@@ -279,12 +539,10 @@
flex-direction: column; flex-direction: column;
justify-content: flex-end; justify-content: flex-end;
padding: 24px; padding: 24px;
background: linear-gradient( background: linear-gradient(to top,
to top, rgba(0, 0, 0, 0.8) 0%,
rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.3) 40%,
rgba(0, 0, 0, 0.3) 40%, transparent 100%);
transparent 100%
);
opacity: 0; opacity: 0;
transition: opacity var(--transition-normal); transition: opacity var(--transition-normal);
} }
@@ -372,6 +630,91 @@
margin-bottom: 0; margin-bottom: 0;
} }
/* ── Showcase Layout ────────────────────────────── */
/* First item gets full width; rest in standard grid */
.photo-grid--showcase {
display: grid;
grid-template-columns: repeat(var(--grid-columns, 3), 1fr);
gap: var(--grid-gap, 12px);
column-count: unset;
}
.photo-grid--showcase .photo-grid__featured {
grid-column: 1 / -1;
aspect-ratio: 16 / 9;
margin-bottom: 0;
}
.photo-grid--showcase .photo-grid__item {
margin-bottom: 0;
}
/* ── Filmstrip Layout ───────────────────────────── */
/* Horizontal scroll of tall vertical strips */
.photo-grid--filmstrip {
display: flex;
flex-wrap: nowrap;
overflow-x: auto;
overflow-y: hidden;
gap: var(--grid-gap, 6px);
column-count: unset;
scroll-snap-type: x mandatory;
-webkit-overflow-scrolling: touch;
scrollbar-width: thin;
scrollbar-color: var(--text-muted) transparent;
padding-bottom: 8px;
}
.photo-grid--filmstrip .photo-grid__item {
flex: 0 0 auto;
width: 280px;
height: 440px;
margin-bottom: 0;
scroll-snap-align: start;
aspect-ratio: unset;
}
@media (max-width: 640px) {
.photo-grid--filmstrip .photo-grid__item {
width: 220px;
height: 340px;
}
}
/* ── Editorial Flow Layout ──────────────────────── */
/* Alternating full-width singles and 2-column pairs */
.photo-grid--editorial-flow {
display: grid;
grid-template-columns: 1fr 1fr;
gap: var(--grid-gap, 16px);
column-count: unset;
}
.photo-grid--editorial-flow .photo-grid__item {
margin-bottom: 0;
aspect-ratio: 4 / 3;
}
/* Every 3rd item (1st, 4th, 7th, …) spans full width */
.photo-grid--editorial-flow .photo-grid__item:nth-child(3n + 1) {
grid-column: 1 / -1;
aspect-ratio: 21 / 9;
}
@media (max-width: 640px) {
.photo-grid--editorial-flow {
grid-template-columns: 1fr;
}
.photo-grid--editorial-flow .photo-grid__item:nth-child(3n + 1) {
aspect-ratio: 16 / 9;
}
.photo-grid--editorial-flow .photo-grid__item {
aspect-ratio: 16 / 9;
}
}
.photo-grid__item img { .photo-grid__item img {
width: 100%; width: 100%;
height: 100%; height: 100%;
@@ -414,12 +757,10 @@
/* ── Loading States ───────────────────────────────── */ /* ── Loading States ───────────────────────────────── */
.skeleton { .skeleton {
background: linear-gradient( background: linear-gradient(90deg,
90deg, var(--bg-card) 0%,
var(--bg-card) 0%, var(--bg-card-hover) 50%,
var(--bg-card-hover) 50%, var(--bg-card) 100%);
var(--bg-card) 100%
);
background-size: 200% 100%; background-size: 200% 100%;
animation: skeleton-shimmer 1.5s infinite; animation: skeleton-shimmer 1.5s infinite;
border-radius: var(--radius-sm); border-radius: var(--radius-sm);
@@ -1347,6 +1688,455 @@
letter-spacing: 0.06em; letter-spacing: 0.06em;
} }
/* ══════════════════════════════════════════════════════
THEME: Noir — Darkroom Analog
══════════════════════════════════════════════════════ */
/* Header: transparent with subtle warm border */
[data-preset='noir'] .header {
background: transparent;
backdrop-filter: none;
-webkit-backdrop-filter: none;
border-bottom: 1px solid rgba(255, 107, 53, 0.1);
}
[data-preset='noir'] .header__nav-link {
font-size: 0.65rem;
font-weight: 400;
letter-spacing: 0.15em;
}
/* Photo grid: warm analog feel */
[data-preset='noir'] .photo-grid__item img {
filter: sepia(0.08) contrast(1.02);
transition:
filter 0.8s ease,
transform 0.8s ease,
box-shadow 0.8s ease;
}
[data-preset='noir'] .photo-grid__item:hover img {
filter: sepia(0) contrast(1) brightness(0.88);
transform: scale(1.01);
}
/* Vignette hover effect */
[data-preset='noir'] .photo-grid__item::before {
content: '';
position: absolute;
inset: 0;
z-index: 1;
box-shadow: inset 0 0 60px rgba(0, 0, 0, 0);
pointer-events: none;
transition: box-shadow 0.8s ease;
}
[data-preset='noir'] .photo-grid__item:hover::before {
box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.4);
}
/* Film-edge EXIF labels */
[data-preset='noir'] .photo-grid__item-exif {
font-family: var(--font-caption);
font-size: 0.6rem;
letter-spacing: 0.08em;
text-transform: uppercase;
color: rgba(255, 200, 150, 0.7);
}
/* Album cards */
[data-preset='noir'] .album-card {
border: none;
border-radius: 0;
}
[data-preset='noir'] .album-card:hover {
transform: none;
border-color: transparent;
}
[data-preset='noir'] .album-card__title {
font-weight: 400;
letter-spacing: 0.04em;
}
/* Section labels */
[data-preset='noir'] .section-label {
font-family: var(--font-caption);
font-size: 0.6rem;
letter-spacing: 0.15em;
text-transform: uppercase;
}
/* Album header */
[data-preset='noir'] .album-header__title {
font-weight: 300;
letter-spacing: 0.04em;
}
/* Footer */
[data-preset='noir'] .footer {
border-top: 1px solid rgba(255, 107, 53, 0.1);
}
[data-preset='noir'] .footer__name {
font-family: var(--font-caption);
font-size: 0.65rem;
letter-spacing: 0.12em;
}
/* Subpage grid */
[data-preset='noir'] .subpage-grid__item {
border: none;
}
[data-preset='noir'] .subpage-grid__item-title {
font-weight: 400;
letter-spacing: 0.05em;
}
/* ══════════════════════════════════════════════════════
THEME: Monograph — Typographic / Book
══════════════════════════════════════════════════════ */
/* Header: thin hairline border, centered */
[data-preset='monograph'] .header {
background: transparent;
backdrop-filter: none;
-webkit-backdrop-filter: none;
border-bottom: 1px solid var(--border-subtle);
}
[data-preset='monograph'] .header__nav {
justify-content: center;
}
[data-preset='monograph'] .header__nav-link {
font-size: 0.6rem;
font-weight: 400;
letter-spacing: 0.2em;
color: var(--text-muted);
}
[data-preset='monograph'] .header__nav-link:hover,
[data-preset='monograph'] .header__nav-link.active {
color: var(--text-primary);
border-bottom-color: var(--text-primary);
}
/* Photo grid: numbered indices with CSS counter */
[data-preset='monograph'] .photo-grid {
counter-reset: photo-index;
column-gap: 40px;
}
[data-preset='monograph'] .photo-grid__item {
counter-increment: photo-index;
margin-bottom: 48px;
}
[data-preset='monograph'] .photo-grid__item::before {
content: counter(photo-index, decimal-leading-zero);
position: absolute;
top: -28px;
left: 0;
font-family: var(--font-caption);
font-size: 0.65rem;
font-weight: 400;
letter-spacing: 0.1em;
color: var(--text-muted);
z-index: 2;
pointer-events: none;
}
[data-preset='monograph'] .photo-grid__item:hover img {
filter: none;
transform: none;
}
[data-preset='monograph'] .photo-grid__item:active img {
filter: brightness(0.85);
transform: none;
}
/* Caption slide-up on hover */
[data-preset='monograph'] .photo-grid__item-exif {
position: absolute;
bottom: 0;
left: 0;
right: 0;
background: var(--bg-card);
color: var(--text-secondary);
font-family: var(--font-caption);
font-size: 0.65rem;
letter-spacing: 0.05em;
padding: 10px 12px;
opacity: 0;
transform: translateY(100%);
transition:
opacity 0.4s ease,
transform 0.4s ease;
}
[data-preset='monograph'] .photo-grid__item:hover .photo-grid__item-exif {
opacity: 1;
transform: translateY(0);
}
/* Album cards: minimal text below */
[data-preset='monograph'] .album-card {
border: 1px solid var(--border-subtle);
border-radius: 0;
}
[data-preset='monograph'] .album-card:hover {
border-color: var(--text-primary);
transform: none;
}
[data-preset='monograph'] .album-card:hover .album-card__image {
transform: none;
filter: none;
}
[data-preset='monograph'] .album-card__overlay {
background: linear-gradient(to top, rgba(0, 0, 0, 0.4) 0%, transparent 30%);
opacity: 1;
}
[data-preset='monograph'] .album-card__title {
font-family: var(--font-sans);
font-size: 0.75rem;
font-weight: 400;
letter-spacing: 0.12em;
text-transform: uppercase;
}
[data-preset='monograph'] .album-card__count {
font-family: var(--font-caption);
font-size: 0.6rem;
letter-spacing: 0.08em;
}
/* Section labels: thin hairline rule */
[data-preset='monograph'] .section-label {
font-family: var(--font-sans);
font-size: 0.6rem;
letter-spacing: 0.2em;
color: var(--text-muted);
padding-bottom: 12px;
border-bottom: 1px solid var(--border-subtle);
}
/* Album header: large serif with wide spacing */
[data-preset='monograph'] .album-header {
margin-bottom: 72px;
}
[data-preset='monograph'] .album-header__title {
font-family: var(--font-serif);
font-size: 3rem;
font-weight: 400;
letter-spacing: 0.02em;
text-transform: none;
}
[data-preset='monograph'] .album-header__meta {
font-family: var(--font-caption);
font-size: 0.75rem;
letter-spacing: 0.05em;
margin-top: 12px;
}
/* Footer */
[data-preset='monograph'] .footer {
border-top: 1px solid var(--border-subtle);
}
[data-preset='monograph'] .footer__name {
font-size: 0.6rem;
letter-spacing: 0.15em;
}
/* Main: extra generous margins */
[data-preset='monograph']~body .main {
padding: 80px 60px 120px;
}
/* Subpage grid */
[data-preset='monograph'] .subpage-grid {
gap: 1px;
}
[data-preset='monograph'] .subpage-grid__item {
border: 1px solid var(--border-subtle);
}
[data-preset='monograph'] .subpage-grid__item-title {
font-family: var(--font-sans);
font-size: 0.7rem;
letter-spacing: 0.15em;
text-transform: uppercase;
}
/* ══════════════════════════════════════════════════════
THEME: Botanica — Organic / Nature
══════════════════════════════════════════════════════ */
/* Header: warm with green tint */
[data-preset='botanica'] .header {
background: rgba(20, 26, 20, 0.9);
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
border-bottom: 1px solid rgba(74, 124, 89, 0.12);
}
[data-preset='botanica'][data-theme='light'] .header {
background: rgba(250, 247, 240, 0.9);
}
[data-preset='botanica'] .header__nav-link {
font-size: 0.7rem;
font-weight: 400;
letter-spacing: 0.12em;
}
/* Hero: warm organic feel */
[data-preset='botanica'] .hero__title {
font-size: 3.5rem;
font-weight: 400;
letter-spacing: 0.04em;
text-transform: none;
line-height: 1.15;
}
[data-preset='botanica'] .hero__subtitle {
font-family: var(--font-caption);
font-size: 0.85rem;
font-weight: 400;
letter-spacing: 0.1em;
text-transform: none;
font-style: italic;
margin-bottom: 36px;
opacity: 0.7;
}
[data-preset='botanica'] .hero__nav-link {
font-family: var(--font-sans);
font-size: 0.8rem;
font-weight: 400;
letter-spacing: 0.06em;
text-transform: none;
border-bottom: none;
}
[data-preset='botanica'] .hero__nav-link:hover {
color: var(--accent);
border-bottom-color: transparent;
}
/* Photo grid: soft organic hover */
[data-preset='botanica'] .photo-grid {
column-gap: var(--grid-gap, 16px);
}
[data-preset='botanica'] .photo-grid__item {
margin-bottom: var(--grid-gap, 16px);
border-radius: 8px;
}
[data-preset='botanica'] .photo-grid__item:hover img {
filter: brightness(0.9) saturate(1.1);
transform: scale(1.01);
}
/* Album cards: warm rounded with organic overlay */
[data-preset='botanica'] .album-card {
border-radius: 12px;
border: 1px solid rgba(74, 124, 89, 0.1);
}
[data-preset='botanica'][data-theme='light'] .album-card {
border-color: rgba(74, 124, 89, 0.15);
}
[data-preset='botanica'] .album-card:hover {
border-color: var(--accent);
transform: translateY(-2px);
}
[data-preset='botanica'] .album-card__title {
font-weight: 400;
letter-spacing: 0.04em;
text-transform: none;
}
[data-preset='botanica'] .album-card__count {
font-family: var(--font-caption);
font-style: italic;
font-size: 0.8rem;
}
/* Section labels: botanical ornament dividers */
[data-preset='botanica'] .section-label {
font-family: var(--font-caption);
font-size: 0.75rem;
font-weight: 400;
font-style: italic;
letter-spacing: 0.1em;
text-transform: none;
color: var(--text-secondary);
}
[data-preset='botanica'] .section-label::before {
content: '❧ ';
color: var(--accent);
}
/* Album header */
[data-preset='botanica'] .album-header__title {
font-weight: 400;
letter-spacing: 0.04em;
text-transform: none;
font-size: 2.4rem;
}
[data-preset='botanica'] .album-header__meta {
font-family: var(--font-caption);
font-style: italic;
}
/* Footer */
[data-preset='botanica'] .footer {
border-top: 1px solid rgba(74, 124, 89, 0.12);
}
[data-preset='botanica'] .footer__name {
font-family: var(--font-caption);
font-style: italic;
text-transform: none;
letter-spacing: 0.06em;
font-size: 0.8rem;
}
/* Scroll-to-top */
[data-preset='botanica'] .scroll-to-top {
border-radius: 12px;
}
/* Subpage grid */
[data-preset='botanica'] .subpage-grid__item {
border: 1px solid rgba(74, 124, 89, 0.1);
border-radius: 8px;
overflow: hidden;
}
[data-preset='botanica'] .subpage-grid__item-title {
font-weight: 400;
letter-spacing: 0.04em;
text-transform: none;
}
@media (max-width: 1024px) { @media (max-width: 1024px) {
.photo-grid { .photo-grid {
--grid-columns: 2; --grid-columns: 2;
@@ -1437,4 +2227,62 @@
[data-preset='classic'] .hero__title { [data-preset='classic'] .hero__title {
font-size: 2rem; font-size: 2rem;
} }
/* Stacked: compact overlay */
.hero__stacked-overlay {
padding: 24px 20px;
}
.hero--stacked .hero__title {
font-size: 2rem;
}
.hero__thumbnail-item {
padding: 12px 20px;
}
/* Typographic: scale down massive title */
.hero--typographic {
padding: 40px 24px;
}
.hero--typographic .hero__title {
font-size: 3.5rem;
}
/* Mosaic: simplify to 2-column */
.hero__mosaic-grid {
grid-template-columns: 1fr 1fr;
grid-template-rows: auto;
}
.hero__mosaic-cell--1 {
grid-row: auto;
}
.hero__mosaic-cell--2 {
grid-column: auto;
}
.hero__mosaic-cell:nth-child(n + 5) {
display: none;
}
.hero__mosaic-overlay {
padding: 24px 28px;
}
.hero--mosaic .hero__title {
font-size: 2rem;
}
/* Monograph: scale album header */
[data-preset='monograph'] .album-header__title {
font-size: 2rem;
}
/* Botanica: scale hero title */
[data-preset='botanica'] .hero__title {
font-size: 2rem;
}
} }

View File

@@ -1,10 +1,11 @@
/** /**
* Homepage — Split hero layout. * Homepage — renders different hero layouts based on theme config.
* Left panel: site title, subtitle, navigation links. *
* Right panel: hero image carousel from Immich. * Styles: split, fullbleed, minimal, stacked, typographic, mosaic.
*/ */
import Link from 'next/link'; import Link from 'next/link';
import Image from 'next/image';
import { immich } from '@/lib/immich'; import { immich } from '@/lib/immich';
import { getConfig } from '@/lib/config'; import { getConfig } from '@/lib/config';
import { imageUrl, assetPlaceholder } from '@/lib/urls'; import { imageUrl, assetPlaceholder } from '@/lib/urls';
@@ -14,6 +15,30 @@ import { FadeIn } from '@/components/FadeIn';
// Render at request time — requires live Immich connection // Render at request time — requires live Immich connection
export const dynamic = 'force-dynamic'; export const dynamic = 'force-dynamic';
/** Shared nav links for hero sections. */
function HeroNavLinks({
subpages,
albums,
}: {
subpages: { slug: string; name: string }[];
albums: { id: string; slug: string; albumName: string }[];
}) {
return (
<>
{subpages.map((sp) => (
<Link key={sp.slug} href={`/${sp.slug}`} className="hero__nav-link">
{sp.name}
</Link>
))}
{albums.map((album) => (
<Link key={album.id} href={`/${album.slug}`} className="hero__nav-link">
{album.albumName}
</Link>
))}
</>
);
}
export default async function HomePage() { export default async function HomePage() {
const config = getConfig(); const config = getConfig();
const [subpages, albums] = await Promise.all([ const [subpages, albums] = await Promise.all([
@@ -33,6 +58,129 @@ export default async function HomePage() {
}), }),
); );
const heroStyle = config.theme.heroStyle;
// ── Typographic: no image, pure text ───────────────────────────
if (heroStyle === 'typographic') {
return (
<div className="hero hero--typographic">
<div className="hero__content">
<FadeIn delay={0}>
<h1 className="hero__title">{config.siteTitle}</h1>
</FadeIn>
{config.siteSubtitle && (
<FadeIn delay={100}>
<p className="hero__subtitle">{config.siteSubtitle}</p>
</FadeIn>
)}
<FadeIn delay={200}>
<div className="hero__divider" />
</FadeIn>
<FadeIn delay={300}>
<nav className="hero__nav hero__nav--indexed">
{subpages.map((sp, i) => (
<Link key={sp.slug} href={`/${sp.slug}`} className="hero__nav-link">
<span className="hero__nav-index">
{String(i + 1).padStart(2, '0')}
</span>
{sp.name}
</Link>
))}
{albums.map((album, i) => (
<Link key={album.id} href={`/${album.slug}`} className="hero__nav-link">
<span className="hero__nav-index">
{String(subpages.length + i + 1).padStart(2, '0')}
</span>
{album.albumName}
</Link>
))}
</nav>
</FadeIn>
</div>
</div>
);
}
// ── Stacked: fullbleed image + text at bottom + thumbnail strip ─
if (heroStyle === 'stacked') {
// Fetch album thumbnails for the strip
const allEntries = [
...subpages.map((sp) => ({ slug: sp.slug, name: sp.name })),
...albums.map((a) => ({ slug: a.slug, name: a.albumName })),
];
return (
<div className="hero hero--stacked">
<div className="hero__stacked-image">
<HeroCarousel images={heroData} />
<div className="hero__stacked-overlay">
<FadeIn delay={0}>
<h1 className="hero__title">{config.siteTitle}</h1>
</FadeIn>
{config.siteSubtitle && (
<FadeIn delay={100}>
<p className="hero__subtitle">{config.siteSubtitle}</p>
</FadeIn>
)}
</div>
</div>
<FadeIn delay={200}>
<nav className="hero__thumbnail-strip">
{allEntries.map((entry) => (
<Link
key={entry.slug}
href={`/${entry.slug}`}
className="hero__thumbnail-item"
>
<span className="hero__thumbnail-label">{entry.name}</span>
</Link>
))}
</nav>
</FadeIn>
</div>
);
}
// ── Mosaic: multi-image grid with frosted title overlay ────────
if (heroStyle === 'mosaic') {
return (
<div className="hero hero--mosaic">
<div className="hero__mosaic-grid">
{heroData.slice(0, 6).map((img, i) => (
<div key={i} className={`hero__mosaic-cell hero__mosaic-cell--${i + 1}`}>
<Image
src={img.src}
alt=""
fill
sizes="(max-width: 640px) 100vw, 50vw"
priority={i < 2}
{...(img.blurDataURL
? { placeholder: 'blur' as const, blurDataURL: img.blurDataURL }
: {})}
/>
</div>
))}
</div>
<div className="hero__mosaic-overlay">
<FadeIn delay={0}>
<h1 className="hero__title">{config.siteTitle}</h1>
</FadeIn>
{config.siteSubtitle && (
<FadeIn delay={100}>
<p className="hero__subtitle">{config.siteSubtitle}</p>
</FadeIn>
)}
<FadeIn delay={200}>
<nav className="hero__nav">
<HeroNavLinks subpages={subpages} albums={albums} />
</nav>
</FadeIn>
</div>
</div>
);
}
// ── Default: split / fullbleed / minimal (existing layouts) ────
return ( return (
<div className="hero"> <div className="hero">
{/* ── Left Panel ──────────────────────────────── */} {/* ── Left Panel ──────────────────────────────── */}
@@ -49,16 +197,7 @@ export default async function HomePage() {
<FadeIn delay={200}> <FadeIn delay={200}>
<nav className="hero__nav"> <nav className="hero__nav">
{subpages.map((sp) => ( <HeroNavLinks subpages={subpages} albums={albums} />
<Link key={sp.slug} href={`/${sp.slug}`} className="hero__nav-link">
{sp.name}
</Link>
))}
{albums.map((album) => (
<Link key={album.id} href={`/${album.slug}`} className="hero__nav-link">
{album.albumName}
</Link>
))}
</nav> </nav>
</FadeIn> </FadeIn>
</div> </div>

View File

@@ -147,6 +147,99 @@
--border-hover: #d0c8b5; --border-hover: #d0c8b5;
} }
/* ── Noir: Darkroom Analog Palette ───────────────── */
[data-preset='noir'] {
--bg-primary: #111014;
--bg-secondary: #0c0b0f;
--bg-card: #16141a;
--bg-card-hover: #1e1c22;
--bg-overlay: rgba(11, 10, 15, 0.98);
--text-primary: #f0ebe0;
--text-secondary: #998f80;
--text-muted: #665c50;
--border-subtle: #252228;
--border-hover: #3a3540;
}
[data-preset='noir'][data-theme='light'] {
--bg-primary: #faf5ef;
--bg-secondary: #f0ebe3;
--bg-card: #ffffff;
--bg-card-hover: #f5f0e8;
--bg-overlay: rgba(250, 245, 239, 0.96);
--text-primary: #1a1610;
--text-secondary: #5a5548;
--text-muted: #8a8578;
--border-subtle: #e5dfd5;
--border-hover: #ccc5b8;
}
/* ── Monograph: Typographic / Book Palette ────────── */
[data-preset='monograph'] {
--bg-primary: #151515;
--bg-secondary: #0f0f0f;
--bg-card: #1a1a1a;
--bg-card-hover: #222222;
--bg-overlay: rgba(15, 15, 15, 0.98);
--text-primary: #e8e8e8;
--text-secondary: #888888;
--text-muted: #555555;
--border-subtle: #222222;
--border-hover: #3a3a3a;
}
[data-preset='monograph'][data-theme='light'] {
--bg-primary: #fafafa;
--bg-secondary: #f2f2f2;
--bg-card: #ffffff;
--bg-card-hover: #f7f7f7;
--bg-overlay: rgba(250, 250, 250, 0.98);
--text-primary: #111111;
--text-secondary: #555555;
--text-muted: #999999;
--border-subtle: #e5e5e5;
--border-hover: #cccccc;
}
/* ── Botanica: Organic / Nature Palette ──────────── */
[data-preset='botanica'] {
--bg-primary: #141a14;
--bg-secondary: #0f140f;
--bg-card: #182018;
--bg-card-hover: #1e261e;
--bg-overlay: rgba(15, 20, 15, 0.98);
--text-primary: #e8efe0;
--text-secondary: #8a9a78;
--text-muted: #5a6a4a;
--border-subtle: #253025;
--border-hover: #354535;
}
[data-preset='botanica'][data-theme='light'] {
--bg-primary: #faf7f0;
--bg-secondary: #f0ece2;
--bg-card: #ffffff;
--bg-card-hover: #f5f2ea;
--bg-overlay: rgba(250, 247, 240, 0.96);
--text-primary: #1a2214;
--text-secondary: #4a5a3a;
--text-muted: #7a8a6a;
--border-subtle: #dde5d0;
--border-hover: #c5d0b5;
}
/* ── Reset ────────────────────────────────────────── */ /* ── Reset ────────────────────────────────────────── */
*, *,
*::before, *::before,

View File

@@ -14,12 +14,15 @@ That's it. Your entire gallery switches to the minimal theme.
## Built-in Presets ## Built-in Presets
| Preset | Style | Accent | Fonts | Hero | Frame | Grain | | Preset | Style | Accent | Fonts | Hero | Frame | Grain |
| ------------- | ------------------------------ | ------------ | -------------------------- | --------- | ------------ | ----- | | ------------- | ------------------------------ | ------------ | ---------------------------------- | ----------- | ------------ | ----- |
| **studio** | Leica-inspired, editorial | 🔴 `#e60012` | Playfair Display + DM Sans | Split | Passepartout | ✓ | | **studio** | Leica-inspired, editorial | 🔴 `#e60012` | Playfair Display + DM Sans | Split | Passepartout | ✓ |
| **minimal** | Swiss brutalist, high contrast | ⚫ `#000000` | Geist + IBM Plex Mono | Fullbleed | None | ✗ | | **minimal** | Swiss brutalist, high contrast | ⚫ `#000000` | Geist + IBM Plex Mono | Fullbleed | None | ✗ |
| **editorial** | Cinematic magazine, warm tones | 🟤 `#8B2500` | Bodoni Moda + Newsreader | Split | Shadow | ✗ | | **editorial** | Cinematic magazine, warm tones | 🟤 `#8B2500` | Bodoni Moda + Newsreader | Split | Shadow | ✗ |
| **classic** | Gilded gallery, warm luxury | 🟡 `#c49a3c` | Cinzel + Crimson Pro | Minimal | Passepartout | ✗ | | **classic** | Gilded gallery, warm luxury | 🟡 `#c49a3c` | Cinzel + Crimson Pro | Minimal | Passepartout | ✗ |
| **noir** | Darkroom analog, film noir | 🟠 `#ff6b35` | Libre Baskerville + Source Sans 3 | Fullbleed | Passepartout | ✓ |
| **monograph** | Typographic, book-like | ⬛ `#333333` | Instrument Serif + Inter | Typographic | None | ✗ |
| **botanica** | Organic, nature-inspired | 🟢 `#4a7c59` | Cormorant Garamond + Nunito Sans | Split | None | ✗ |
Default is `studio` if no theme is specified. Default is `studio` if no theme is specified.
@@ -33,6 +36,12 @@ Default is `studio` if no theme is specified.
**Classic** — Fine art gallery aesthetic with warm gold accents, Cinzel Roman capitals for headings, decorative ornamental dividers, warm passepartout frames, rounded corners, and an elegant gold header dot. Feels like a luxury exhibition catalog. **Classic** — Fine art gallery aesthetic with warm gold accents, Cinzel Roman capitals for headings, decorative ornamental dividers, warm passepartout frames, rounded corners, and an elegant gold header dot. Feels like a luxury exhibition catalog.
**Noir** — Darkroom analog aesthetic with warm amber accents on a deep cool-black base. Sepia-tinted photos with vignette hover effects, film-edge EXIF labels in monospace, and a grain overlay. Inspired by wet-plate photography and film noir cinematography.
**Monograph** — Type-first book design with no hero image. Features an 8rem serif title, numbered photo indices via CSS counters, slide-up EXIF captions, hairline dividers, and generous whitespace. Feels like an artist monograph.
**Botanica** — Organic, nature-inspired with forest green accents and warm linen backgrounds. Rounded corners, botanical ornament dividers (❧), italic captions, and gentle hover animations. Feels like a botanical field guide.
## Custom Theme ## Custom Theme
Start from any preset and override individual properties: Start from any preset and override individual properties:
@@ -49,7 +58,7 @@ theme:
photoFrame: none # "none" | "passepartout" | "shadow" photoFrame: none # "none" | "passepartout" | "shadow"
grain: false # film grain overlay on photos grain: false # film grain overlay on photos
headerDot: false # accent-colored dot in the nav bar headerDot: false # accent-colored dot in the nav bar
heroStyle: split # "split" | "fullbleed" | "minimal" heroStyle: split # "split" | "fullbleed" | "minimal" | "stacked" | "typographic" | "mosaic"
``` ```
All properties are optional — omitted values fall back to the preset defaults. All properties are optional — omitted values fall back to the preset defaults.
@@ -96,9 +105,22 @@ When `true`, shows a small accent-colored dot in the navigation bar (inspired by
Controls the homepage hero layout: Controls the homepage hero layout:
- **`split`** — title/nav on the left, hero image on the right (used by Studio and Editorial) - **`split`** — title/nav on the left, hero image on the right (used by Studio, Editorial, Botanica)
- **`fullbleed`** — hero image fills the entire viewport, title overlaid in the corner (used by Minimal) - **`fullbleed`** — hero image fills the entire viewport, title overlaid in the corner (used by Minimal, Noir)
- **`minimal`** — centered title card with decorative ornament, hero image as a banner below (used by Classic) - **`minimal`** — centered title card with decorative ornament, hero image as a banner below (used by Classic)
- **`stacked`** — full-viewport hero image with title gradient-overlaid at the bottom, horizontal thumbnail navigation strip below
- **`typographic`** — no hero image; massive centered title with numbered album navigation list (used by Monograph)
- **`mosaic`** — asymmetric multi-image grid with frosted-glass title overlay centered on top
### `grid.layout`
Controls the photo grid layout on album pages:
- **`masonry`** — Pinterest-style stacked columns, images shown at natural aspect ratios (default)
- **`uniform`** — CSS Grid with fixed aspect ratio cells
- **`showcase`** — first image displayed at full width (16:9), rest in standard grid
- **`filmstrip`** — horizontal scroll of tall vertical image strips with scroll snapping
- **`editorial-flow`** — alternating full-width (21:9) and side-by-side (4:3) image pairs
## Examples ## Examples
@@ -145,3 +167,31 @@ theme:
heading: 'Playfair Display' heading: 'Playfair Display'
body: 'Lora' body: 'Lora'
``` ```
### Dark analog portfolio
```yaml
theme:
preset: noir
heroStyle: stacked
```
### Type-forward monograph
```yaml
theme:
preset: monograph
accent: '#444'
fonts:
heading: 'DM Serif Text'
```
### Nature / travel journal
```yaml
theme:
preset: botanica
heroStyle: mosaic
grid:
layout: editorial-flow
```

View File

@@ -40,7 +40,7 @@ export interface ThemeConfig {
photoFrame: 'none' | 'passepartout' | 'shadow'; photoFrame: 'none' | 'passepartout' | 'shadow';
grain: boolean; grain: boolean;
headerDot: boolean; headerDot: boolean;
heroStyle: 'split' | 'fullbleed' | 'minimal'; heroStyle: 'split' | 'fullbleed' | 'minimal' | 'stacked' | 'typographic' | 'mosaic';
} }
// ── Theme Presets ────────────────────────────────────────────── // ── Theme Presets ──────────────────────────────────────────────
@@ -86,6 +86,36 @@ const THEME_PRESETS: Record<string, ThemeConfig> = {
headerDot: true, headerDot: true,
heroStyle: 'minimal', heroStyle: 'minimal',
}, },
noir: {
preset: 'noir',
accent: '#ff6b35',
fonts: { heading: 'Libre Baskerville', body: 'Source Sans 3', caption: 'Space Mono' },
radius: 0,
photoFrame: 'passepartout',
grain: true,
headerDot: false,
heroStyle: 'fullbleed',
},
monograph: {
preset: 'monograph',
accent: '#333333',
fonts: { heading: 'Instrument Serif', body: 'Inter', caption: 'IBM Plex Mono' },
radius: 0,
photoFrame: 'none',
grain: false,
headerDot: false,
heroStyle: 'typographic',
},
botanica: {
preset: 'botanica',
accent: '#4a7c59',
fonts: { heading: 'Cormorant Garamond', body: 'Nunito Sans', caption: 'Inconsolata' },
radius: 8,
photoFrame: 'none',
grain: false,
headerDot: true,
heroStyle: 'split',
},
}; };
/** Raw YAML structure (before validation). */ /** Raw YAML structure (before validation). */
@@ -94,17 +124,17 @@ interface GalleryYaml {
albums?: string[]; albums?: string[];
exifOnHover?: boolean; exifOnHover?: boolean;
theme?: theme?:
| string | string
| { | {
preset?: string; preset?: string;
accent?: string; accent?: string;
fonts?: { heading?: string; body?: string; caption?: string }; fonts?: { heading?: string; body?: string; caption?: string };
radius?: number; radius?: number;
photoFrame?: string; photoFrame?: string;
grain?: boolean; grain?: boolean;
headerDot?: boolean; headerDot?: boolean;
heroStyle?: string; heroStyle?: string;
}; };
grid?: { grid?: {
columns?: number; columns?: number;
gap?: number; gap?: number;
@@ -138,7 +168,7 @@ function loadGalleryYaml(): GalleryYaml {
if (!fs.existsSync(yamlPath)) { if (!fs.existsSync(yamlPath)) {
throw new Error( throw new Error(
`Gallery config not found: ${yamlPath}\n` + `Gallery config not found: ${yamlPath}\n` +
`Copy content/gallery.yaml.example to content/gallery.yaml and add your album IDs.`, `Copy content/gallery.yaml.example to content/gallery.yaml and add your album IDs.`,
); );
} }
@@ -186,7 +216,7 @@ export interface GridConfig {
columns: number; columns: number;
gap: number; gap: number;
aspectRatio: string; aspectRatio: string;
layout: 'masonry' | 'uniform'; layout: 'masonry' | 'uniform' | 'showcase' | 'filmstrip' | 'editorial-flow';
} }
export interface AppConfig { export interface AppConfig {
@@ -213,7 +243,8 @@ export interface AppConfig {
// ── Theme resolution ─────────────────────────────────────────── // ── Theme resolution ───────────────────────────────────────────
const VALID_PHOTO_FRAMES = ['none', 'passepartout', 'shadow']; const VALID_PHOTO_FRAMES = ['none', 'passepartout', 'shadow'];
const VALID_HERO_STYLES = ['split', 'fullbleed', 'minimal']; const VALID_HERO_STYLES = ['split', 'fullbleed', 'minimal', 'stacked', 'typographic', 'mosaic'];
const VALID_LAYOUTS = ['masonry', 'uniform', 'showcase', 'filmstrip', 'editorial-flow'];
function resolveTheme(raw?: GalleryYaml['theme']): ThemeConfig { function resolveTheme(raw?: GalleryYaml['theme']): ThemeConfig {
// No theme key → default preset // No theme key → default preset
@@ -307,19 +338,19 @@ export function getConfig(): AppConfig {
password: sp.password, password: sp.password,
...(sp.grid ...(sp.grid
? { ? {
grid: { grid: {
...(sp.grid.columns != null ? { columns: sp.grid.columns } : {}), ...(sp.grid.columns != null ? { columns: sp.grid.columns } : {}),
...(sp.grid.gap != null ? { gap: sp.grid.gap } : {}), ...(sp.grid.gap != null ? { gap: sp.grid.gap } : {}),
...(sp.grid.aspectRatio != null ? { aspectRatio: sp.grid.aspectRatio } : {}), ...(sp.grid.aspectRatio != null ? { aspectRatio: sp.grid.aspectRatio } : {}),
...(sp.grid.layout != null ...(sp.grid.layout != null
? { ? {
layout: (sp.grid.layout === 'uniform' layout: (VALID_LAYOUTS.includes(sp.grid.layout)
? 'uniform' ? sp.grid.layout
: 'masonry') as GridConfig['layout'], : 'masonry') as GridConfig['layout'],
} }
: {}), : {}),
}, },
} }
: {}), : {}),
}; };
}); });
@@ -340,24 +371,26 @@ export function getConfig(): AppConfig {
siteSubtitle: env.SITE_SUBTITLE, siteSubtitle: env.SITE_SUBTITLE,
heroImages: gallery.hero heroImages: gallery.hero
? (Array.isArray(gallery.hero) ? gallery.hero : [gallery.hero]).map((id) => ? (Array.isArray(gallery.hero) ? gallery.hero : [gallery.hero]).map((id) =>
validateUuid(id, 'gallery.yaml hero'), validateUuid(id, 'gallery.yaml hero'),
) )
: [], : [],
exifOnHover: gallery.exifOnHover !== false, exifOnHover: gallery.exifOnHover !== false,
grid: { grid: {
columns: gallery.grid?.columns ?? 3, columns: gallery.grid?.columns ?? 3,
gap: gallery.grid?.gap ?? 12, gap: gallery.grid?.gap ?? 12,
aspectRatio: gallery.grid?.aspectRatio ?? '1', aspectRatio: gallery.grid?.aspectRatio ?? '1',
layout: (gallery.grid?.layout === 'uniform' ? 'uniform' : 'masonry') as GridConfig['layout'], layout: (VALID_LAYOUTS.includes(gallery.grid?.layout ?? '')
? gallery.grid!.layout
: 'masonry') as GridConfig['layout'],
}, },
theme, theme,
footer: gallery.footer footer: gallery.footer
? { ? {
name: gallery.footer.name, name: gallery.footer.name,
instagram: gallery.footer.instagram, instagram: gallery.footer.instagram,
email: gallery.footer.email, email: gallery.footer.email,
website: gallery.footer.website, website: gallery.footer.website,
} }
: null, : null,
cacheTtl: env.CACHE_TTL * 1000, cacheTtl: env.CACHE_TTL * 1000,
rateLimitRpm: env.RATE_LIMIT_RPM, rateLimitRpm: env.RATE_LIMIT_RPM,