@backgold/template-kit 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +12 -2
- package/dist/chunk-KOB36GSF.js +62 -0
- package/dist/constants-DvTNj4JI.d-Batjcj3Z.d.ts +38 -0
- package/dist/content-api-CYeY0vU8.d.ts +849 -0
- package/dist/contract/content-api-examples.d.ts +58 -0
- package/dist/contract/content-api-examples.js +783 -0
- package/dist/contract/content-api.d.ts +2 -0
- package/dist/contract/content-api.js +1 -0
- package/dist/contract/site-templates.d.ts +252 -0
- package/dist/contract/site-templates.js +185 -0
- package/package.json +70 -3
- package/src/components/EntryCard.astro +35 -0
- package/src/components/EventMap.astro +118 -0
- package/src/components/EventPage.astro +194 -0
- package/src/components/FieldValue.astro +41 -0
- package/src/components/LeadingHero.astro +21 -0
- package/src/components/NotFound.astro +20 -0
- package/src/components/PageSections.astro +47 -0
- package/src/components/Prose.astro +18 -0
- package/src/components/chrome/Brand.astro +54 -0
- package/src/components/chrome/ClosingCall.astro +94 -0
- package/src/components/chrome/DonateStrip.astro +61 -0
- package/src/components/chrome/FooterColumns.astro +32 -0
- package/src/components/chrome/FooterContact.astro +28 -0
- package/src/components/chrome/MenuList.astro +45 -0
- package/src/components/chrome/ModeToggle.astro +125 -0
- package/src/components/chrome/SignedInNotice.astro +53 -0
- package/src/components/chrome/SignupBand.astro +12 -0
- package/src/components/chrome/TakeoverBanner.astro +56 -0
- package/src/components/chrome/VisitorAccount.astro +82 -0
- package/src/components/entries/AuthorBox.astro +47 -0
- package/src/components/entries/EntryFields.astro +29 -0
- package/src/components/entries/EntryHeader.astro +77 -0
- package/src/components/entries/ListFrame.astro +126 -0
- package/src/components/entries/ListSearch.astro +24 -0
- package/src/components/entries/Share.astro +24 -0
- package/src/components/entries/course/classroom.astro +26 -0
- package/src/components/entries/course/lesson.astro +18 -0
- package/src/components/entries/course/section.ts +20 -0
- package/src/components/entries/course/syllabus.astro +15 -0
- package/src/components/entries/index.ts +77 -0
- package/src/components/entries/newsletter/issue.astro +41 -0
- package/src/components/entries/newsletter/list.astro +26 -0
- package/src/components/entries/podcast/episode.astro +42 -0
- package/src/components/entries/podcast/list.astro +36 -0
- package/src/components/entries/post/article.astro +31 -0
- package/src/components/entries/post/list.astro +85 -0
- package/src/components/entries/props.ts +61 -0
- package/src/components/entries/video/cards.astro +39 -0
- package/src/components/entries/video/grid.astro +15 -0
- package/src/components/entries/video/watch.astro +41 -0
- package/src/components/live/LivePage.astro +215 -0
- package/src/components/live/LocalTime.astro +29 -0
- package/src/components/sections/About/books.astro +188 -0
- package/src/components/sections/About/credentials.ts +90 -0
- package/src/components/sections/About/index.astro +57 -0
- package/src/components/sections/About/left.astro +54 -0
- package/src/components/sections/About/letter.astro +108 -0
- package/src/components/sections/About/portrait.astro +308 -0
- package/src/components/sections/Advocacy/compact.astro +14 -0
- package/src/components/sections/Advocacy/index.astro +14 -0
- package/src/components/sections/Band.astro +39 -0
- package/src/components/sections/Blog/feature.astro +176 -0
- package/src/components/sections/Blog/index.astro +37 -0
- package/src/components/sections/Blog/latest.ts +80 -0
- package/src/components/sections/Blog/list.astro +186 -0
- package/src/components/sections/Booking/index.astro +139 -0
- package/src/components/sections/Booking/list.astro +144 -0
- package/src/components/sections/Booking/types.ts +60 -0
- package/src/components/sections/Calendar/agenda.astro +14 -0
- package/src/components/sections/Calendar/index.astro +14 -0
- package/src/components/sections/CandidateRoster/ballot.astro +394 -0
- package/src/components/sections/CandidateRoster/candidates.ts +69 -0
- package/src/components/sections/CandidateRoster/compact.astro +115 -0
- package/src/components/sections/CandidateRoster/index.astro +57 -0
- package/src/components/sections/CaseStudies/beforeafter.astro +222 -0
- package/src/components/sections/CaseStudies/cases.ts +111 -0
- package/src/components/sections/CaseStudies/grid.astro +261 -0
- package/src/components/sections/CaseStudies/index.astro +333 -0
- package/src/components/sections/Classroom/CourseCard.astro +181 -0
- package/src/components/sections/Classroom/Courses.astro +88 -0
- package/src/components/sections/Classroom/classroom.ts +141 -0
- package/src/components/sections/Classroom/index.astro +20 -0
- package/src/components/sections/Classroom/list.astro +15 -0
- package/src/components/sections/Collection/compact.astro +7 -0
- package/src/components/sections/Collection/entries.ts +62 -0
- package/src/components/sections/Collection/feature.astro +180 -0
- package/src/components/sections/Collection/index.astro +46 -0
- package/src/components/sections/Collection/library.astro +271 -0
- package/src/components/sections/Collection/list.astro +7 -0
- package/src/components/sections/Collection/outline.astro +134 -0
- package/src/components/sections/Collection/shelves.astro +191 -0
- package/src/components/sections/Comparison/Unlisted.astro +6 -0
- package/src/components/sections/Comparison/cards.astro +171 -0
- package/src/components/sections/Comparison/index.astro +191 -0
- package/src/components/sections/Comparison/sides.ts +98 -0
- package/src/components/sections/Comparison/spectrum.astro +261 -0
- package/src/components/sections/ContentPost/banner.astro +152 -0
- package/src/components/sections/ContentPost/index.astro +35 -0
- package/src/components/sections/ContentPost/lesson.ts +119 -0
- package/src/components/sections/ContentPost/player.astro +254 -0
- package/src/components/sections/ContentPost/theater.astro +329 -0
- package/src/components/sections/Countdown/index.astro +53 -0
- package/src/components/sections/Course/Bar.astro +46 -0
- package/src/components/sections/Course/CourseHead.astro +123 -0
- package/src/components/sections/Course/Crumbs.astro +44 -0
- package/src/components/sections/Course/Icon.astro +29 -0
- package/src/components/sections/Course/Ring.astro +62 -0
- package/src/components/sections/Course/Syllabus.astro +146 -0
- package/src/components/sections/Course/course.ts +146 -0
- package/src/components/sections/Course/index.astro +143 -0
- package/src/components/sections/Course/outline.astro +39 -0
- package/src/components/sections/Cta/banner.astro +64 -0
- package/src/components/sections/Cta/card.astro +88 -0
- package/src/components/sections/Cta/index.astro +31 -0
- package/src/components/sections/Cta/photo.astro +114 -0
- package/src/components/sections/Cta/strip.astro +91 -0
- package/src/components/sections/Donate/index.astro +136 -0
- package/src/components/sections/Donate/story.astro +7 -0
- package/src/components/sections/Event/card.astro +14 -0
- package/src/components/sections/Event/index.astro +14 -0
- package/src/components/sections/EventsList/AgendaMonths.astro +105 -0
- package/src/components/sections/EventsList/CalendarLine.astro +23 -0
- package/src/components/sections/EventsList/EventRows.astro +196 -0
- package/src/components/sections/EventsList/LiveCounts.astro +75 -0
- package/src/components/sections/EventsList/TypeTabs.astro +53 -0
- package/src/components/sections/EventsList/agenda.astro +55 -0
- package/src/components/sections/EventsList/calendar.astro +392 -0
- package/src/components/sections/EventsList/cards.astro +186 -0
- package/src/components/sections/EventsList/cohorts.astro +205 -0
- package/src/components/sections/EventsList/compact.astro +163 -0
- package/src/components/sections/EventsList/events.ts +168 -0
- package/src/components/sections/EventsList/index.astro +46 -0
- package/src/components/sections/EventsList/map.astro +436 -0
- package/src/components/sections/EventsList/shifts.astro +355 -0
- package/src/components/sections/EventsList/week.astro +361 -0
- package/src/components/sections/Faq/Contact.astro +63 -0
- package/src/components/sections/Faq/Questions.astro +98 -0
- package/src/components/sections/Faq/cards.astro +74 -0
- package/src/components/sections/Faq/faq.ts +101 -0
- package/src/components/sections/Faq/index.astro +49 -0
- package/src/components/sections/Faq/topics.astro +178 -0
- package/src/components/sections/Financials/Foot.astro +38 -0
- package/src/components/sections/Financials/Head.astro +47 -0
- package/src/components/sections/Financials/donut.astro +197 -0
- package/src/components/sections/Financials/financials.ts +52 -0
- package/src/components/sections/Financials/index.astro +148 -0
- package/src/components/sections/Financials/table.astro +157 -0
- package/src/components/sections/FormBlock/index.astro +33 -0
- package/src/components/sections/FormBlock/wide.astro +7 -0
- package/src/components/sections/Hero/cover.astro +170 -0
- package/src/components/sections/Hero/donate.astro +209 -0
- package/src/components/sections/Hero/field.astro +390 -0
- package/src/components/sections/Hero/index.astro +52 -0
- package/src/components/sections/Hero/overlap.astro +151 -0
- package/src/components/sections/Hero/rotating.astro +30 -0
- package/src/components/sections/Hero/split.astro +96 -0
- package/src/components/sections/Hero/statement.astro +55 -0
- package/src/components/sections/Hero/video.astro +399 -0
- package/src/components/sections/Issues/checklist.astro +204 -0
- package/src/components/sections/Issues/drawer.astro +237 -0
- package/src/components/sections/Issues/index.astro +115 -0
- package/src/components/sections/Issues/issues.ts +37 -0
- package/src/components/sections/Issues/numbered.astro +79 -0
- package/src/components/sections/Issues/rows.astro +137 -0
- package/src/components/sections/Issues/steps.astro +81 -0
- package/src/components/sections/Issues/tabs.astro +322 -0
- package/src/components/sections/Leaderboard/index.astro +29 -0
- package/src/components/sections/Lesson/Door.astro +121 -0
- package/src/components/sections/Lesson/LessonBody.astro +416 -0
- package/src/components/sections/Lesson/Rail.astro +182 -0
- package/src/components/sections/Lesson/Tracker.astro +137 -0
- package/src/components/sections/Lesson/index.astro +27 -0
- package/src/components/sections/Lesson/lesson.ts +233 -0
- package/src/components/sections/Lesson/reading.astro +21 -0
- package/src/components/sections/Map/CoverageLine.astro +19 -0
- package/src/components/sections/Map/RegionMap.astro +109 -0
- package/src/components/sections/Map/bar.astro +160 -0
- package/src/components/sections/Map/index.astro +192 -0
- package/src/components/sections/Map/map.astro +275 -0
- package/src/components/sections/MediaKit/BioCard.astro +108 -0
- package/src/components/sections/MediaKit/Downloads.astro +88 -0
- package/src/components/sections/MediaKit/index.astro +183 -0
- package/src/components/sections/MediaKit/kit.ts +140 -0
- package/src/components/sections/MediaKit/press.astro +189 -0
- package/src/components/sections/MediaKit/speaker.astro +205 -0
- package/src/components/sections/Membership/Benefits.astro +42 -0
- package/src/components/sections/Membership/Check.astro +12 -0
- package/src/components/sections/Membership/Price.astro +61 -0
- package/src/components/sections/Membership/compare.astro +312 -0
- package/src/components/sections/Membership/index.astro +281 -0
- package/src/components/sections/Membership/offers.ts +169 -0
- package/src/components/sections/Membership/tiers.astro +217 -0
- package/src/components/sections/MovementMap/index.astro +50 -0
- package/src/components/sections/MovementTicker/index.astro +43 -0
- package/src/components/sections/Pathways/Doors.astro +147 -0
- package/src/components/sections/Pathways/Head.astro +37 -0
- package/src/components/sections/Pathways/index.astro +27 -0
- package/src/components/sections/Pathways/pathways.ts +100 -0
- package/src/components/sections/Pathways/quiz.astro +286 -0
- package/src/components/sections/Pathways/tabs.astro +271 -0
- package/src/components/sections/PdfEmbed/card.astro +99 -0
- package/src/components/sections/PdfEmbed/index.astro +26 -0
- package/src/components/sections/PdfEmbed/medium.astro +7 -0
- package/src/components/sections/PdfEmbed/tall.astro +7 -0
- package/src/components/sections/Petition/coverage.astro +14 -0
- package/src/components/sections/Petition/image.astro +14 -0
- package/src/components/sections/Petition/index.astro +14 -0
- package/src/components/sections/Petition/map.astro +14 -0
- package/src/components/sections/PlatformPlanks/anchors.ts +66 -0
- package/src/components/sections/PlatformPlanks/columns.astro +171 -0
- package/src/components/sections/PlatformPlanks/index.astro +56 -0
- package/src/components/sections/PlatformPlanks/longread.astro +250 -0
- package/src/components/sections/PollBlock/index.astro +30 -0
- package/src/components/sections/Portfolio/featured.astro +343 -0
- package/src/components/sections/Portfolio/index.astro +571 -0
- package/src/components/sections/Portfolio/strip.astro +173 -0
- package/src/components/sections/Portfolio/work.ts +100 -0
- package/src/components/sections/Progress/MatchClock.astro +166 -0
- package/src/components/sections/Progress/compact.astro +150 -0
- package/src/components/sections/Progress/index.astro +32 -0
- package/src/components/sections/Progress/match.astro +126 -0
- package/src/components/sections/Progress/ring.astro +179 -0
- package/src/components/sections/QuickDonate/DonateCard.astro +149 -0
- package/src/components/sections/QuickDonate/Picker.astro +95 -0
- package/src/components/sections/QuickDonate/band.astro +164 -0
- package/src/components/sections/QuickDonate/bar.astro +208 -0
- package/src/components/sections/QuickDonate/donate.ts +126 -0
- package/src/components/sections/QuickDonate/hero.astro +143 -0
- package/src/components/sections/QuickDonate/index.astro +73 -0
- package/src/components/sections/QuickDonate/jar.astro +225 -0
- package/src/components/sections/QuickDonate/ladder.astro +248 -0
- package/src/components/sections/QuoteStrip/carousel.astro +340 -0
- package/src/components/sections/QuoteStrip/index.astro +58 -0
- package/src/components/sections/QuoteStrip/logos.astro +226 -0
- package/src/components/sections/QuoteStrip/quotes.ts +61 -0
- package/src/components/sections/QuoteStrip/single.astro +92 -0
- package/src/components/sections/QuoteStrip/ticker.astro +319 -0
- package/src/components/sections/QuoteStrip/wall.astro +113 -0
- package/src/components/sections/Resources/band.astro +93 -0
- package/src/components/sections/Resources/featured.astro +239 -0
- package/src/components/sections/Resources/index.astro +225 -0
- package/src/components/sections/Resources/resources.ts +92 -0
- package/src/components/sections/SampleBallot/Position.astro +39 -0
- package/src/components/sections/SampleBallot/ballot.ts +92 -0
- package/src/components/sections/SampleBallot/cards.astro +299 -0
- package/src/components/sections/SampleBallot/index.astro +326 -0
- package/src/components/sections/SampleBallot/measures.astro +172 -0
- package/src/components/sections/Scorecard/grades.astro +141 -0
- package/src/components/sections/Scorecard/index.astro +294 -0
- package/src/components/sections/Scorecard/promise.astro +167 -0
- package/src/components/sections/Scorecard/votes.ts +83 -0
- package/src/components/sections/SectionHead.astro +31 -0
- package/src/components/sections/Services/Button.astro +24 -0
- package/src/components/sections/Services/Check.astro +12 -0
- package/src/components/sections/Services/Includes.astro +42 -0
- package/src/components/sections/Services/compare.astro +328 -0
- package/src/components/sections/Services/index.astro +187 -0
- package/src/components/sections/Services/list.astro +181 -0
- package/src/components/sections/Services/services.ts +80 -0
- package/src/components/sections/ShareKit/Actions.astro +71 -0
- package/src/components/sections/ShareKit/Buttons.astro +62 -0
- package/src/components/sections/ShareKit/compact.astro +123 -0
- package/src/components/sections/ShareKit/index.astro +160 -0
- package/src/components/sections/ShareKit/share.ts +60 -0
- package/src/components/sections/ShareKit/strip.astro +173 -0
- package/src/components/sections/SignupCapture/band.astro +7 -0
- package/src/components/sections/SignupCapture/index.astro +103 -0
- package/src/components/sections/SignupCapture/inline.astro +7 -0
- package/src/components/sections/SocialFeed/index.astro +34 -0
- package/src/components/sections/StatCards/feature.astro +143 -0
- package/src/components/sections/StatCards/index.astro +51 -0
- package/src/components/sections/StatCards/ribbon.astro +113 -0
- package/src/components/sections/StatCards/wall.astro +177 -0
- package/src/components/sections/Store/featured.astro +14 -0
- package/src/components/sections/Store/index.astro +14 -0
- package/src/components/sections/Stories/Status.astro +42 -0
- package/src/components/sections/Stories/StoryCards.astro +171 -0
- package/src/components/sections/Stories/cards.astro +42 -0
- package/src/components/sections/Stories/index.astro +238 -0
- package/src/components/sections/Stories/stories.ts +97 -0
- package/src/components/sections/Stories/timeline.astro +135 -0
- package/src/components/sections/TeamGrid/board.astro +280 -0
- package/src/components/sections/TeamGrid/index.astro +71 -0
- package/src/components/sections/TeamGrid/list.astro +306 -0
- package/src/components/sections/TeamGrid/people.ts +178 -0
- package/src/components/sections/VideoEmbed/index.astro +52 -0
- package/src/components/sections/VideoEmbed/landscape.astro +7 -0
- package/src/components/sections/VideoEmbed/portrait.astro +7 -0
- package/src/components/sections/VideoEmbed/square.astro +7 -0
- package/src/components/sections/VoterTools/DaysLeft.astro +33 -0
- package/src/components/sections/VoterTools/dates.astro +149 -0
- package/src/components/sections/VoterTools/index.astro +228 -0
- package/src/components/sections/VoterTools/polling.astro +141 -0
- package/src/components/sections/VoterTools/voter-tools.ts +70 -0
- package/src/components/sections/index.ts +370 -0
- package/src/components/sections/modules/Headed.astro +39 -0
- package/src/components/sections/modules/ModuleFrame.astro +179 -0
- package/src/components/volunteer/ShiftLive.astro +90 -0
- package/src/components/volunteer/detail.astro +247 -0
- package/src/components/volunteer/list.astro +298 -0
- package/src/components/volunteer/props.ts +21 -0
- package/src/env.d.ts +22 -0
- package/src/index.d.ts +10 -0
- package/src/index.js +64 -0
- package/src/layouts/Site.astro +371 -0
- package/src/lib/academy.ts +146 -0
- package/src/lib/brand.ts +534 -0
- package/src/lib/chrome.ts +119 -0
- package/src/lib/donate-frame.ts +64 -0
- package/src/lib/entries.ts +190 -0
- package/src/lib/env.ts +34 -0
- package/src/lib/event-map-draw.ts +91 -0
- package/src/lib/events.ts +476 -0
- package/src/lib/fonts.ts +116 -0
- package/src/lib/footer.ts +24 -0
- package/src/lib/format.ts +160 -0
- package/src/lib/geo.ts +131 -0
- package/src/lib/live.ts +54 -0
- package/src/lib/menu.ts +48 -0
- package/src/lib/petition-text.ts +29 -0
- package/src/lib/reading.ts +17 -0
- package/src/lib/regions.ts +215 -0
- package/src/lib/section.ts +94 -0
- package/src/lib/shifts.ts +186 -0
- package/src/lib/stream-time.ts +20 -0
- package/src/lib/stream.ts +141 -0
- package/src/lib/visitor.ts +54 -0
- package/src/routes/catch-all.astro +286 -0
- package/src/routes/form.astro +30 -0
- package/src/routes/live.astro +49 -0
- package/src/routes/not-found.astro +18 -0
- package/src/routes/preview.astro +60 -0
- package/src/routes/setup.astro +62 -0
- package/src/routes/volunteer-shift.astro +61 -0
- package/src/routes/volunteer.astro +37 -0
- package/src/styles/entries.css +784 -0
- package/src/styles/site.css +1839 -0
- package/src/template.ts +182 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
---
|
|
2
|
+
// About, 'letter' layout (Signed letter; board A2-about-platform, section 2):
|
|
3
|
+
// the story set as a letter, in the display serif at a reading measure with a
|
|
4
|
+
// drop cap, under its kicker and heading, with the writer's photo beside it
|
|
5
|
+
// (their initials on the brand's colours when there is a signature and no
|
|
6
|
+
// photo) and their signature and role (`copy.signature`, `copy.role`) under
|
|
7
|
+
// it. On a phone the picture sits above the letter, smaller. With neither a
|
|
8
|
+
// photo nor a signature the letter is one centred column.
|
|
9
|
+
import type { ComponentProps } from 'astro/types'
|
|
10
|
+
import Band from '../Band.astro'
|
|
11
|
+
import Prose from '../../Prose.astro'
|
|
12
|
+
import type Default from './index.astro'
|
|
13
|
+
import { media } from '../../../lib/section'
|
|
14
|
+
import { text } from '../../../lib/format'
|
|
15
|
+
import { initials } from '../../../lib/entries'
|
|
16
|
+
|
|
17
|
+
type Props = ComponentProps<typeof Default>
|
|
18
|
+
|
|
19
|
+
const { section } = Astro.props
|
|
20
|
+
const heading = text(section.copy.heading)
|
|
21
|
+
const kicker = text(section.copy.kicker)
|
|
22
|
+
const signature = text(section.copy.signature)
|
|
23
|
+
const role = text(section.copy.role)
|
|
24
|
+
const photo = media(section, 'photoUrl')
|
|
25
|
+
const tile = !photo && signature ? initials(signature) : null
|
|
26
|
+
---
|
|
27
|
+
<Band section={section} class="about">
|
|
28
|
+
<div class:list={['letter', (photo || tile) && 'letter-with-photo']}>
|
|
29
|
+
{photo && <img class="letter-image" src={photo.url} alt={photo.alt} loading="lazy" decoding="async" />}
|
|
30
|
+
{tile && <div class="letter-image letter-tile" aria-hidden="true">{tile}</div>}
|
|
31
|
+
<div class="letter-words">
|
|
32
|
+
{kicker && <p class="kicker">{kicker}</p>}
|
|
33
|
+
{heading && <h2>{heading}</h2>}
|
|
34
|
+
<Prose value={section.copy.body} class="letter-body" />
|
|
35
|
+
{signature && <p class="letter-signature">{signature}</p>}
|
|
36
|
+
{role && <p class="letter-role">{role}</p>}
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
</Band>
|
|
40
|
+
|
|
41
|
+
<style>
|
|
42
|
+
.letter {
|
|
43
|
+
display: grid;
|
|
44
|
+
gap: 2rem;
|
|
45
|
+
}
|
|
46
|
+
.letter:not(.letter-with-photo) {
|
|
47
|
+
max-width: 40rem;
|
|
48
|
+
margin-inline: auto;
|
|
49
|
+
}
|
|
50
|
+
.letter-image {
|
|
51
|
+
display: block;
|
|
52
|
+
width: 100%;
|
|
53
|
+
max-width: 12rem;
|
|
54
|
+
aspect-ratio: 1;
|
|
55
|
+
object-fit: cover;
|
|
56
|
+
border-radius: calc(var(--radius) * 1.75);
|
|
57
|
+
}
|
|
58
|
+
.letter-words > :last-child {
|
|
59
|
+
margin-bottom: 0;
|
|
60
|
+
}
|
|
61
|
+
.letter-words :global(.letter-body) {
|
|
62
|
+
max-width: 36em;
|
|
63
|
+
font-family: var(--font-display);
|
|
64
|
+
font-size: var(--text-lg);
|
|
65
|
+
line-height: 1.7;
|
|
66
|
+
}
|
|
67
|
+
.letter-signature {
|
|
68
|
+
margin: 1.5rem 0 0;
|
|
69
|
+
font-family: var(--font-display);
|
|
70
|
+
font-style: italic;
|
|
71
|
+
font-size: clamp(1.5rem, 1.2rem + 1vw, 1.875rem);
|
|
72
|
+
line-height: 1.2;
|
|
73
|
+
color: var(--accent);
|
|
74
|
+
}
|
|
75
|
+
.letter-role {
|
|
76
|
+
margin: 0.5rem 0 0;
|
|
77
|
+
color: var(--muted);
|
|
78
|
+
font-size: var(--text-sm);
|
|
79
|
+
}
|
|
80
|
+
.letter-tile {
|
|
81
|
+
display: grid;
|
|
82
|
+
place-items: center;
|
|
83
|
+
background: linear-gradient(155deg, var(--bg-brand-primary), var(--bg-brand-accent));
|
|
84
|
+
color: #fff;
|
|
85
|
+
font-family: var(--font-display);
|
|
86
|
+
font-size: clamp(2.5rem, 2rem + 2vw, 3.75rem);
|
|
87
|
+
font-weight: 800;
|
|
88
|
+
}
|
|
89
|
+
/* A2's drop cap: the letter's first letter, three lines deep, in the accent. */
|
|
90
|
+
.letter-words :global(.letter-body p:first-child::first-letter) {
|
|
91
|
+
float: left;
|
|
92
|
+
margin: 0.3rem 0.5rem 0 0;
|
|
93
|
+
color: var(--accent);
|
|
94
|
+
font-size: 3.4em;
|
|
95
|
+
font-weight: 800;
|
|
96
|
+
line-height: 0.8;
|
|
97
|
+
}
|
|
98
|
+
@media (min-width: 48rem) {
|
|
99
|
+
.letter-with-photo {
|
|
100
|
+
grid-template-columns: minmax(12rem, 18.75rem) minmax(0, 1fr);
|
|
101
|
+
gap: clamp(2.5rem, 4vw, 3.5rem);
|
|
102
|
+
align-items: start;
|
|
103
|
+
}
|
|
104
|
+
.letter-image {
|
|
105
|
+
max-width: none;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
</style>
|
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
---
|
|
2
|
+
// About, 'portrait' layout (board S19, A and C, "Portrait + credentials"):
|
|
3
|
+
// the person's photo at the left, tall (4:5) and rounded, and beside it the
|
|
4
|
+
// kicker, their name (the heading) large in the display face, their role
|
|
5
|
+
// under it, the story, then the credential rows as a checked list (the year
|
|
6
|
+
// before the line when the row has one, the label linked when it has an
|
|
7
|
+
// address, the detail muted under it) and the milestone rows in order down a
|
|
8
|
+
// short rail in the accent (the year small in capitals over the label, the
|
|
9
|
+
// detail muted), and the section's one button. The pull quote, when the
|
|
10
|
+
// operator wrote one, sits under everything in a panel filled in the
|
|
11
|
+
// contrast band's colours (on a section already on the contrast band, a tint
|
|
12
|
+
// of its ink): the quotation in the display face, its source under it.
|
|
13
|
+
//
|
|
14
|
+
// The photo's treatment is BackGold's `photoStyle`: a photo crops to fill;
|
|
15
|
+
// 'badge' shows the whole picture on the band's surface and 'plain' on
|
|
16
|
+
// nothing (a logo). Without a photo the words take the column alone; on a
|
|
17
|
+
// phone the photo comes first. Nothing is drawn with no heading, story,
|
|
18
|
+
// photo, row or quote.
|
|
19
|
+
import type { ComponentProps } from 'astro/types'
|
|
20
|
+
import Band from '../Band.astro'
|
|
21
|
+
import Prose from '../../Prose.astro'
|
|
22
|
+
import type Default from './index.astro'
|
|
23
|
+
import { buttonOf, credentialsOf, photoStyleOf, quoteOf } from './credentials'
|
|
24
|
+
import { media } from '../../../lib/section'
|
|
25
|
+
import { prose, text } from '../../../lib/format'
|
|
26
|
+
|
|
27
|
+
type Props = ComponentProps<typeof Default>
|
|
28
|
+
|
|
29
|
+
const { section } = Astro.props
|
|
30
|
+
const kicker = text(section.copy.kicker)
|
|
31
|
+
const heading = text(section.copy.heading)
|
|
32
|
+
const role = text(section.copy.role)
|
|
33
|
+
const photo = media(section, 'photoUrl')
|
|
34
|
+
const style = photoStyleOf(section)
|
|
35
|
+
const { credentials, milestones } = credentialsOf(section)
|
|
36
|
+
const pull = quoteOf(section)
|
|
37
|
+
const button = buttonOf(section)
|
|
38
|
+
const drawn = heading || prose(section.copy.body) || photo || credentials.length > 0 || milestones.length > 0 || pull
|
|
39
|
+
---
|
|
40
|
+
{drawn && (
|
|
41
|
+
<Band section={section} class="about about-portrait">
|
|
42
|
+
<div class:list={['portrait', photo && 'portrait-with-photo']}>
|
|
43
|
+
{photo && (
|
|
44
|
+
<div class:list={['portrait-photo', `portrait-photo-${style}`]}>
|
|
45
|
+
<img src={photo.url} alt={photo.alt} loading="lazy" decoding="async" />
|
|
46
|
+
</div>
|
|
47
|
+
)}
|
|
48
|
+
<div class="portrait-words">
|
|
49
|
+
{kicker && <p class="kicker">{kicker}</p>}
|
|
50
|
+
{heading && <h2 class="portrait-name">{heading}</h2>}
|
|
51
|
+
{role && <p class="portrait-role">{role}</p>}
|
|
52
|
+
<Prose value={section.copy.body} class="portrait-body" />
|
|
53
|
+
{credentials.length > 0 && (
|
|
54
|
+
<ul class="portrait-credentials" role="list">
|
|
55
|
+
{credentials.map((c) => (
|
|
56
|
+
<li>
|
|
57
|
+
<svg class="portrait-check" viewBox="0 0 16 16" width="16" height="16" aria-hidden="true" focusable="false"><path d="M3 8.5l3.2 3.2L13 4.8" fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round" /></svg>
|
|
58
|
+
<div>
|
|
59
|
+
<p class="portrait-credential">
|
|
60
|
+
{c.year && <><span class="portrait-year">{c.datetime ? <time datetime={c.datetime}>{c.year}</time> : c.year}</span>{' '}</>}
|
|
61
|
+
{c.link ? <a href={c.link.href} rel={c.link.rel}>{c.label}</a> : c.label}
|
|
62
|
+
</p>
|
|
63
|
+
{c.detail && <p class="portrait-detail">{c.detail}</p>}
|
|
64
|
+
</div>
|
|
65
|
+
</li>
|
|
66
|
+
))}
|
|
67
|
+
</ul>
|
|
68
|
+
)}
|
|
69
|
+
{milestones.length > 0 && (
|
|
70
|
+
<ol class="portrait-rail" role="list">
|
|
71
|
+
{milestones.map((m) => (
|
|
72
|
+
<li class="portrait-step">
|
|
73
|
+
<span class="portrait-dot" aria-hidden="true"></span>
|
|
74
|
+
{m.year && <p class="portrait-step-year">{m.datetime ? <time datetime={m.datetime}>{m.year}</time> : m.year}</p>}
|
|
75
|
+
<p class="portrait-step-label">{m.link ? <a href={m.link.href} rel={m.link.rel}>{m.label}</a> : m.label}</p>
|
|
76
|
+
{m.detail && <p class="portrait-detail">{m.detail}</p>}
|
|
77
|
+
</li>
|
|
78
|
+
))}
|
|
79
|
+
</ol>
|
|
80
|
+
)}
|
|
81
|
+
{button && (
|
|
82
|
+
<p class="actions">
|
|
83
|
+
<a class="button" href={button.href} rel={button.rel}>{button.label}</a>
|
|
84
|
+
</p>
|
|
85
|
+
)}
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
{pull && (
|
|
89
|
+
<figure class="portrait-quote bg-band-contrast">
|
|
90
|
+
<span class="portrait-quote-mark" aria-hidden="true">“</span>
|
|
91
|
+
<blockquote><p>{pull.quote}</p></blockquote>
|
|
92
|
+
{pull.source && <figcaption>{pull.source}</figcaption>}
|
|
93
|
+
</figure>
|
|
94
|
+
)}
|
|
95
|
+
</Band>
|
|
96
|
+
)}
|
|
97
|
+
|
|
98
|
+
<style>
|
|
99
|
+
.portrait {
|
|
100
|
+
display: grid;
|
|
101
|
+
gap: 2rem;
|
|
102
|
+
}
|
|
103
|
+
.portrait-photo {
|
|
104
|
+
width: 100%;
|
|
105
|
+
max-width: 22rem;
|
|
106
|
+
aspect-ratio: 4 / 5;
|
|
107
|
+
border-radius: calc(var(--radius) * 2);
|
|
108
|
+
overflow: hidden;
|
|
109
|
+
}
|
|
110
|
+
.portrait-photo img {
|
|
111
|
+
display: block;
|
|
112
|
+
width: 100%;
|
|
113
|
+
height: 100%;
|
|
114
|
+
object-fit: cover;
|
|
115
|
+
}
|
|
116
|
+
/* A logo: the whole picture, on the band's surface ('badge') or on nothing ('plain'). */
|
|
117
|
+
.portrait-photo-badge,
|
|
118
|
+
.portrait-photo-plain {
|
|
119
|
+
display: grid;
|
|
120
|
+
place-items: center;
|
|
121
|
+
}
|
|
122
|
+
.portrait-photo-badge {
|
|
123
|
+
padding: clamp(1rem, 8%, 2rem);
|
|
124
|
+
border: 1px solid var(--line);
|
|
125
|
+
background: var(--surface);
|
|
126
|
+
}
|
|
127
|
+
.portrait-photo-badge img,
|
|
128
|
+
.portrait-photo-plain img {
|
|
129
|
+
object-fit: contain;
|
|
130
|
+
}
|
|
131
|
+
.portrait-words {
|
|
132
|
+
min-width: 0;
|
|
133
|
+
}
|
|
134
|
+
.portrait-words > :last-child {
|
|
135
|
+
margin-bottom: 0;
|
|
136
|
+
}
|
|
137
|
+
.portrait-name {
|
|
138
|
+
margin-bottom: 0.25rem;
|
|
139
|
+
}
|
|
140
|
+
.portrait-role {
|
|
141
|
+
margin: 0 0 1.25rem;
|
|
142
|
+
color: var(--muted);
|
|
143
|
+
font-size: var(--text-lg);
|
|
144
|
+
font-weight: 600;
|
|
145
|
+
}
|
|
146
|
+
.portrait-words :global(.portrait-body) {
|
|
147
|
+
margin-top: 1rem;
|
|
148
|
+
}
|
|
149
|
+
.portrait-words :global(.portrait-body) > :global(:last-child) {
|
|
150
|
+
margin-bottom: 0;
|
|
151
|
+
}
|
|
152
|
+
.portrait-detail {
|
|
153
|
+
margin: 0.125rem 0 0;
|
|
154
|
+
color: var(--muted);
|
|
155
|
+
font-size: var(--text-sm);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/* The credentials: a check in the accent beside each line. */
|
|
159
|
+
.portrait-credentials {
|
|
160
|
+
display: grid;
|
|
161
|
+
gap: 0.75rem;
|
|
162
|
+
margin: 1.75rem 0 0;
|
|
163
|
+
padding: 1.25rem 0 0;
|
|
164
|
+
border-top: 1px solid var(--line);
|
|
165
|
+
list-style: none;
|
|
166
|
+
}
|
|
167
|
+
.portrait-credentials li {
|
|
168
|
+
display: flex;
|
|
169
|
+
align-items: flex-start;
|
|
170
|
+
gap: 0.75rem;
|
|
171
|
+
}
|
|
172
|
+
.portrait-check {
|
|
173
|
+
flex: 0 0 auto;
|
|
174
|
+
margin-top: 0.25em;
|
|
175
|
+
color: var(--accent);
|
|
176
|
+
}
|
|
177
|
+
.portrait-credential {
|
|
178
|
+
margin: 0;
|
|
179
|
+
font-weight: 600;
|
|
180
|
+
line-height: 1.45;
|
|
181
|
+
}
|
|
182
|
+
.portrait-credential a {
|
|
183
|
+
color: var(--ink);
|
|
184
|
+
}
|
|
185
|
+
.portrait-year {
|
|
186
|
+
color: var(--accent);
|
|
187
|
+
font-weight: 700;
|
|
188
|
+
}
|
|
189
|
+
.portrait-year::after {
|
|
190
|
+
content: ' ·';
|
|
191
|
+
color: var(--muted);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/* The milestones: a short rail in the accent, a dot at each step. */
|
|
195
|
+
.portrait-rail {
|
|
196
|
+
--rail: 2px;
|
|
197
|
+
--dot: 0.875rem;
|
|
198
|
+
/* The dot's centre sits on the year's line (its line box is 1.125rem tall). */
|
|
199
|
+
--dot-y: 0.5625rem;
|
|
200
|
+
margin: 1.75rem 0 0;
|
|
201
|
+
padding: 0;
|
|
202
|
+
list-style: none;
|
|
203
|
+
}
|
|
204
|
+
.portrait-step {
|
|
205
|
+
position: relative;
|
|
206
|
+
padding: 0 0 1.125rem calc(var(--dot) + 1rem);
|
|
207
|
+
}
|
|
208
|
+
.portrait-step:last-child {
|
|
209
|
+
padding-bottom: 0;
|
|
210
|
+
}
|
|
211
|
+
.portrait-step:not(:last-child)::before {
|
|
212
|
+
content: '';
|
|
213
|
+
position: absolute;
|
|
214
|
+
top: var(--dot-y);
|
|
215
|
+
bottom: calc(-1 * var(--dot-y));
|
|
216
|
+
left: calc(var(--dot) / 2 - var(--rail) / 2);
|
|
217
|
+
width: var(--rail);
|
|
218
|
+
background: var(--accent);
|
|
219
|
+
}
|
|
220
|
+
.portrait-dot {
|
|
221
|
+
position: absolute;
|
|
222
|
+
z-index: 1;
|
|
223
|
+
top: calc(var(--dot-y) - var(--dot) / 2);
|
|
224
|
+
left: 0;
|
|
225
|
+
width: var(--dot);
|
|
226
|
+
height: var(--dot);
|
|
227
|
+
border: 2px solid var(--bg-band-background);
|
|
228
|
+
border-radius: 50%;
|
|
229
|
+
background: var(--accent);
|
|
230
|
+
box-shadow: 0 0 0 1px var(--accent);
|
|
231
|
+
}
|
|
232
|
+
.portrait-step > p {
|
|
233
|
+
margin: 0;
|
|
234
|
+
}
|
|
235
|
+
.portrait-step .portrait-step-year {
|
|
236
|
+
color: var(--accent);
|
|
237
|
+
font-size: var(--text-xs);
|
|
238
|
+
font-weight: 700;
|
|
239
|
+
letter-spacing: 0.16em;
|
|
240
|
+
line-height: 1.5;
|
|
241
|
+
text-transform: uppercase;
|
|
242
|
+
}
|
|
243
|
+
.portrait-step .portrait-step-label {
|
|
244
|
+
font-weight: 700;
|
|
245
|
+
line-height: 1.35;
|
|
246
|
+
}
|
|
247
|
+
.portrait-step-label a {
|
|
248
|
+
color: var(--ink);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/* The pull quote: a panel in the contrast band's colours under everything. */
|
|
252
|
+
.portrait-quote {
|
|
253
|
+
margin: clamp(2rem, 1.5rem + 2vw, 3rem) 0 0;
|
|
254
|
+
padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
|
|
255
|
+
border-radius: var(--radius-card);
|
|
256
|
+
background: var(--bg-band-background);
|
|
257
|
+
color: var(--bg-band-color);
|
|
258
|
+
}
|
|
259
|
+
:global(.bg-band-contrast) .portrait-quote {
|
|
260
|
+
border: 1px solid var(--line);
|
|
261
|
+
background: color-mix(in srgb, var(--ink) 7%, transparent);
|
|
262
|
+
}
|
|
263
|
+
.portrait-quote-mark {
|
|
264
|
+
display: block;
|
|
265
|
+
height: 0.5em;
|
|
266
|
+
color: var(--accent);
|
|
267
|
+
font-family: var(--font-display);
|
|
268
|
+
font-size: clamp(3.5rem, 3rem + 2vw, 4.5rem);
|
|
269
|
+
font-weight: 800;
|
|
270
|
+
line-height: 1;
|
|
271
|
+
}
|
|
272
|
+
.portrait-quote blockquote {
|
|
273
|
+
margin: 0;
|
|
274
|
+
}
|
|
275
|
+
.portrait-quote blockquote p {
|
|
276
|
+
max-width: 44ch;
|
|
277
|
+
margin: 0;
|
|
278
|
+
font-family: var(--font-display);
|
|
279
|
+
font-size: clamp(1.375rem, 1.1rem + 1.1vw, 2rem);
|
|
280
|
+
font-weight: 700;
|
|
281
|
+
line-height: 1.22;
|
|
282
|
+
letter-spacing: -0.015em;
|
|
283
|
+
text-wrap: balance;
|
|
284
|
+
}
|
|
285
|
+
.portrait-quote figcaption {
|
|
286
|
+
margin-top: 1rem;
|
|
287
|
+
color: var(--muted);
|
|
288
|
+
font-size: var(--text-sm);
|
|
289
|
+
font-weight: 600;
|
|
290
|
+
}
|
|
291
|
+
.portrait-quote figcaption::before {
|
|
292
|
+
content: '— ';
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
@media (min-width: 48rem) {
|
|
296
|
+
.portrait-with-photo {
|
|
297
|
+
grid-template-columns: minmax(15rem, 21rem) minmax(0, 1fr);
|
|
298
|
+
gap: clamp(2.5rem, 4vw, 3.5rem);
|
|
299
|
+
align-items: start;
|
|
300
|
+
}
|
|
301
|
+
.portrait-photo {
|
|
302
|
+
max-width: none;
|
|
303
|
+
}
|
|
304
|
+
.portrait-with-photo .portrait-words {
|
|
305
|
+
padding-top: clamp(0rem, 2vw, 1.5rem);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
</style>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Contact your legislators · Compact: the lookup alone, narrow, on a raised
|
|
3
|
+
// card.
|
|
4
|
+
import type { Section } from '@backgold/content'
|
|
5
|
+
import Headed from '../modules/Headed.astro'
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
section: Section
|
|
9
|
+
variant?: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const { section } = Astro.props
|
|
13
|
+
---
|
|
14
|
+
<Headed section={section} layout="compact" card height="24rem" narrow />
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Contact your legislators · Full (board A12, the default): the heading, then
|
|
3
|
+
// BackGold's lookup and letters on a raised card.
|
|
4
|
+
import type { Section } from '@backgold/content'
|
|
5
|
+
import Headed from '../modules/Headed.astro'
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
section: Section
|
|
9
|
+
variant?: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const { section } = Astro.props
|
|
13
|
+
---
|
|
14
|
+
<Headed section={section} layout="full" card height="40rem" />
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
// The band every section sits in: the same classes and data attributes
|
|
3
|
+
// @backgold/astro's DefaultSection emits, so src/styles/site.css styles a
|
|
4
|
+
// section of yours and a block type BackGold adds later the same way. A
|
|
5
|
+
// section with an anchor id (`options.anchorId`, the renderer's rule: a
|
|
6
|
+
// letter, then up to 40 letters, digits, hyphens or underscores) carries it
|
|
7
|
+
// as its `id`, so a menu link to `/about#platform` lands on it; any other
|
|
8
|
+
// value is left off.
|
|
9
|
+
import type { Section } from '@backgold/content'
|
|
10
|
+
|
|
11
|
+
interface Props {
|
|
12
|
+
section: Section
|
|
13
|
+
class?: string
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const BANDS = ['plain', 'tint', 'panel', 'wash', 'contrast']
|
|
17
|
+
const BLEEDS = ['full', 'contained']
|
|
18
|
+
|
|
19
|
+
/** packages/site urls.ts SAFE_ANCHOR_ID_RE: what the hosted renderer accepts as a section's id. */
|
|
20
|
+
const SAFE_ANCHOR_ID = /^[A-Za-z][A-Za-z0-9_-]{0,40}$/
|
|
21
|
+
|
|
22
|
+
const { section, class: className } = Astro.props
|
|
23
|
+
const band = BANDS.includes(section.band) ? section.band : 'plain'
|
|
24
|
+
const bleed = BLEEDS.includes(section.bleed) ? section.bleed : 'full'
|
|
25
|
+
const anchorId = section.options?.anchorId
|
|
26
|
+
const id = typeof anchorId === 'string' && SAFE_ANCHOR_ID.test(anchorId) ? anchorId : undefined
|
|
27
|
+
---
|
|
28
|
+
<section
|
|
29
|
+
id={id}
|
|
30
|
+
class:list={['bg-section', `bg-band-${band}`, `bg-bleed-${bleed}`, className]}
|
|
31
|
+
data-type={section.type}
|
|
32
|
+
data-band={band}
|
|
33
|
+
data-bleed={bleed}
|
|
34
|
+
data-variant={section.variant ?? undefined}
|
|
35
|
+
>
|
|
36
|
+
<div class="bg-section-inner">
|
|
37
|
+
<slot />
|
|
38
|
+
</div>
|
|
39
|
+
</section>
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Blog · Lead story (board A1, "Blog · Lead story"; A12 shows it beside Cards
|
|
3
|
+
// and List): the section head (the kicker, the heading and its "All news"
|
|
4
|
+
// link: the section's own link, else "All news" to the news list at the
|
|
5
|
+
// organization's blog base), then the newest
|
|
6
|
+
// post large, with its cover, its category as an accent chip, its title,
|
|
7
|
+
// summary and byline (the author's picture or initials, "Corinne Pell ·
|
|
8
|
+
// Oct 2"), and the next ones as a short list beside it, each with its
|
|
9
|
+
// category, title, date and a small square cover. Four posts, or the
|
|
10
|
+
// section's `maxItems`. With nothing published it draws nothing.
|
|
11
|
+
import type { ComponentProps } from 'astro/types'
|
|
12
|
+
import type Default from './index.astro'
|
|
13
|
+
import Band from '../Band.astro'
|
|
14
|
+
import SectionHead from '../SectionHead.astro'
|
|
15
|
+
import { links } from '../../../lib/section'
|
|
16
|
+
import { text } from '../../../lib/format'
|
|
17
|
+
import { latestNews, shownOf, storyOf } from './latest'
|
|
18
|
+
|
|
19
|
+
type Props = ComponentProps<typeof Default>
|
|
20
|
+
|
|
21
|
+
const { section } = Astro.props
|
|
22
|
+
const heading = text(section.copy.heading) ?? 'Latest'
|
|
23
|
+
const own = links(section)
|
|
24
|
+
const { entries, listPath } = await latestNews(Astro.locals, shownOf(section, 4))
|
|
25
|
+
const more = own.length > 0 ? own : listPath ? [{ label: 'All news', href: listPath, rel: undefined }] : []
|
|
26
|
+
const stories = entries.map(storyOf)
|
|
27
|
+
const [lead, ...rest] = stories
|
|
28
|
+
---
|
|
29
|
+
{lead && (
|
|
30
|
+
<Band section={section} class="entries blog-feature">
|
|
31
|
+
<SectionHead kicker={text(section.copy.kicker)} heading={heading} more={more} />
|
|
32
|
+
<div class:list={['lead', { 'lead-alone': rest.length === 0 }]}>
|
|
33
|
+
<article class="lead-story">
|
|
34
|
+
{lead.image && <img class="lead-cover" src={lead.image} alt="" loading="lazy" decoding="async" />}
|
|
35
|
+
{lead.category && <p class="lead-chips"><span class="chip chip-accent">{lead.category}</span></p>}
|
|
36
|
+
<h3 class="lead-title">{lead.href ? <a href={lead.href}>{lead.title}</a> : lead.title}</h3>
|
|
37
|
+
{lead.summary && <p class="lead-summary">{lead.summary}</p>}
|
|
38
|
+
{(lead.byline || lead.shortDay) && (
|
|
39
|
+
<p class="lead-byline">
|
|
40
|
+
{lead.avatar && (lead.avatar.url ? <img class="lead-avatar" src={lead.avatar.url} alt="" loading="lazy" decoding="async" /> : <span class="lead-avatar" aria-hidden="true">{lead.avatar.initials}</span>)}
|
|
41
|
+
<span>
|
|
42
|
+
{lead.byline}
|
|
43
|
+
{lead.byline && lead.shortDay && ' · '}
|
|
44
|
+
{lead.shortDay && lead.date && <time datetime={lead.date}>{lead.shortDay}</time>}
|
|
45
|
+
</span>
|
|
46
|
+
</p>
|
|
47
|
+
)}
|
|
48
|
+
</article>
|
|
49
|
+
{rest.length > 0 && (
|
|
50
|
+
<ul class="lead-rest" role="list">
|
|
51
|
+
{rest.map((story) => (
|
|
52
|
+
<li class:list={['lead-item', { 'lead-item-pictured': story.image }]}>
|
|
53
|
+
<div>
|
|
54
|
+
{story.category && <p class="lead-chips"><span class="chip">{story.category}</span></p>}
|
|
55
|
+
<h3 class="lead-item-title">{story.href ? <a href={story.href}>{story.title}</a> : story.title}</h3>
|
|
56
|
+
{story.shortDay && story.date && <p class="lead-byline"><time datetime={story.date}>{story.shortDay}</time></p>}
|
|
57
|
+
</div>
|
|
58
|
+
{story.image && <img class="lead-thumb" src={story.image} alt="" loading="lazy" decoding="async" />}
|
|
59
|
+
</li>
|
|
60
|
+
))}
|
|
61
|
+
</ul>
|
|
62
|
+
)}
|
|
63
|
+
</div>
|
|
64
|
+
</Band>
|
|
65
|
+
)}
|
|
66
|
+
|
|
67
|
+
<style>
|
|
68
|
+
.lead {
|
|
69
|
+
display: grid;
|
|
70
|
+
gap: 2rem;
|
|
71
|
+
}
|
|
72
|
+
.lead-story > *,
|
|
73
|
+
.lead-item p,
|
|
74
|
+
.lead-item h3 {
|
|
75
|
+
margin: 0;
|
|
76
|
+
}
|
|
77
|
+
.lead-story .lead-cover {
|
|
78
|
+
display: block;
|
|
79
|
+
width: 100%;
|
|
80
|
+
aspect-ratio: 16 / 10;
|
|
81
|
+
object-fit: cover;
|
|
82
|
+
border-radius: var(--radius-card);
|
|
83
|
+
margin-bottom: 1.125rem;
|
|
84
|
+
}
|
|
85
|
+
.lead-story .lead-title {
|
|
86
|
+
margin: 0.75rem 0 0.625rem;
|
|
87
|
+
font-size: clamp(1.625rem, 1.2rem + 1.3vw, 2.125rem);
|
|
88
|
+
font-weight: 800;
|
|
89
|
+
line-height: 1.1;
|
|
90
|
+
}
|
|
91
|
+
.lead-title a,
|
|
92
|
+
.lead-item-title a {
|
|
93
|
+
color: var(--ink);
|
|
94
|
+
text-decoration: none;
|
|
95
|
+
}
|
|
96
|
+
.lead-title a:hover,
|
|
97
|
+
.lead-item-title a:hover {
|
|
98
|
+
text-decoration: underline;
|
|
99
|
+
}
|
|
100
|
+
.lead-story .lead-summary {
|
|
101
|
+
color: var(--muted);
|
|
102
|
+
font-size: 1.0625rem;
|
|
103
|
+
max-width: var(--measure);
|
|
104
|
+
}
|
|
105
|
+
.lead-byline {
|
|
106
|
+
display: flex;
|
|
107
|
+
align-items: center;
|
|
108
|
+
gap: 0.625rem;
|
|
109
|
+
margin-top: 0.25rem;
|
|
110
|
+
color: var(--muted);
|
|
111
|
+
font-size: var(--text-sm);
|
|
112
|
+
}
|
|
113
|
+
.lead-story .lead-byline {
|
|
114
|
+
margin-top: 0.875rem;
|
|
115
|
+
}
|
|
116
|
+
.lead-avatar {
|
|
117
|
+
display: grid;
|
|
118
|
+
place-items: center;
|
|
119
|
+
flex: 0 0 auto;
|
|
120
|
+
width: 1.875rem;
|
|
121
|
+
height: 1.875rem;
|
|
122
|
+
border-radius: 50%;
|
|
123
|
+
object-fit: cover;
|
|
124
|
+
background: linear-gradient(150deg, var(--bg-brand-primary), var(--bg-brand-accent));
|
|
125
|
+
color: var(--band-photo-ink);
|
|
126
|
+
font-family: var(--font-display);
|
|
127
|
+
font-size: var(--text-xs);
|
|
128
|
+
font-weight: 600;
|
|
129
|
+
}
|
|
130
|
+
.lead-rest {
|
|
131
|
+
display: grid;
|
|
132
|
+
align-content: start;
|
|
133
|
+
margin: 0;
|
|
134
|
+
padding: 0;
|
|
135
|
+
list-style: none;
|
|
136
|
+
}
|
|
137
|
+
.lead-item {
|
|
138
|
+
display: grid;
|
|
139
|
+
gap: 1rem;
|
|
140
|
+
padding: 1.125rem 0;
|
|
141
|
+
border-top: 1px solid var(--line);
|
|
142
|
+
}
|
|
143
|
+
.lead-item-pictured {
|
|
144
|
+
grid-template-columns: minmax(0, 1fr) 5.5rem;
|
|
145
|
+
}
|
|
146
|
+
.lead-item:first-child {
|
|
147
|
+
border-top: 0;
|
|
148
|
+
padding-top: 0;
|
|
149
|
+
}
|
|
150
|
+
.lead-item .lead-item-title {
|
|
151
|
+
margin-top: 0.375rem;
|
|
152
|
+
font-size: 1.1875rem;
|
|
153
|
+
font-weight: 600;
|
|
154
|
+
line-height: 1.25;
|
|
155
|
+
}
|
|
156
|
+
.lead-thumb {
|
|
157
|
+
display: block;
|
|
158
|
+
width: 100%;
|
|
159
|
+
aspect-ratio: 1;
|
|
160
|
+
object-fit: cover;
|
|
161
|
+
border-radius: var(--radius);
|
|
162
|
+
}
|
|
163
|
+
@media (min-width: 52rem) {
|
|
164
|
+
.lead {
|
|
165
|
+
grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
|
|
166
|
+
gap: 2.25rem;
|
|
167
|
+
}
|
|
168
|
+
.lead-alone {
|
|
169
|
+
grid-template-columns: minmax(0, 1fr);
|
|
170
|
+
max-width: 48rem;
|
|
171
|
+
}
|
|
172
|
+
.lead-item-pictured {
|
|
173
|
+
grid-template-columns: minmax(0, 1fr) 6.875rem;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
</style>
|