feat(subpages): add optional sections with typographic TOC

- Add SubpageSectionConfig type to schema.ts
- Update config parser to handle sections with album overrides
- Refactor SubpageGridView to render TOC + section headers
- Add base CSS for subpage-toc and subpage-section in globals.css
- Add theme-specific overrides for all 5 themes (minimal, editorial,
  classic, noir, monograph)
- Update gallery.yaml.example and docs/gallery-config.md
This commit is contained in:
ralksta
2026-03-08 23:52:23 +01:00
parent 0eaadeda55
commit 134eae94e4
12 changed files with 623 additions and 43 deletions

View File

@@ -191,3 +191,73 @@
font-weight: 400;
letter-spacing: 0.06em;
}
/* Subpage TOC: Cinzel uppercase with gold ornament separators */
[data-preset='classic'] .subpage-toc {
margin-bottom: 56px;
justify-content: center;
}
[data-preset='classic'] .subpage-toc__entry+.subpage-toc__entry::before {
content: '◆';
padding: 0 14px;
font-size: 0.45rem;
color: var(--accent);
}
[data-preset='classic'] .subpage-toc__num {
display: none;
}
[data-preset='classic'] .subpage-toc__label {
font-family: var(--font-serif);
font-size: 0.75rem;
letter-spacing: 0.2em;
text-transform: uppercase;
font-weight: 400;
}
[data-preset='classic'] .subpage-toc__link {
color: var(--text-muted);
}
[data-preset='classic'] .subpage-toc__link:hover {
color: var(--accent);
}
/* Section: ornamental centered divider rule */
[data-preset='classic'] .subpage-section__header {
text-align: center;
margin-bottom: 36px;
}
[data-preset='classic'] .subpage-section__title {
font-family: var(--font-serif);
font-size: 1.5rem;
letter-spacing: 0.15em;
text-transform: uppercase;
font-weight: 400;
margin-bottom: 4px;
}
[data-preset='classic'] .subpage-section__desc {
font-family: var(--font-caption);
font-style: italic;
font-size: 0.8rem;
color: var(--text-muted);
}
[data-preset='classic'] .subpage-section__rule {
background: none;
height: auto;
border: none;
text-align: center;
margin-top: 16px;
}
[data-preset='classic'] .subpage-section__rule::after {
content: '—◆—';
font-size: 0.55rem;
letter-spacing: 0.2em;
color: var(--accent);
}

View File

@@ -175,3 +175,63 @@
font-weight: 300;
text-transform: none;
}
/* Subpage TOC: italic, cinematic – like a film chapter list */
[data-preset='editorial'] .subpage-toc {
margin-bottom: 64px;
}
[data-preset='editorial'] .subpage-toc__entry+.subpage-toc__entry::before {
content: '/';
padding: 0 12px;
font-family: var(--font-caption);
font-style: italic;
color: var(--text-muted);
}
[data-preset='editorial'] .subpage-toc__num {
font-family: var(--font-caption);
font-style: italic;
font-size: 0.65rem;
color: var(--text-muted);
}
[data-preset='editorial'] .subpage-toc__label {
font-family: var(--font-caption);
font-size: 0.9rem;
font-style: italic;
font-weight: 400;
letter-spacing: 0.04em;
}
[data-preset='editorial'] .subpage-toc__link {
color: var(--text-secondary);
}
[data-preset='editorial'] .subpage-toc__link:hover {
color: var(--accent);
}
/* Section: pull-quote accent border, large cinematic title */
[data-preset='editorial'] .subpage-section__title {
font-family: var(--font-serif);
font-size: 2rem;
font-weight: 300;
letter-spacing: 0.01em;
text-transform: none;
}
[data-preset='editorial'] .subpage-section__desc {
font-family: var(--font-caption);
font-style: italic;
font-size: 0.85rem;
opacity: 0.7;
}
[data-preset='editorial'] .subpage-section__rule {
background: none;
height: 0;
border-left: 3px solid var(--accent);
margin-bottom: -16px;
width: 40px;
}

View File

@@ -192,3 +192,54 @@
letter-spacing: 0.12em;
text-transform: uppercase;
}
/* Subpage TOC: ultra-minimal, uppercase, no separators */
[data-preset='minimal'] .subpage-toc {
margin-bottom: 48px;
}
[data-preset='minimal'] .subpage-toc__entry+.subpage-toc__entry::before {
content: '—';
padding: 0 10px;
font-size: 0.6rem;
color: var(--text-muted);
}
[data-preset='minimal'] .subpage-toc__num {
display: none;
}
[data-preset='minimal'] .subpage-toc__label {
font-family: var(--font-sans);
font-size: 0.6rem;
letter-spacing: 0.2em;
text-transform: uppercase;
font-weight: 400;
}
[data-preset='minimal'] .subpage-toc__link {
color: var(--text-muted);
}
[data-preset='minimal'] .subpage-toc__link:hover {
color: var(--text-primary);
}
/* Section: hard-edged rule, sans title */
[data-preset='minimal'] .subpage-section__title {
font-family: var(--font-sans);
font-size: 0.75rem;
letter-spacing: 0.2em;
text-transform: uppercase;
font-weight: 400;
}
[data-preset='minimal'] .subpage-section__desc {
font-size: 0.7rem;
letter-spacing: 0.08em;
}
[data-preset='minimal'] .subpage-section__rule {
background: var(--text-primary);
height: 2px;
}

View File

@@ -184,6 +184,74 @@
text-transform: uppercase;
}
/* Subpage TOC: book-indexed, hairline */
[data-preset='monograph'] .subpage-toc {
margin-bottom: 64px;
flex-direction: column;
gap: 0;
border-top: 1px solid var(--border-subtle);
border-bottom: 1px solid var(--border-subtle);
padding: 16px 0;
}
[data-preset='monograph'] .subpage-toc__entry {
padding: 6px 0;
border-bottom: 1px solid var(--border-subtle);
}
[data-preset='monograph'] .subpage-toc__entry:last-child {
border-bottom: none;
}
[data-preset='monograph'] .subpage-toc__entry+.subpage-toc__entry::before {
display: none;
}
[data-preset='monograph'] .subpage-toc__link {
display: flex;
gap: 20px;
align-items: baseline;
color: var(--text-secondary);
}
[data-preset='monograph'] .subpage-toc__link:hover {
color: var(--text-primary);
}
[data-preset='monograph'] .subpage-toc__num {
font-family: var(--font-caption);
font-size: 0.65rem;
color: var(--text-muted);
min-width: 24px;
}
[data-preset='monograph'] .subpage-toc__label {
font-family: var(--font-serif);
font-size: 1rem;
font-weight: 400;
letter-spacing: 0.02em;
}
/* Section: hairline rule, generous serif title */
[data-preset='monograph'] .subpage-section__title {
font-family: var(--font-serif);
font-size: 2rem;
font-weight: 400;
letter-spacing: 0.02em;
text-transform: none;
}
[data-preset='monograph'] .subpage-section__desc {
font-family: var(--font-caption);
font-size: 0.75rem;
letter-spacing: 0.04em;
}
[data-preset='monograph'] .subpage-section__rule {
background: var(--border-subtle);
height: 1px;
}
@media (max-width: 1024px) {
.photo-grid {
--grid-columns: 2;
@@ -327,4 +395,4 @@
[data-preset='monograph'] .album-header__title {
font-size: 2rem;
}
}
}

View File

@@ -105,3 +105,60 @@
font-weight: 400;
letter-spacing: 0.05em;
}
/* Subpage TOC: monospace film-edge style, amber accent */
[data-preset='noir'] .subpage-toc {
margin-bottom: 56px;
}
[data-preset='noir'] .subpage-toc__entry+.subpage-toc__entry::before {
content: '|';
padding: 0 12px;
font-family: var(--font-caption);
font-size: 0.65rem;
color: rgba(255, 107, 53, 0.3);
}
[data-preset='noir'] .subpage-toc__num {
font-family: var(--font-caption);
font-size: 0.55rem;
letter-spacing: 0.12em;
color: var(--accent);
text-transform: uppercase;
}
[data-preset='noir'] .subpage-toc__label {
font-family: var(--font-caption);
font-size: 0.75rem;
letter-spacing: 0.12em;
text-transform: uppercase;
font-weight: 400;
}
[data-preset='noir'] .subpage-toc__link {
color: var(--text-secondary);
}
[data-preset='noir'] .subpage-toc__link:hover {
color: var(--accent);
}
/* Section: amber hairline rule */
[data-preset='noir'] .subpage-section__title {
font-weight: 300;
letter-spacing: 0.06em;
}
[data-preset='noir'] .subpage-section__desc {
font-family: var(--font-caption);
font-size: 0.7rem;
letter-spacing: 0.08em;
text-transform: uppercase;
color: rgba(255, 200, 150, 0.5);
}
[data-preset='noir'] .subpage-section__rule {
background: linear-gradient(to right, var(--accent), transparent);
opacity: 0.35;
height: 1px;
}