@backgold/template-kit 0.0.0-stage → 0.1.1
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-RJAVFRC6.js +67 -0
- package/dist/constants-BAIo_Q5U.d-lQbj1e1-.d.ts +48 -0
- package/dist/content-api-Cox1-wz5.d.ts +1096 -0
- package/dist/contract/content-api-examples.d.ts +72 -0
- package/dist/contract/content-api-examples.js +926 -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 +253 -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 +61 -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 +80 -0
- package/src/components/sections/About/index.astro +60 -0
- package/src/components/sections/About/left.astro +57 -0
- package/src/components/sections/About/letter.astro +111 -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 +126 -0
- package/src/components/sections/ContentPost/player.astro +254 -0
- package/src/components/sections/ContentPost/prose.astro +80 -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 +176 -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 +99 -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/Lookup.astro +43 -0
- package/src/components/sections/VoterTools/dates.astro +153 -0
- package/src/components/sections/VoterTools/index.astro +231 -0
- package/src/components/sections/VoterTools/polling.astro +144 -0
- package/src/components/sections/VoterTools/voter-tools.ts +71 -0
- package/src/components/sections/index.ts +373 -0
- package/src/components/sections/modules/Headed.astro +39 -0
- package/src/components/sections/modules/ModuleFrame.astro +181 -0
- package/src/components/store/CollectionPage.astro +40 -0
- package/src/components/store/ProductCard.astro +32 -0
- package/src/components/store/ProductGrid.astro +16 -0
- package/src/components/store/ProductPage.astro +146 -0
- package/src/components/store/StorePage.astro +137 -0
- package/src/components/store/StoreScript.astro +572 -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 +63 -0
- package/src/layouts/Site.astro +387 -0
- package/src/lib/academy.ts +146 -0
- package/src/lib/brand.ts +534 -0
- package/src/lib/chrome.ts +121 -0
- package/src/lib/donate-frame.ts +104 -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 +55 -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 +105 -0
- package/src/lib/shifts.ts +187 -0
- package/src/lib/store.ts +521 -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 +435 -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/styles/entries.css +784 -0
- package/src/styles/site.css +1910 -0
- package/src/styles/store.css +634 -0
- package/src/template.ts +182 -0
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Hero, 'overlap' layout (board A12, the Hero row's Overlap): the picture
|
|
3
|
+
// across the band's width, then the words on a card that overlaps the
|
|
4
|
+
// picture's lower edge, centred and inset from its sides (nearly full width
|
|
5
|
+
// on a phone). Without a picture the card sits centred on the band with no
|
|
6
|
+
// overlap. The card holds the kicker, the headline, the line under it and
|
|
7
|
+
// the buttons (the first is the main call, the rest outlines). The
|
|
8
|
+
// picture's alt text is `copy.imageAlt`, and its caption, when the section
|
|
9
|
+
// carries one (`copy.caption`), sits at the picture's lower left beside the
|
|
10
|
+
// card on a wide screen and at its upper left where the card covers that
|
|
11
|
+
// corner; with no picture there is no caption. The page-opening Hero's
|
|
12
|
+
// headline is the page's <h1> (`level={1}`); any other Hero's is an <h2>.
|
|
13
|
+
// A Hero with its signup form on carries an `embed`: BackGold's own form,
|
|
14
|
+
// framed under the buttons.
|
|
15
|
+
import type { ComponentProps } from 'astro/types'
|
|
16
|
+
import ModuleFrame from '../modules/ModuleFrame.astro'
|
|
17
|
+
import Band from '../Band.astro'
|
|
18
|
+
import type Default from './index.astro'
|
|
19
|
+
import { heroPhoto, links } from '../../../lib/section'
|
|
20
|
+
import { text } from '../../../lib/format'
|
|
21
|
+
|
|
22
|
+
type Props = ComponentProps<typeof Default>
|
|
23
|
+
|
|
24
|
+
const { section, level = 2 } = Astro.props
|
|
25
|
+
const Heading = level === 1 ? 'h1' : 'h2'
|
|
26
|
+
const kicker = text(section.copy.kicker)
|
|
27
|
+
const headline = text(section.copy.headline)
|
|
28
|
+
const subheadline = text(section.copy.subheadline)
|
|
29
|
+
const caption = text(section.copy.caption)
|
|
30
|
+
const picture = heroPhoto(section, 'imageUrl', 'photoUrl', 'videoPosterUrl')
|
|
31
|
+
const buttons = links(section)
|
|
32
|
+
---
|
|
33
|
+
<Band section={section} class:list={['hero-overlap', picture && 'hero-overlap-photo']}>
|
|
34
|
+
{picture && (
|
|
35
|
+
<figure class="overlap-frame">
|
|
36
|
+
<img
|
|
37
|
+
class="overlap-image"
|
|
38
|
+
src={picture.url}
|
|
39
|
+
alt={picture.alt}
|
|
40
|
+
loading={level === 1 ? 'eager' : 'lazy'}
|
|
41
|
+
fetchpriority={level === 1 ? 'high' : undefined}
|
|
42
|
+
decoding="async"
|
|
43
|
+
/>
|
|
44
|
+
{caption && <figcaption class="overlap-caption">{caption}</figcaption>}
|
|
45
|
+
</figure>
|
|
46
|
+
)}
|
|
47
|
+
<div class="overlap-panel">
|
|
48
|
+
{kicker && <p class="kicker">{kicker}</p>}
|
|
49
|
+
{headline && <Heading class="overlap-headline">{headline}</Heading>}
|
|
50
|
+
{subheadline && <p class="overlap-lede">{subheadline}</p>}
|
|
51
|
+
{buttons.length > 0 && (
|
|
52
|
+
<p class="actions">
|
|
53
|
+
{buttons.map((link, i) => <a class:list={['button', i > 0 && 'button-quiet']} href={link.href} rel={link.rel}>{link.label}</a>)}
|
|
54
|
+
</p>
|
|
55
|
+
)}
|
|
56
|
+
{section.embed && <ModuleFrame embed={section.embed} band={section.band} type="SignupCapture" layout="card" title="Sign up" height="24rem" class="hero-signup" />}
|
|
57
|
+
</div>
|
|
58
|
+
</Band>
|
|
59
|
+
|
|
60
|
+
<style>
|
|
61
|
+
/* How far the card rises over the picture: about a third of it on a wide screen. */
|
|
62
|
+
:global(.bg-section.hero-overlap) {
|
|
63
|
+
--overlap-rise: clamp(2.5rem, 0.75rem + 6vw, 7.5rem);
|
|
64
|
+
--overlap-inset: clamp(0.75rem, 0.25rem + 2.5vw, 2.5rem);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.overlap-frame {
|
|
68
|
+
position: relative;
|
|
69
|
+
margin: 0;
|
|
70
|
+
}
|
|
71
|
+
.overlap-image {
|
|
72
|
+
display: block;
|
|
73
|
+
width: 100%;
|
|
74
|
+
aspect-ratio: 4 / 3;
|
|
75
|
+
object-fit: cover;
|
|
76
|
+
border-radius: var(--radius-card);
|
|
77
|
+
}
|
|
78
|
+
.overlap-caption {
|
|
79
|
+
margin: 0;
|
|
80
|
+
font-size: 0.6875rem;
|
|
81
|
+
line-height: 1.4;
|
|
82
|
+
}
|
|
83
|
+
/* On the picture, a small chip in the photo band's inks; where the card covers the lower left, at the upper left. */
|
|
84
|
+
.overlap-frame .overlap-caption {
|
|
85
|
+
position: absolute;
|
|
86
|
+
left: 0.75rem;
|
|
87
|
+
top: 0.625rem;
|
|
88
|
+
max-width: calc(100% - 1.5rem);
|
|
89
|
+
padding: 0.1875rem 0.5rem;
|
|
90
|
+
border-radius: 0.25rem;
|
|
91
|
+
background: color-mix(in srgb, var(--band-photo) 70%, transparent);
|
|
92
|
+
color: var(--band-photo-ink);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.overlap-panel {
|
|
96
|
+
position: relative;
|
|
97
|
+
max-width: 40rem;
|
|
98
|
+
margin: 0 auto;
|
|
99
|
+
padding: clamp(1.5rem, 1rem + 2vw, 2.75rem);
|
|
100
|
+
border: 1px solid var(--line);
|
|
101
|
+
border-radius: var(--radius-card);
|
|
102
|
+
background: var(--surface);
|
|
103
|
+
box-shadow: var(--shadow);
|
|
104
|
+
}
|
|
105
|
+
.overlap-frame + .overlap-panel {
|
|
106
|
+
margin: calc(-1 * var(--overlap-rise)) var(--overlap-inset) 0;
|
|
107
|
+
}
|
|
108
|
+
.overlap-panel .kicker {
|
|
109
|
+
margin: 0 0 0.75rem;
|
|
110
|
+
}
|
|
111
|
+
.overlap-headline {
|
|
112
|
+
font-size: clamp(2.125rem, 1.5rem + 2.2vw, 3.375rem);
|
|
113
|
+
font-weight: 800;
|
|
114
|
+
line-height: 1.04;
|
|
115
|
+
letter-spacing: -0.02em;
|
|
116
|
+
margin: 0;
|
|
117
|
+
}
|
|
118
|
+
.overlap-lede {
|
|
119
|
+
font-size: var(--text-lg);
|
|
120
|
+
color: var(--muted);
|
|
121
|
+
margin: 1.125rem 0 0;
|
|
122
|
+
}
|
|
123
|
+
.overlap-panel .actions {
|
|
124
|
+
margin: 1.625rem 0 0;
|
|
125
|
+
}
|
|
126
|
+
.overlap-panel > :global(.hero-signup) {
|
|
127
|
+
margin-top: 1.5rem;
|
|
128
|
+
}
|
|
129
|
+
.overlap-panel > :last-child {
|
|
130
|
+
margin-bottom: 0;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
@media (min-width: 48rem) {
|
|
134
|
+
.overlap-image {
|
|
135
|
+
aspect-ratio: 16 / 9;
|
|
136
|
+
}
|
|
137
|
+
/* Centred under the picture, as the board's mini insets it evenly from both sides. */
|
|
138
|
+
.overlap-frame + .overlap-panel {
|
|
139
|
+
margin-inline: auto;
|
|
140
|
+
width: calc(100% - 2 * var(--overlap-inset));
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
/* Wide enough that the card leaves the picture's lower left free: the caption goes back there. */
|
|
144
|
+
@media (min-width: 72rem) {
|
|
145
|
+
.overlap-frame .overlap-caption {
|
|
146
|
+
top: auto;
|
|
147
|
+
bottom: 0.625rem;
|
|
148
|
+
max-width: calc((100% - 40rem) / 2 - 1.5rem);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
</style>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Hero, 'rotating' layout (REPORT §3 Hero, "Rotating issues"): the cover,
|
|
3
|
+
// its headline's last word giving way to each of the Hero's own `words`
|
|
4
|
+
// ("Lower taxes.", "Open books.") in turn, every 3 s with a short fade.
|
|
5
|
+
// The words are the Hero's authored rows (titles, blank ones dropped, at most
|
|
6
|
+
// eight), never a sibling Issues section's. video.astro draws it (the cover
|
|
7
|
+
// with one thing moving): the first word is in the HTML, so without script
|
|
8
|
+
// the page shows it; under reduced motion it stays; a corner button pauses
|
|
9
|
+
// it; the <h1>'s accessible name is the headline with the first word, its
|
|
10
|
+
// turning word hidden from assistive technology. Without words, or without a
|
|
11
|
+
// headline for them to finish, it is the cover as typed.
|
|
12
|
+
import type { ComponentProps } from 'astro/types'
|
|
13
|
+
import Cover from './cover.astro'
|
|
14
|
+
import Video from './video.astro'
|
|
15
|
+
import type Default from './index.astro'
|
|
16
|
+
import { rows } from '../../../lib/section'
|
|
17
|
+
import { text } from '../../../lib/format'
|
|
18
|
+
|
|
19
|
+
type Props = ComponentProps<typeof Default>
|
|
20
|
+
|
|
21
|
+
const MAX_WORDS = 8
|
|
22
|
+
|
|
23
|
+
const { section } = Astro.props
|
|
24
|
+
const words = rows(section)
|
|
25
|
+
.map((row) => text(row.title)?.trim())
|
|
26
|
+
.filter((word): word is string => !!word)
|
|
27
|
+
.slice(0, MAX_WORDS)
|
|
28
|
+
const headline = text(section.copy.headline)
|
|
29
|
+
---
|
|
30
|
+
{headline && words.length > 0 ? <Video {...Astro.props} words={words} /> : <Cover {...Astro.props} />}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Hero, 'split' layout (board A2-about-platform, section 1): the headline,
|
|
3
|
+
// the line under it and the buttons on the left, the photo on the right;
|
|
4
|
+
// on a phone the photo follows the words, its alt text `copy.imageAlt` and
|
|
5
|
+
// its caption (`copy.caption`) a chip at its lower left. Without a photo the
|
|
6
|
+
// words take the full width, with no caption. The page-opening Hero's headline is the page's <h1>
|
|
7
|
+
// (`level={1}`); any other Hero's is an <h2>. A Hero with its signup form on
|
|
8
|
+
// carries an `embed`: BackGold's own form, framed under the buttons. The
|
|
9
|
+
// photo crops to fill its frame; with the photo treatment 'badge' or 'plain'
|
|
10
|
+
// (a logo, an illustration) it shows whole in it (lib/section.ts photoStyleOf).
|
|
11
|
+
import type { ComponentProps } from 'astro/types'
|
|
12
|
+
import ModuleFrame from '../modules/ModuleFrame.astro'
|
|
13
|
+
import Band from '../Band.astro'
|
|
14
|
+
import type Default from './index.astro'
|
|
15
|
+
import { heroPhoto, links, photoStyleOf } from '../../../lib/section'
|
|
16
|
+
import { text } from '../../../lib/format'
|
|
17
|
+
|
|
18
|
+
type Props = ComponentProps<typeof Default>
|
|
19
|
+
|
|
20
|
+
const { section, level = 2 } = Astro.props
|
|
21
|
+
const Heading = level === 1 ? 'h1' : 'h2'
|
|
22
|
+
const headline = text(section.copy.headline)
|
|
23
|
+
const subheadline = text(section.copy.subheadline)
|
|
24
|
+
const caption = text(section.copy.caption)
|
|
25
|
+
const picture = heroPhoto(section, 'imageUrl', 'photoUrl', 'videoPosterUrl')
|
|
26
|
+
const style = photoStyleOf(section)
|
|
27
|
+
const buttons = links(section)
|
|
28
|
+
---
|
|
29
|
+
<Band section={section} class="hero-split-layout">
|
|
30
|
+
<div class:list={['split', picture && 'split-with-photo']}>
|
|
31
|
+
<div class="split-words">
|
|
32
|
+
{headline && <Heading class="split-headline">{headline}</Heading>}
|
|
33
|
+
{subheadline && <p class="split-lede">{subheadline}</p>}
|
|
34
|
+
{buttons.length > 0 && (
|
|
35
|
+
<p class="actions">
|
|
36
|
+
{buttons.map((link, i) => <a class:list={['button', i > 0 && 'button-quiet']} href={link.href} rel={link.rel}>{link.label}</a>)}
|
|
37
|
+
</p>
|
|
38
|
+
)}
|
|
39
|
+
{section.embed && <ModuleFrame embed={section.embed} band={section.band} type="SignupCapture" layout="card" title="Sign up" height="24rem" class="hero-signup" />}
|
|
40
|
+
</div>
|
|
41
|
+
{picture && (
|
|
42
|
+
<div class="split-photo">
|
|
43
|
+
<img
|
|
44
|
+
class:list={['split-image', style !== 'photo' && `photo-${style}`]}
|
|
45
|
+
src={picture.url}
|
|
46
|
+
alt={picture.alt}
|
|
47
|
+
loading={level === 1 ? 'eager' : 'lazy'}
|
|
48
|
+
fetchpriority={level === 1 ? 'high' : undefined}
|
|
49
|
+
decoding="async"
|
|
50
|
+
/>
|
|
51
|
+
{caption && <p class="photo-caption">{caption}</p>}
|
|
52
|
+
</div>
|
|
53
|
+
)}
|
|
54
|
+
</div>
|
|
55
|
+
</Band>
|
|
56
|
+
|
|
57
|
+
<style>
|
|
58
|
+
.split {
|
|
59
|
+
display: grid;
|
|
60
|
+
gap: 2rem;
|
|
61
|
+
}
|
|
62
|
+
.split-headline {
|
|
63
|
+
font-size: clamp(2.5rem, 1.7rem + 2.6vw, 3.75rem);
|
|
64
|
+
font-weight: 800;
|
|
65
|
+
line-height: 1.02;
|
|
66
|
+
max-width: 16em;
|
|
67
|
+
margin: 0;
|
|
68
|
+
}
|
|
69
|
+
.split-lede {
|
|
70
|
+
font-size: var(--text-lg);
|
|
71
|
+
color: var(--muted);
|
|
72
|
+
max-width: 34em;
|
|
73
|
+
margin: 1.25rem 0 0;
|
|
74
|
+
}
|
|
75
|
+
.split-words .actions {
|
|
76
|
+
margin-top: 1.75rem;
|
|
77
|
+
}
|
|
78
|
+
.split-words > :global(.hero-signup) {
|
|
79
|
+
margin-top: 1.5rem;
|
|
80
|
+
}
|
|
81
|
+
.split-photo {
|
|
82
|
+
position: relative;
|
|
83
|
+
min-width: 0;
|
|
84
|
+
}
|
|
85
|
+
.split-image {
|
|
86
|
+
display: block;
|
|
87
|
+
width: 100%;
|
|
88
|
+
aspect-ratio: 4 / 4.3;
|
|
89
|
+
object-fit: cover;
|
|
90
|
+
border-radius: calc(var(--radius) * 2);
|
|
91
|
+
}
|
|
92
|
+
@media (min-width: 48rem) {
|
|
93
|
+
.split-with-photo {
|
|
94
|
+
grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
|
|
95
|
+
gap: clamp(2.5rem, 4vw, 3.5rem);
|
|
96
|
+
align-items: center;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
</style>
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Hero, 'statement' layout (boards A3-leadership and A11-contact, section 1):
|
|
3
|
+
// the kicker, one wide headline and the line under it, with no photo, for a
|
|
4
|
+
// page that opens on words. A button or a signup form the Hero carries follows the
|
|
5
|
+
// line. The page-opening Hero's headline is the page's <h1> (`level={1}`);
|
|
6
|
+
// any other Hero's is an <h2>. The signup form is BackGold's own (`embed`).
|
|
7
|
+
import type { ComponentProps } from 'astro/types'
|
|
8
|
+
import ModuleFrame from '../modules/ModuleFrame.astro'
|
|
9
|
+
import Band from '../Band.astro'
|
|
10
|
+
import type Default from './index.astro'
|
|
11
|
+
import { links } from '../../../lib/section'
|
|
12
|
+
import { text } from '../../../lib/format'
|
|
13
|
+
|
|
14
|
+
type Props = ComponentProps<typeof Default>
|
|
15
|
+
|
|
16
|
+
const { section, level = 2 } = Astro.props
|
|
17
|
+
const Heading = level === 1 ? 'h1' : 'h2'
|
|
18
|
+
const kicker = text(section.copy.kicker)
|
|
19
|
+
const headline = text(section.copy.headline)
|
|
20
|
+
const subheadline = text(section.copy.subheadline)
|
|
21
|
+
const buttons = links(section)
|
|
22
|
+
---
|
|
23
|
+
<Band section={section} class="hero-statement">
|
|
24
|
+
<div class="statement">
|
|
25
|
+
{kicker && <p class="kicker">{kicker}</p>}
|
|
26
|
+
{headline && <Heading class="statement-headline">{headline}</Heading>}
|
|
27
|
+
{subheadline && <p class="statement-lede">{subheadline}</p>}
|
|
28
|
+
{buttons.length > 0 && (
|
|
29
|
+
<p class="actions">
|
|
30
|
+
{buttons.map((link, i) => <a class:list={['button', i > 0 && 'button-quiet']} href={link.href} rel={link.rel}>{link.label}</a>)}
|
|
31
|
+
</p>
|
|
32
|
+
)}
|
|
33
|
+
{section.embed && <ModuleFrame embed={section.embed} band={section.band} type="SignupCapture" layout="card" title="Sign up" height="24rem" class="hero-signup" />}
|
|
34
|
+
</div>
|
|
35
|
+
</Band>
|
|
36
|
+
|
|
37
|
+
<style>
|
|
38
|
+
.statement-headline {
|
|
39
|
+
font-size: clamp(2.5rem, 1.6rem + 3vw, 4rem);
|
|
40
|
+
font-weight: 800;
|
|
41
|
+
line-height: 1;
|
|
42
|
+
max-width: 14em;
|
|
43
|
+
margin: 0;
|
|
44
|
+
}
|
|
45
|
+
.statement-lede {
|
|
46
|
+
font-size: var(--text-lg);
|
|
47
|
+
color: var(--muted);
|
|
48
|
+
max-width: 40em;
|
|
49
|
+
margin: 1.25rem 0 0;
|
|
50
|
+
}
|
|
51
|
+
.statement > :global(.hero-signup) {
|
|
52
|
+
margin-top: 1.5rem;
|
|
53
|
+
max-width: 40rem;
|
|
54
|
+
}
|
|
55
|
+
</style>
|