Adds the shared gallery building blocks
A masonry photo grid that keeps the reading order (pure CSS, no measuring in the browser), an accessible lightbox on Chakra's Dialog with wrap-around browsing, keys, swipe and preloading, and a filter bar of toggle buttons. They work on generic gallery items, so other pages can use them. The swipe logic moves out of the hero into a shared hook; the hero behaves as before. The rules behind them live in pure helpers with property-based tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -48,6 +48,30 @@ export interface ContentImage {
|
||||
height: number;
|
||||
}
|
||||
|
||||
// An image file with its intrinsic size, without its own description (the
|
||||
// larger size of a photo whose ContentImage already carries the alt text)
|
||||
export interface ImageSource {
|
||||
src: string;
|
||||
width: number;
|
||||
height: number;
|
||||
}
|
||||
|
||||
// One photo for the shared gallery blocks (PortfolioGrid, Lightbox): a grid
|
||||
// size with the description, a large size for the lightbox, and an optional
|
||||
// visible caption. The blocks know nothing about where the photos come from.
|
||||
export interface GalleryItem {
|
||||
id: string;
|
||||
thumb: ContentImage;
|
||||
full: ImageSource;
|
||||
caption?: string;
|
||||
}
|
||||
|
||||
// One choice in a FilterBar
|
||||
export interface FilterOption {
|
||||
id: string;
|
||||
label: string;
|
||||
}
|
||||
|
||||
// A priced shoot offer. id is a stable slug: it goes into ?pakket= and is
|
||||
// the shoot value the contact form sends.
|
||||
export interface PricingPackage {
|
||||
|
||||
Reference in New Issue
Block a user