Front page: set the featured cards' grid by hand, columns and a size per card (migration 073)
Front page editor: Featured Content > Columns (2, 3 or 4 across on a wide screen) and a Size on each card (normal, wide, tall, large). Blank keeps today's layout: 3 across, the first of three or more large. Regions and the Community blog stay automatic. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
910aef78b5
commit
31d9f78120
11 changed files with 130 additions and 23 deletions
|
|
@ -70,7 +70,7 @@ const BANDS: Record<FrontPageSectionKey, (props: BandProps) => ReactNode> = {
|
|||
<Pathfinder id={id('connect')!} title={title} blurb={section.blurb} paths={page.paths} />
|
||||
),
|
||||
featured: ({ page, section, title }) => (
|
||||
<FeaturedBand id={id('featured')!} title={title} blurb={section.blurb} cards={page.featured} />
|
||||
<FeaturedBand id={id('featured')!} title={title} blurb={section.blurb} cards={page.featured} columns={page.featured_columns} />
|
||||
),
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,23 +8,24 @@
|
|||
═══════════════════════════════════════════════════════════════ */
|
||||
|
||||
import FeaturedCards from '../../../components/FeaturedCards.tsx'
|
||||
import type { FeaturedCard } from '../../../lib/useFrontPage.ts'
|
||||
import type { FeaturedCard, FeaturedColumns } from '../../../lib/useFrontPage.ts'
|
||||
|
||||
type FeaturedBandProps = {
|
||||
id: string
|
||||
title: string
|
||||
blurb?: string | null
|
||||
cards: FeaturedCard[]
|
||||
columns?: FeaturedColumns | null
|
||||
}
|
||||
|
||||
export default function FeaturedBand({ id, title, blurb, cards }: FeaturedBandProps) {
|
||||
export default function FeaturedBand({ id, title, blurb, cards, columns }: FeaturedBandProps) {
|
||||
return (
|
||||
<section id={id} className="py-24">
|
||||
<div className="mx-auto max-w-6xl px-6">
|
||||
<h2 className="font-display text-4xl font-bold text-ink md:text-5xl">{title}</h2>
|
||||
{blurb && <p className="mt-4 max-w-2xl text-lg text-muted">{blurb}</p>}
|
||||
<div className="mt-12">
|
||||
<FeaturedCards cards={cards} />
|
||||
<FeaturedCards cards={cards} columns={columns ?? undefined} />
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue