Adds the Soorten fotoshoots page
Replaces the placeholder with the five shoot types (Newborn, Zwangerschap, Gezin, Loveshoot, Portretten), each an article with its own anchor, photo, text and a link to the contact form that preselects the matching package. A portfolio link per shoot shows once the portfolio page is live. A closing call to action links to the prices and the contact form. The page is indexed with its own description and preview image, and describes the shoots as services of the business in structured data. That data is rendered in the page component, so the shoot texts stay out of the main bundle. The shoot photos are cropped at 848x1060, no longer upscaled. Photo pages get a mobile Lighthouse performance target of 0.85: their largest paint is a photo that the simulated slow connection only requests after the scripts have run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
import type { PricingPackage, ShootType } from '../content/types.ts';
|
||||
import type { RoutePath } from '../navigation.ts';
|
||||
import type { PageMeta } from '../sitePages.ts';
|
||||
import { visiblePackages } from './visiblePackages.ts';
|
||||
|
||||
// Where "Stuur een berichtje" goes: the homepage contact section, with the
|
||||
// shoot's package preselected when that package is shown (BR-SF-01..03).
|
||||
// Once /contact exists, only this function changes.
|
||||
export function shootContactLink(
|
||||
shoot: ShootType,
|
||||
packages: readonly PricingPackage[],
|
||||
) {
|
||||
const shown = visiblePackages(packages).some(
|
||||
(pkg) => pkg.id === shoot.packageId,
|
||||
);
|
||||
return shown && shoot.packageId !== undefined
|
||||
? {
|
||||
to: '/' as const,
|
||||
search: { pakket: shoot.packageId },
|
||||
hash: 'contact',
|
||||
}
|
||||
: { to: '/' as const, hash: 'contact' };
|
||||
}
|
||||
|
||||
// "Bekijk meer …foto's": the portfolio filtered on this shoot type
|
||||
export function shootPortfolioLink(shoot: ShootType) {
|
||||
return { to: '/portfolio' as const, search: { shoot: shoot.id } };
|
||||
}
|
||||
|
||||
// The portfolio links only show once the portfolio page is live, so no
|
||||
// visitor lands on the placeholder (BR-SF-04)
|
||||
export function isPortfolioLive(pages: Record<RoutePath, PageMeta>): boolean {
|
||||
return pages['/portfolio'].indexed;
|
||||
}
|
||||
Reference in New Issue
Block a user