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
|
|
@ -163,6 +163,24 @@ export const frontPage = {
|
|||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
legend: "Featured Content",
|
||||
note: "The cards themselves are under Featured cards below, each with its own Size.",
|
||||
fields: [
|
||||
{
|
||||
path: "featured_columns",
|
||||
label: "Columns",
|
||||
widget: "select",
|
||||
options: [
|
||||
["2", "2 across"],
|
||||
["3", "3 across"],
|
||||
["4", "4 across"],
|
||||
],
|
||||
blankLabel: "Default: 3 across",
|
||||
help: "On a wide screen. Tablets show 2, phones 1",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
children: [
|
||||
|
|
@ -222,7 +240,25 @@ export const frontPage = {
|
|||
{ path: "note", label: "Note", full: true },
|
||||
],
|
||||
},
|
||||
featuredCardsChild,
|
||||
{
|
||||
...featuredCardsChild,
|
||||
fields: [
|
||||
...featuredCardsChild.fields,
|
||||
{
|
||||
path: "size",
|
||||
label: "Size",
|
||||
widget: "select",
|
||||
options: [
|
||||
["normal", "Normal: one cell"],
|
||||
["wide", "Wide: two columns"],
|
||||
["tall", "Tall: two rows"],
|
||||
["large", "Large: two columns, two rows"],
|
||||
],
|
||||
blankLabel: "Default: automatic (the first of three or more is large)",
|
||||
help: "On a wide screen. Phones show one card per row",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
key: "paths",
|
||||
label: "Connect Nav",
|
||||
|
|
|
|||
|
|
@ -106,8 +106,13 @@ export type FeaturedCard = {
|
|||
blurb?: string | null
|
||||
/** Resolve the file with mediaUrl in media.ts. */
|
||||
image: { file: string; kind: string } | null
|
||||
/** Its shape in the grid; null is automatic (FeaturedCards). */
|
||||
size?: FeaturedSize | null
|
||||
}
|
||||
|
||||
export type FeaturedSize = 'normal' | 'wide' | 'tall' | 'large'
|
||||
export type FeaturedColumns = 2 | 3 | 4
|
||||
|
||||
/** The countdown's event plus what the hero's event card draws. */
|
||||
export type HeroEvent = CountdownEvent & {
|
||||
tagline?: string | null
|
||||
|
|
@ -123,6 +128,8 @@ export type FrontPage = {
|
|||
stats: FrontPageStat[]
|
||||
paths: FrontPagePath[]
|
||||
featured: FeaturedCard[]
|
||||
/** Columns across on a wide screen; null is the grid's default. */
|
||||
featured_columns: FeaturedColumns | null
|
||||
countdown: CountdownEvent | null
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue