/** @jsxRuntime automatic */ /** @jsxImportSource remix/component */ import type { Action } from 'remix/router' import { coverOf } from '../../src/domain/content.ts' import { canonicalUrl, loadSite } from '../data/site.ts' import { routes } from '../routes.ts' import { galleryCards } from '../ui/gallery-card.tsx' import { ogImage } from '../ui/og-image.ts' import { render } from '../ui/render.tsx' export default { async handler(context) { const site = await loadSite(context) const { galleries } = site.content return render( site, { title: 'Galleries', description: `Photo galleries by ${site.content.config.photographerName}.`, canonical: canonicalUrl(site, routes.galleries.href()), nav: 'galleries', ...ogImage(site, galleries[0] ? coverOf(galleries[0]) : undefined), },

Galleries

{galleries.length > 0 ? ( galleryCards(site, galleries, { priorityCount: 3 }) ) : (

New work is on its way. Check back soon.

)}
, ) }, } satisfies Action