Adds a slim top bar above the packages and centres the last row of cards
The CMS serves a second banner at /api/v1/offerings/banner?position=top. The site bakes it into the HTML at build time and replaces it live after hydration, like the banner under the cards, and both may show at once. The cards now sit in a wrapping flex row so an incomplete last row is centred for any number of cards on desktop; phone and tablet stay one column. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -31,5 +31,6 @@
|
||||
]
|
||||
}
|
||||
],
|
||||
"banner": null
|
||||
"banner": null,
|
||||
"topBanner": null
|
||||
}
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import type { PricingBanner, PricingPackage } from './types';
|
||||
import type { PricingBanner, PricingPackage, PricingTopBanner } from './types';
|
||||
import snapshot from './offerings.snapshot.json';
|
||||
|
||||
interface Offerings {
|
||||
packages: PricingPackage[];
|
||||
banner: PricingBanner | null;
|
||||
// Missing in a generated file from before the top bar existed
|
||||
topBanner?: PricingTopBanner | null;
|
||||
}
|
||||
|
||||
// The shoot packages and the optional banner. config/fetchOfferings.ts writes
|
||||
@@ -27,4 +29,6 @@ const packages: PricingPackage[] = offerings.packages;
|
||||
|
||||
export const banner: PricingBanner | null = offerings.banner;
|
||||
|
||||
export const topBanner: PricingTopBanner | null = offerings.topBanner ?? null;
|
||||
|
||||
export default packages;
|
||||
|
||||
@@ -112,6 +112,15 @@ export interface PricingBanner {
|
||||
link?: { label: string; url: string };
|
||||
}
|
||||
|
||||
// The slim bar above the price cards (GET
|
||||
// /api/v1/offerings/banner?position=top): one line with a title, a text or
|
||||
// both, and optionally a small link. Both banners may show at the same time.
|
||||
export interface PricingTopBanner {
|
||||
title?: string;
|
||||
text?: string;
|
||||
link?: { label: string; url: string };
|
||||
}
|
||||
|
||||
// The kinds of shoot Andrea offers. The ids are stable: they go into URLs
|
||||
// (/portfolio?shoot=) and the portfolio page tags its photos with them.
|
||||
export type ShootTypeId =
|
||||
|
||||
Reference in New Issue
Block a user