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

@@ -1,9 +1,17 @@
export interface SubpageSectionConfig {
title: string;
slug: string; // auto-derived from title, used as anchor
description?: string;
albumIds: string[];
}
export interface SubpageConfig {
name: string;
slug: string;
title?: string;
subtitle?: string;
albumIds: string[];
albumIds: string[]; // flat list (all albums, incl. from sections)
sections?: SubpageSectionConfig[];
password?: string;
grid?: Partial<GridConfig>;
}
@@ -83,7 +91,12 @@ export interface GalleryYaml {
name: string;
title?: string;
subtitle?: string;
albums: Array<string | Record<string, string>>;
albums?: Array<string | Record<string, string>>;
sections?: Array<{
title: string;
description?: string;
albums: Array<string | Record<string, string>>;
}>;
password?: string;
grid?: {
columns?: number;