@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,399 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Hero, 'video' layout (REPORT §3 Hero, "Video background"): the cover with
|
|
3
|
+
// one thing moving. Here it is a muted loop (`media.videoUrl`) filling the
|
|
4
|
+
// band edge to edge, with the photo as its poster and the cover's scrim, kicker,
|
|
5
|
+
// headline (its last word in the accent), line, buttons and signup frame over
|
|
6
|
+
// it in the photo band's inks. The video is decoration: hidden from assistive
|
|
7
|
+
// technology, no sound, no native controls, playing by the browser's own
|
|
8
|
+
// autoplay with no script. Its poster is also drawn as an image under it, so
|
|
9
|
+
// `prefers-reduced-motion: reduce` hides the video (its source is not even
|
|
10
|
+
// fetched then) and leaves the photo. With script a small Pause button sits
|
|
11
|
+
// in the band's top right corner (WCAG 2.2.2: motion that runs on gets a
|
|
12
|
+
// way to stop it).
|
|
13
|
+
//
|
|
14
|
+
// The rotating layout draws through this file too (rotating.astro passes the
|
|
15
|
+
// Hero's `words`): the headline's last word gives way to each word in turn,
|
|
16
|
+
// on the cover's photo, never over a video, so one thing moves at a time.
|
|
17
|
+
// The first word is in the HTML and the <h1>'s text; the turning word is
|
|
18
|
+
// hidden from assistive technology and the heading's `aria-label` holds the
|
|
19
|
+
// headline with the first word, so its name never changes under a reader.
|
|
20
|
+
// An inline island turns the words every 3 s with a short fade (the word is
|
|
21
|
+
// held at the widest one's width, so the headline never reflows), and the
|
|
22
|
+
// same corner button pauses them; under reduced motion they never turn.
|
|
23
|
+
//
|
|
24
|
+
// The photo's alt text is `copy.imageAlt`; the caption (`copy.caption`) sits
|
|
25
|
+
// at the frame's lower left, and with no photo or video there is none.
|
|
26
|
+
// Without a video (and without words) this is exactly the cover. The
|
|
27
|
+
// page-opening Hero's headline is the page's <h1> (`level={1}`); any other
|
|
28
|
+
// Hero's is an <h2>. A Hero with its signup form on carries an `embed`:
|
|
29
|
+
// BackGold's own form, framed under the buttons.
|
|
30
|
+
import type { ComponentProps } from 'astro/types'
|
|
31
|
+
import { Embed } from '@backgold/astro/components'
|
|
32
|
+
import Band from '../Band.astro'
|
|
33
|
+
import Cover from './cover.astro'
|
|
34
|
+
import type Default from './index.astro'
|
|
35
|
+
import { heroPhoto, links, media } from '../../../lib/section'
|
|
36
|
+
import { text } from '../../../lib/format'
|
|
37
|
+
|
|
38
|
+
type Props = ComponentProps<typeof Default> & {
|
|
39
|
+
/** The rotating layout's words, the first shown without script; none for the video layout. */
|
|
40
|
+
words?: string[]
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const { section, level = 2, words = [] } = Astro.props
|
|
44
|
+
const turning = words.length > 0
|
|
45
|
+
const video = turning ? null : media(section, 'videoUrl')
|
|
46
|
+
// The video's own poster frame first, so nothing jumps when the loop starts.
|
|
47
|
+
const picture = video ? heroPhoto(section, 'videoPosterUrl', 'imageUrl', 'photoUrl') : heroPhoto(section, 'imageUrl', 'photoUrl', 'videoPosterUrl')
|
|
48
|
+
const framed = video !== null || picture !== null
|
|
49
|
+
const Heading = level === 1 ? 'h1' : 'h2'
|
|
50
|
+
const kicker = text(section.copy.kicker)
|
|
51
|
+
const headline = text(section.copy.headline)?.trim() ?? null
|
|
52
|
+
const subheadline = text(section.copy.subheadline)
|
|
53
|
+
const caption = text(section.copy.caption)
|
|
54
|
+
const buttons = links(section)
|
|
55
|
+
// "More freedom. Fewer " and "excuses.": the last word apart, for the accent
|
|
56
|
+
// (or, rotating, for the words that take its place; a one-word headline is
|
|
57
|
+
// replaced whole).
|
|
58
|
+
const split = headline ? /^(.*\s)(\S+)$/su.exec(headline) : null
|
|
59
|
+
const [lead, last] = split ? [split[1]!, split[2]!] : turning ? ['', null] : [headline ?? '', null]
|
|
60
|
+
const moving = video !== null || words.length > 1
|
|
61
|
+
const what = video ? 'background video' : 'changing words'
|
|
62
|
+
---
|
|
63
|
+
{!video && !turning ? (
|
|
64
|
+
<Cover {...Astro.props} />
|
|
65
|
+
) : (
|
|
66
|
+
<Band section={section} class:list={['hero-motion', framed && 'hero-motion-frame']}>
|
|
67
|
+
{picture && (
|
|
68
|
+
<img
|
|
69
|
+
class="motion-image"
|
|
70
|
+
src={picture.url}
|
|
71
|
+
alt={picture.alt}
|
|
72
|
+
loading={level === 1 ? 'eager' : 'lazy'}
|
|
73
|
+
fetchpriority={level === 1 ? 'high' : undefined}
|
|
74
|
+
decoding="async"
|
|
75
|
+
/>
|
|
76
|
+
)}
|
|
77
|
+
{video && (
|
|
78
|
+
<video
|
|
79
|
+
class="motion-video"
|
|
80
|
+
autoplay
|
|
81
|
+
muted
|
|
82
|
+
loop
|
|
83
|
+
playsinline
|
|
84
|
+
preload="metadata"
|
|
85
|
+
poster={picture?.url}
|
|
86
|
+
aria-hidden="true"
|
|
87
|
+
tabindex="-1"
|
|
88
|
+
disablepictureinpicture
|
|
89
|
+
>
|
|
90
|
+
<source src={video.url} media="(prefers-reduced-motion: no-preference)" />
|
|
91
|
+
</video>
|
|
92
|
+
)}
|
|
93
|
+
{framed && <div class="motion-scrim" aria-hidden="true"></div>}
|
|
94
|
+
{framed && caption && <p class="motion-caption">{caption}</p>}
|
|
95
|
+
<div class:list={['motion-words', framed && 'on-photo', moving && !framed && 'motion-words-clear']}>
|
|
96
|
+
{kicker && <p class="kicker">{kicker}</p>}
|
|
97
|
+
{headline && (
|
|
98
|
+
turning ? (
|
|
99
|
+
<Heading class="motion-headline" aria-label={`${lead}${words[0]}`}>
|
|
100
|
+
{lead}<em class="motion-turn" aria-hidden="true" data-words={words.length > 1 ? JSON.stringify(words) : undefined}><span class="motion-turn-word">{words[0]}</span></em>
|
|
101
|
+
</Heading>
|
|
102
|
+
) : (
|
|
103
|
+
<Heading class="motion-headline">{lead}{last && <em>{last}</em>}</Heading>
|
|
104
|
+
)
|
|
105
|
+
)}
|
|
106
|
+
{subheadline && <p class="motion-lede">{subheadline}</p>}
|
|
107
|
+
{buttons.length > 0 && (
|
|
108
|
+
<p class="actions">
|
|
109
|
+
{buttons.map((link, i) => <a class:list={['button', i > 0 && 'button-quiet']} href={link.href} rel={link.rel}>{link.label}</a>)}
|
|
110
|
+
</p>
|
|
111
|
+
)}
|
|
112
|
+
{section.embed && <Embed embed={section.embed} title="Sign up" />}
|
|
113
|
+
</div>
|
|
114
|
+
{moving && (
|
|
115
|
+
<>
|
|
116
|
+
<button type="button" class:list={['motion-toggle', framed && 'motion-toggle-framed']} data-motion-toggle data-what={what} hidden>
|
|
117
|
+
<svg class="motion-icon motion-icon-pause" viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path d="M4 3h3v10H4zM9 3h3v10H9z" /></svg>
|
|
118
|
+
<svg class="motion-icon motion-icon-play" viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path d="M5 3l8 5-8 5z" /></svg>
|
|
119
|
+
<span class="visually-hidden" data-motion-label>Pause the {what}</span>
|
|
120
|
+
</button>
|
|
121
|
+
<script is:inline>
|
|
122
|
+
;(function () {
|
|
123
|
+
var toggle = document.currentScript && document.currentScript.previousElementSibling
|
|
124
|
+
if (!toggle || !toggle.hasAttribute('data-motion-toggle')) return
|
|
125
|
+
var band = toggle.closest('.bg-section')
|
|
126
|
+
var video = band && band.querySelector('video')
|
|
127
|
+
var turn = band && band.querySelector('[data-words]')
|
|
128
|
+
var label = toggle.querySelector('[data-motion-label]')
|
|
129
|
+
var what = toggle.getAttribute('data-what')
|
|
130
|
+
var reduce = window.matchMedia('(prefers-reduced-motion: reduce)')
|
|
131
|
+
var words = []
|
|
132
|
+
var word = turn && turn.firstElementChild
|
|
133
|
+
var at = 0
|
|
134
|
+
var timer = null
|
|
135
|
+
var paused = false
|
|
136
|
+
var inView = true
|
|
137
|
+
|
|
138
|
+
// The words: one span whose text changes, so the heading's text
|
|
139
|
+
// is only ever the headline as shown. It is held at the widest
|
|
140
|
+
// word's width (measured again once the faces load and when the
|
|
141
|
+
// window changes size), so the headline never reflows as they turn.
|
|
142
|
+
if (turn) {
|
|
143
|
+
try {
|
|
144
|
+
words = JSON.parse(turn.getAttribute('data-words') || '[]')
|
|
145
|
+
} catch (e) {}
|
|
146
|
+
if (!word || words.length < 2) return
|
|
147
|
+
var hold = function () {
|
|
148
|
+
var widest = 0
|
|
149
|
+
turn.style.minWidth = ''
|
|
150
|
+
for (var i = 0; i < words.length; i++) {
|
|
151
|
+
word.textContent = words[i]
|
|
152
|
+
widest = Math.max(widest, word.getBoundingClientRect().width)
|
|
153
|
+
}
|
|
154
|
+
word.textContent = words[at]
|
|
155
|
+
turn.style.minWidth = Math.ceil(widest) + 'px'
|
|
156
|
+
}
|
|
157
|
+
hold()
|
|
158
|
+
if (document.fonts && document.fonts.ready) document.fonts.ready.then(hold)
|
|
159
|
+
window.addEventListener('resize', hold)
|
|
160
|
+
}
|
|
161
|
+
if (!video && words.length < 2) return
|
|
162
|
+
|
|
163
|
+
function step() {
|
|
164
|
+
turn.classList.add('is-turning')
|
|
165
|
+
setTimeout(function () {
|
|
166
|
+
at = (at + 1) % words.length
|
|
167
|
+
word.textContent = words[at]
|
|
168
|
+
turn.classList.remove('is-turning')
|
|
169
|
+
}, 250)
|
|
170
|
+
}
|
|
171
|
+
function moving() {
|
|
172
|
+
return !paused && !reduce.matches && inView && !document.hidden
|
|
173
|
+
}
|
|
174
|
+
function run() {
|
|
175
|
+
var go = moving()
|
|
176
|
+
if (turn) {
|
|
177
|
+
if (go && !timer) timer = setInterval(step, 3000)
|
|
178
|
+
if (!go && timer) {
|
|
179
|
+
clearInterval(timer)
|
|
180
|
+
timer = null
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
if (video) {
|
|
184
|
+
if (go && video.paused && video.currentSrc) video.play().catch(function () {})
|
|
185
|
+
if (!go && !video.paused) video.pause()
|
|
186
|
+
}
|
|
187
|
+
toggle.hidden = reduce.matches || (video ? !video.currentSrc : false)
|
|
188
|
+
toggle.setAttribute('data-paused', paused ? 'true' : 'false')
|
|
189
|
+
label.textContent = (paused ? 'Play the ' : 'Pause the ') + what
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
toggle.addEventListener('click', function () {
|
|
193
|
+
paused = !paused
|
|
194
|
+
run()
|
|
195
|
+
})
|
|
196
|
+
if (reduce.addEventListener) reduce.addEventListener('change', run)
|
|
197
|
+
document.addEventListener('visibilitychange', run)
|
|
198
|
+
if (video) {
|
|
199
|
+
video.addEventListener('loadedmetadata', run)
|
|
200
|
+
// The browser's autoplay may start after the hero was found off screen or paused.
|
|
201
|
+
video.addEventListener('play', function () {
|
|
202
|
+
if (!moving()) video.pause()
|
|
203
|
+
})
|
|
204
|
+
}
|
|
205
|
+
if ('IntersectionObserver' in window) {
|
|
206
|
+
new IntersectionObserver(function (entries) {
|
|
207
|
+
inView = entries[0].isIntersecting
|
|
208
|
+
run()
|
|
209
|
+
}).observe(band)
|
|
210
|
+
}
|
|
211
|
+
run()
|
|
212
|
+
})()
|
|
213
|
+
</script>
|
|
214
|
+
</>
|
|
215
|
+
)}
|
|
216
|
+
</Band>
|
|
217
|
+
)}
|
|
218
|
+
|
|
219
|
+
<style>
|
|
220
|
+
/* The band: placed for the corner button; with a photo or a video, their frame, on the photo band's ground. */
|
|
221
|
+
:global(.bg-section.hero-motion) {
|
|
222
|
+
position: relative;
|
|
223
|
+
}
|
|
224
|
+
:global(.bg-section.hero-motion-frame) {
|
|
225
|
+
isolation: isolate;
|
|
226
|
+
overflow: hidden;
|
|
227
|
+
display: flex;
|
|
228
|
+
align-items: flex-end;
|
|
229
|
+
min-height: 32.5rem;
|
|
230
|
+
background: var(--band-photo);
|
|
231
|
+
--bg-section-padding: var(--space) var(--gutter) clamp(2.25rem, 1.5rem + 2.5vw, 4rem);
|
|
232
|
+
}
|
|
233
|
+
:global(.bg-section.hero-motion-frame) > :global(.bg-section-inner) {
|
|
234
|
+
width: 100%;
|
|
235
|
+
}
|
|
236
|
+
/* A frame is not the band's ground: the band after it keeps its own top padding. */
|
|
237
|
+
:global(.bg-section.bg-bleed-full.hero-motion-frame + .bg-section.bg-bleed-full) {
|
|
238
|
+
padding-top: var(--space);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.motion-image,
|
|
242
|
+
.motion-video {
|
|
243
|
+
position: absolute;
|
|
244
|
+
inset: 0;
|
|
245
|
+
width: 100%;
|
|
246
|
+
height: 100%;
|
|
247
|
+
max-width: none;
|
|
248
|
+
object-fit: cover;
|
|
249
|
+
}
|
|
250
|
+
.motion-image {
|
|
251
|
+
z-index: -3;
|
|
252
|
+
}
|
|
253
|
+
.motion-video {
|
|
254
|
+
z-index: -2;
|
|
255
|
+
}
|
|
256
|
+
/* The cover's scrim: light at the top, deep where the words are, so they read on any frame. */
|
|
257
|
+
.motion-scrim {
|
|
258
|
+
position: absolute;
|
|
259
|
+
inset: 0;
|
|
260
|
+
z-index: -1;
|
|
261
|
+
background: linear-gradient(
|
|
262
|
+
180deg,
|
|
263
|
+
color-mix(in srgb, var(--band-photo) 10%, transparent) 0%,
|
|
264
|
+
color-mix(in srgb, var(--band-photo) 35%, transparent) 30%,
|
|
265
|
+
color-mix(in srgb, var(--band-photo) 80%, transparent) 62%,
|
|
266
|
+
color-mix(in srgb, var(--band-photo) 92%, transparent) 100%
|
|
267
|
+
);
|
|
268
|
+
}
|
|
269
|
+
.motion-caption {
|
|
270
|
+
position: absolute;
|
|
271
|
+
left: 0.75rem;
|
|
272
|
+
bottom: 0.625rem;
|
|
273
|
+
z-index: 1;
|
|
274
|
+
max-width: calc(100% - 1.5rem);
|
|
275
|
+
margin: 0;
|
|
276
|
+
padding: 0.1875rem 0.5rem;
|
|
277
|
+
border-radius: 0.25rem;
|
|
278
|
+
background: color-mix(in srgb, var(--band-photo) 70%, transparent);
|
|
279
|
+
color: var(--band-photo-ink);
|
|
280
|
+
font-size: 0.6875rem;
|
|
281
|
+
line-height: 1.4;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
/* Pause / play: in the band's top padding, clear of the words on any width. */
|
|
285
|
+
.motion-toggle {
|
|
286
|
+
position: absolute;
|
|
287
|
+
top: 0.375rem;
|
|
288
|
+
right: 0.375rem;
|
|
289
|
+
z-index: 1;
|
|
290
|
+
display: inline-flex;
|
|
291
|
+
align-items: center;
|
|
292
|
+
justify-content: center;
|
|
293
|
+
width: 2.25rem;
|
|
294
|
+
height: 2.25rem;
|
|
295
|
+
padding: 0;
|
|
296
|
+
border: 1px solid var(--line-strong);
|
|
297
|
+
border-radius: 50%;
|
|
298
|
+
background: var(--bg-band-background);
|
|
299
|
+
color: var(--ink);
|
|
300
|
+
cursor: pointer;
|
|
301
|
+
}
|
|
302
|
+
.motion-toggle[hidden] {
|
|
303
|
+
display: none;
|
|
304
|
+
}
|
|
305
|
+
.motion-toggle-framed {
|
|
306
|
+
border-color: var(--band-photo-line-strong);
|
|
307
|
+
background: color-mix(in srgb, var(--band-photo) 70%, transparent);
|
|
308
|
+
color: var(--band-photo-ink);
|
|
309
|
+
}
|
|
310
|
+
.motion-icon {
|
|
311
|
+
width: 0.875rem;
|
|
312
|
+
height: 0.875rem;
|
|
313
|
+
fill: currentColor;
|
|
314
|
+
}
|
|
315
|
+
.motion-toggle[data-paused='true'] .motion-icon-pause,
|
|
316
|
+
.motion-toggle:not([data-paused='true']) .motion-icon-play {
|
|
317
|
+
display: none;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
/* On the band the corner button may meet the first line when the band above shares its ground (no top padding). */
|
|
321
|
+
.motion-words-clear > :first-child {
|
|
322
|
+
padding-right: 2.75rem;
|
|
323
|
+
}
|
|
324
|
+
.motion-words .kicker {
|
|
325
|
+
margin-bottom: 0.875rem;
|
|
326
|
+
}
|
|
327
|
+
.motion-headline {
|
|
328
|
+
font-size: clamp(2.75rem, 1.4rem + 4.9vw, 5.25rem);
|
|
329
|
+
font-weight: 800;
|
|
330
|
+
line-height: 0.96;
|
|
331
|
+
letter-spacing: -0.03em;
|
|
332
|
+
max-width: 11em;
|
|
333
|
+
margin: 0;
|
|
334
|
+
}
|
|
335
|
+
.motion-headline em {
|
|
336
|
+
font-style: italic;
|
|
337
|
+
font-weight: 500;
|
|
338
|
+
color: var(--accent);
|
|
339
|
+
}
|
|
340
|
+
/* The turning word: held at the widest word's width (the island sets it), fading out and in as it changes. */
|
|
341
|
+
.motion-turn {
|
|
342
|
+
display: inline-block;
|
|
343
|
+
max-width: 100%;
|
|
344
|
+
}
|
|
345
|
+
.motion-turn-word {
|
|
346
|
+
display: inline-block;
|
|
347
|
+
}
|
|
348
|
+
.is-turning .motion-turn-word {
|
|
349
|
+
opacity: 0;
|
|
350
|
+
transform: translateY(0.15em);
|
|
351
|
+
}
|
|
352
|
+
.motion-lede {
|
|
353
|
+
font-size: var(--text-lg);
|
|
354
|
+
color: var(--muted);
|
|
355
|
+
max-width: 34em;
|
|
356
|
+
margin: 1.375rem 0 0;
|
|
357
|
+
}
|
|
358
|
+
.on-photo .motion-lede {
|
|
359
|
+
color: color-mix(in srgb, var(--ink) 92%, transparent);
|
|
360
|
+
}
|
|
361
|
+
.motion-words .actions {
|
|
362
|
+
margin-top: 1.875rem;
|
|
363
|
+
}
|
|
364
|
+
.motion-words > :global(.bg-embed) {
|
|
365
|
+
margin-top: 1.5rem;
|
|
366
|
+
}
|
|
367
|
+
@media (min-width: 48rem) {
|
|
368
|
+
:global(.bg-section.hero-motion-frame) {
|
|
369
|
+
min-height: 37.5rem;
|
|
370
|
+
}
|
|
371
|
+
.motion-toggle {
|
|
372
|
+
top: 0.75rem;
|
|
373
|
+
right: 0.75rem;
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
@media (prefers-reduced-motion: reduce) {
|
|
377
|
+
.motion-video {
|
|
378
|
+
display: none;
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
382
|
+
.motion-headline,
|
|
383
|
+
.motion-lede {
|
|
384
|
+
animation: motion-rise 0.4s ease-out both;
|
|
385
|
+
}
|
|
386
|
+
.motion-turn-word {
|
|
387
|
+
transition:
|
|
388
|
+
opacity 0.25s ease,
|
|
389
|
+
transform 0.25s ease;
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
/* A1's motion note, as the cover has it: the headline and lede rise 12px and fade in once on load. */
|
|
393
|
+
@keyframes motion-rise {
|
|
394
|
+
from {
|
|
395
|
+
opacity: 0;
|
|
396
|
+
transform: translateY(0.75rem);
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
</style>
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Issues, 'checklist' layout (board S22, C, "Vertical checklist + CTA"): the
|
|
3
|
+
// kicker and the heading, then one panel filled in the contrast band's
|
|
4
|
+
// colours (on a section already on the contrast band, a tint of its ink).
|
|
5
|
+
// At its left the issues as numbered steps: a number tile in the accent, the
|
|
6
|
+
// step's title, its line, and what it includes as a checked list. At its
|
|
7
|
+
// right, behind a rule, the lead as the call's words (its first paragraph
|
|
8
|
+
// large in the display face, "Ready to start step 1?") and the section's
|
|
9
|
+
// first link as the one button, any further links as text links under it.
|
|
10
|
+
// Without a link the right column is left out and the lead sits under the
|
|
11
|
+
// heading. On a phone the call follows the steps, behind a rule above it.
|
|
12
|
+
// With no step the lead and the links follow the heading as on the 'cards'
|
|
13
|
+
// layout; nothing is drawn with no heading, lead or step.
|
|
14
|
+
import type { ComponentProps } from 'astro/types'
|
|
15
|
+
import Band from '../Band.astro'
|
|
16
|
+
import Prose from '../../Prose.astro'
|
|
17
|
+
import type Default from './index.astro'
|
|
18
|
+
import { issuesOf } from './issues'
|
|
19
|
+
import { links } from '../../../lib/section'
|
|
20
|
+
import { prose, text } from '../../../lib/format'
|
|
21
|
+
|
|
22
|
+
type Props = ComponentProps<typeof Default>
|
|
23
|
+
|
|
24
|
+
const { section } = Astro.props
|
|
25
|
+
const heading = text(section.copy.heading)
|
|
26
|
+
const kicker = text(section.copy.kicker)
|
|
27
|
+
const steps = issuesOf(section)
|
|
28
|
+
const [cta, ...more] = links(section)
|
|
29
|
+
const side = steps.length > 0 && cta ? cta : null
|
|
30
|
+
const drawn = heading || kicker || prose(section.copy.lead) || steps.length > 0
|
|
31
|
+
---
|
|
32
|
+
{drawn && (
|
|
33
|
+
<Band section={section} class="issues">
|
|
34
|
+
{kicker && <p class="kicker">{kicker}</p>}
|
|
35
|
+
{heading && <h2>{heading}</h2>}
|
|
36
|
+
{!side && <Prose value={section.copy.lead} class="lede" />}
|
|
37
|
+
{steps.length > 0 && (
|
|
38
|
+
<div class:list={['checklist', 'bg-band-contrast', side && 'checklist-with-call']}>
|
|
39
|
+
<ol class="checklist-steps" role="list">
|
|
40
|
+
{steps.map((step, i) => (
|
|
41
|
+
<li class="checklist-step">
|
|
42
|
+
<span class="checklist-tile" aria-hidden="true">{i + 1}</span>
|
|
43
|
+
<div class="checklist-words">
|
|
44
|
+
{step.title && <h3>{step.title}</h3>}
|
|
45
|
+
<Prose value={step.body} class="checklist-body" />
|
|
46
|
+
{step.includes.length > 0 && (
|
|
47
|
+
<ul class="checklist-includes" role="list">
|
|
48
|
+
{step.includes.map((line) => (
|
|
49
|
+
<li>
|
|
50
|
+
<svg 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>
|
|
51
|
+
<span>{line}</span>
|
|
52
|
+
</li>
|
|
53
|
+
))}
|
|
54
|
+
</ul>
|
|
55
|
+
)}
|
|
56
|
+
</div>
|
|
57
|
+
</li>
|
|
58
|
+
))}
|
|
59
|
+
</ol>
|
|
60
|
+
{side && (
|
|
61
|
+
<div class="checklist-call">
|
|
62
|
+
<Prose value={section.copy.lead} class="checklist-lead" />
|
|
63
|
+
<p class="checklist-button">
|
|
64
|
+
<a class="button" href={side.href} rel={side.rel}>{side.label}</a>
|
|
65
|
+
</p>
|
|
66
|
+
{more.length > 0 && (
|
|
67
|
+
<p class="checklist-more">
|
|
68
|
+
{more.map((link) => <a href={link.href} rel={link.rel}>{link.label}</a>)}
|
|
69
|
+
</p>
|
|
70
|
+
)}
|
|
71
|
+
</div>
|
|
72
|
+
)}
|
|
73
|
+
</div>
|
|
74
|
+
)}
|
|
75
|
+
{steps.length === 0 && cta && (
|
|
76
|
+
<p class="actions">
|
|
77
|
+
{[cta, ...more].map((link, i) => <a class:list={['button', i > 0 && 'button-quiet']} href={link.href} rel={link.rel}>{link.label}</a>)}
|
|
78
|
+
</p>
|
|
79
|
+
)}
|
|
80
|
+
</Band>
|
|
81
|
+
)}
|
|
82
|
+
|
|
83
|
+
<style>
|
|
84
|
+
.checklist {
|
|
85
|
+
display: grid;
|
|
86
|
+
gap: 1.75rem;
|
|
87
|
+
margin-top: 1.5rem;
|
|
88
|
+
padding: clamp(1.375rem, 1rem + 2vw, 2.25rem);
|
|
89
|
+
border-radius: var(--radius-card);
|
|
90
|
+
background: var(--bg-band-background);
|
|
91
|
+
color: var(--bg-band-color);
|
|
92
|
+
}
|
|
93
|
+
:global(.bg-band-contrast) .checklist {
|
|
94
|
+
border: 1px solid var(--line);
|
|
95
|
+
background: color-mix(in srgb, var(--ink) 7%, transparent);
|
|
96
|
+
}
|
|
97
|
+
.checklist-steps {
|
|
98
|
+
display: grid;
|
|
99
|
+
gap: 1.375rem;
|
|
100
|
+
margin: 0;
|
|
101
|
+
padding: 0;
|
|
102
|
+
list-style: none;
|
|
103
|
+
}
|
|
104
|
+
.checklist-step {
|
|
105
|
+
display: grid;
|
|
106
|
+
grid-template-columns: 2.25rem minmax(0, 1fr);
|
|
107
|
+
gap: 1rem;
|
|
108
|
+
}
|
|
109
|
+
.checklist-tile {
|
|
110
|
+
display: grid;
|
|
111
|
+
place-items: center;
|
|
112
|
+
width: 2.25rem;
|
|
113
|
+
height: 2.25rem;
|
|
114
|
+
border: 1.5px solid var(--accent);
|
|
115
|
+
border-radius: 0.5rem;
|
|
116
|
+
background: color-mix(in srgb, var(--accent) 16%, transparent);
|
|
117
|
+
color: var(--accent);
|
|
118
|
+
font-family: var(--font-display);
|
|
119
|
+
font-size: 1.0625rem;
|
|
120
|
+
font-weight: 800;
|
|
121
|
+
line-height: 1;
|
|
122
|
+
}
|
|
123
|
+
.checklist-words {
|
|
124
|
+
min-width: 0;
|
|
125
|
+
padding-top: 0.25rem;
|
|
126
|
+
}
|
|
127
|
+
.checklist-words h3 {
|
|
128
|
+
margin: 0 0 0.25rem;
|
|
129
|
+
font-size: 1.1875rem;
|
|
130
|
+
font-weight: 700;
|
|
131
|
+
}
|
|
132
|
+
.checklist-words :global(.checklist-body) {
|
|
133
|
+
color: var(--muted);
|
|
134
|
+
font-size: 0.96875rem;
|
|
135
|
+
}
|
|
136
|
+
.checklist-words :global(.checklist-body) > :global(:last-child) {
|
|
137
|
+
margin-bottom: 0;
|
|
138
|
+
}
|
|
139
|
+
.checklist-includes {
|
|
140
|
+
display: grid;
|
|
141
|
+
gap: 0.375rem;
|
|
142
|
+
margin: 0.75rem 0 0;
|
|
143
|
+
padding: 0;
|
|
144
|
+
list-style: none;
|
|
145
|
+
font-size: var(--text-sm);
|
|
146
|
+
}
|
|
147
|
+
.checklist-includes li {
|
|
148
|
+
display: flex;
|
|
149
|
+
align-items: flex-start;
|
|
150
|
+
gap: 0.5rem;
|
|
151
|
+
line-height: 1.45;
|
|
152
|
+
}
|
|
153
|
+
.checklist-includes svg {
|
|
154
|
+
flex: 0 0 auto;
|
|
155
|
+
margin-top: 0.15em;
|
|
156
|
+
color: var(--accent);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/* The call: the lead's words and the one button, behind a rule. */
|
|
160
|
+
.checklist-call {
|
|
161
|
+
min-width: 0;
|
|
162
|
+
padding-top: 1.5rem;
|
|
163
|
+
border-top: 1px solid var(--line);
|
|
164
|
+
}
|
|
165
|
+
.checklist-call :global(.checklist-lead) {
|
|
166
|
+
color: var(--muted);
|
|
167
|
+
}
|
|
168
|
+
.checklist-call :global(.checklist-lead) > :global(p:first-child) {
|
|
169
|
+
margin-bottom: 0.625rem;
|
|
170
|
+
color: var(--ink);
|
|
171
|
+
font-family: var(--font-display);
|
|
172
|
+
font-size: var(--h3);
|
|
173
|
+
font-weight: 700;
|
|
174
|
+
line-height: 1.2;
|
|
175
|
+
letter-spacing: -0.015em;
|
|
176
|
+
text-wrap: balance;
|
|
177
|
+
}
|
|
178
|
+
.checklist-call :global(.checklist-lead) > :global(:last-child) {
|
|
179
|
+
margin-bottom: 0;
|
|
180
|
+
}
|
|
181
|
+
.checklist-button {
|
|
182
|
+
margin: 1.25rem 0 0;
|
|
183
|
+
}
|
|
184
|
+
.checklist-more {
|
|
185
|
+
display: flex;
|
|
186
|
+
flex-wrap: wrap;
|
|
187
|
+
gap: 0.5rem 1.25rem;
|
|
188
|
+
margin: 1rem 0 0;
|
|
189
|
+
font-size: var(--text-sm);
|
|
190
|
+
font-weight: 700;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
@media (min-width: 48rem) {
|
|
194
|
+
.checklist-with-call {
|
|
195
|
+
grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
|
|
196
|
+
gap: clamp(1.75rem, 3vw, 2.5rem);
|
|
197
|
+
}
|
|
198
|
+
.checklist-call {
|
|
199
|
+
padding: 0.25rem 0 0 clamp(1.5rem, 3vw, 2.5rem);
|
|
200
|
+
border-top: 0;
|
|
201
|
+
border-left: 1px solid var(--line);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
</style>
|