@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,167 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Scorecard, 'promise' layout (board 04, "Record vs. promise"): the section
|
|
3
|
+
// head and the body, then two panels side by side (the first over the second
|
|
4
|
+
// on a phone). The first, on the band's surface, is what they said: its label
|
|
5
|
+
// small in capitals, the promise as a large quotation in the display face
|
|
6
|
+
// (curly quotes added, any typed around it dropped) and where it was said,
|
|
7
|
+
// muted. The second, filled in the band's second button colour, is what they
|
|
8
|
+
// did: its label, the headline large, the line under it, and the bills of
|
|
9
|
+
// the section's votes as a list of links to their roll calls (a bill with no
|
|
10
|
+
// address in plain text). A panel with none of its words is left out and the
|
|
11
|
+
// other spans the row. The source note sits small under both. Nothing is
|
|
12
|
+
// drawn without a promise or a headline.
|
|
13
|
+
import type { ComponentProps } from 'astro/types'
|
|
14
|
+
import type Default from './index.astro'
|
|
15
|
+
import Band from '../Band.astro'
|
|
16
|
+
import SectionHead from '../SectionHead.astro'
|
|
17
|
+
import Prose from '../../Prose.astro'
|
|
18
|
+
import { text } from '../../../lib/format'
|
|
19
|
+
import { votesOf } from './votes'
|
|
20
|
+
|
|
21
|
+
type Props = ComponentProps<typeof Default>
|
|
22
|
+
|
|
23
|
+
const { section } = Astro.props
|
|
24
|
+
const copy = section.copy
|
|
25
|
+
const kicker = text(copy.kicker)
|
|
26
|
+
const heading = text(copy.heading)
|
|
27
|
+
const promiseLabel = text(copy.promiseLabel)
|
|
28
|
+
const promise = text(copy.promise)?.trim().replace(/^["“”']+|["“”']+$/g, '').trim() || null
|
|
29
|
+
const promiseSource = text(copy.promiseSource)
|
|
30
|
+
const didLabel = text(copy.didLabel)
|
|
31
|
+
const did = text(copy.did)
|
|
32
|
+
const didDetail = text(copy.didDetail)
|
|
33
|
+
const sourceNote = text(copy.sourceNote)
|
|
34
|
+
const bills = votesOf(section)
|
|
35
|
+
const said = promise !== null
|
|
36
|
+
const done = did !== null || didDetail !== null
|
|
37
|
+
---
|
|
38
|
+
{(promise || did) && (
|
|
39
|
+
<Band section={section} class="scorecard scorecard-promise">
|
|
40
|
+
<SectionHead kicker={kicker} heading={heading} more={[]} />
|
|
41
|
+
<Prose value={copy.body} class="lede" />
|
|
42
|
+
<div class="record">
|
|
43
|
+
{said && (
|
|
44
|
+
<div class="record-panel record-said">
|
|
45
|
+
{promiseLabel && <h3 class="record-label">{promiseLabel}</h3>}
|
|
46
|
+
<figure class="record-quote">
|
|
47
|
+
<blockquote><p>“{promise}”</p></blockquote>
|
|
48
|
+
{promiseSource && <figcaption>{promiseSource}</figcaption>}
|
|
49
|
+
</figure>
|
|
50
|
+
</div>
|
|
51
|
+
)}
|
|
52
|
+
{done && (
|
|
53
|
+
<div class="record-panel record-did">
|
|
54
|
+
<div>
|
|
55
|
+
{didLabel && <h3 class="record-label">{didLabel}</h3>}
|
|
56
|
+
{did && <p class="record-headline">{did}</p>}
|
|
57
|
+
{didDetail && <p class="record-detail">{didDetail}</p>}
|
|
58
|
+
</div>
|
|
59
|
+
{bills.length > 0 && (
|
|
60
|
+
<p class="record-bills">
|
|
61
|
+
{bills.map((b, i) => (
|
|
62
|
+
<>
|
|
63
|
+
{i > 0 && ', '}
|
|
64
|
+
{b.link ? <a href={b.link.href} rel={b.link.rel}>{b.bill}</a> : b.bill}
|
|
65
|
+
</>
|
|
66
|
+
))}
|
|
67
|
+
</p>
|
|
68
|
+
)}
|
|
69
|
+
</div>
|
|
70
|
+
)}
|
|
71
|
+
</div>
|
|
72
|
+
{sourceNote && <p class="fine record-source">{sourceNote}</p>}
|
|
73
|
+
</Band>
|
|
74
|
+
)}
|
|
75
|
+
|
|
76
|
+
<style>
|
|
77
|
+
.record {
|
|
78
|
+
display: grid;
|
|
79
|
+
gap: 1rem;
|
|
80
|
+
}
|
|
81
|
+
.record-panel {
|
|
82
|
+
display: flex;
|
|
83
|
+
flex-direction: column;
|
|
84
|
+
min-width: 0;
|
|
85
|
+
padding: clamp(1.375rem, 1rem + 1.5vw, 2.25rem);
|
|
86
|
+
border-radius: var(--radius-card);
|
|
87
|
+
}
|
|
88
|
+
.record-panel > * {
|
|
89
|
+
margin: 0;
|
|
90
|
+
}
|
|
91
|
+
.record-said {
|
|
92
|
+
border: 1px solid var(--line);
|
|
93
|
+
background: var(--surface);
|
|
94
|
+
}
|
|
95
|
+
.record-did {
|
|
96
|
+
justify-content: space-between;
|
|
97
|
+
gap: 1.5rem;
|
|
98
|
+
border: 1px solid var(--button-2);
|
|
99
|
+
background: var(--button-2);
|
|
100
|
+
color: var(--button-2-ink);
|
|
101
|
+
}
|
|
102
|
+
.record-panel .record-label {
|
|
103
|
+
margin-bottom: 0.875rem;
|
|
104
|
+
color: var(--muted);
|
|
105
|
+
font-family: var(--font);
|
|
106
|
+
font-size: var(--text-xs);
|
|
107
|
+
font-weight: 700;
|
|
108
|
+
letter-spacing: 0.16em;
|
|
109
|
+
line-height: 1.4;
|
|
110
|
+
text-transform: uppercase;
|
|
111
|
+
}
|
|
112
|
+
.record-did .record-label {
|
|
113
|
+
color: color-mix(in srgb, var(--button-2-ink) 78%, transparent);
|
|
114
|
+
}
|
|
115
|
+
.record-quote blockquote {
|
|
116
|
+
margin: 0;
|
|
117
|
+
}
|
|
118
|
+
.record-quote blockquote p,
|
|
119
|
+
.record-headline {
|
|
120
|
+
margin: 0;
|
|
121
|
+
font-family: var(--font-display);
|
|
122
|
+
font-size: clamp(1.5rem, 1.15rem + 1.3vw, 2.125rem);
|
|
123
|
+
font-weight: 700;
|
|
124
|
+
line-height: 1.18;
|
|
125
|
+
letter-spacing: -0.015em;
|
|
126
|
+
text-wrap: balance;
|
|
127
|
+
}
|
|
128
|
+
.record-quote blockquote p {
|
|
129
|
+
text-indent: -0.42em;
|
|
130
|
+
}
|
|
131
|
+
.record-quote figcaption {
|
|
132
|
+
margin-top: 1rem;
|
|
133
|
+
color: var(--muted);
|
|
134
|
+
font-size: var(--text-sm);
|
|
135
|
+
}
|
|
136
|
+
.record-did .record-detail {
|
|
137
|
+
margin: 0.875rem 0 0;
|
|
138
|
+
color: color-mix(in srgb, var(--button-2-ink) 88%, transparent);
|
|
139
|
+
}
|
|
140
|
+
.record-bills {
|
|
141
|
+
margin: 0;
|
|
142
|
+
padding-top: 1rem;
|
|
143
|
+
border-top: 1px solid color-mix(in srgb, var(--button-2-ink) 25%, transparent);
|
|
144
|
+
font-size: var(--text-sm);
|
|
145
|
+
font-weight: 600;
|
|
146
|
+
}
|
|
147
|
+
.record-bills a {
|
|
148
|
+
color: var(--button-2-ink);
|
|
149
|
+
text-decoration-color: color-mix(in srgb, var(--button-2-ink) 55%, transparent);
|
|
150
|
+
}
|
|
151
|
+
.record-bills a:hover {
|
|
152
|
+
text-decoration-color: currentColor;
|
|
153
|
+
}
|
|
154
|
+
.record-did :focus-visible {
|
|
155
|
+
outline-color: var(--button-2-ink);
|
|
156
|
+
}
|
|
157
|
+
.record-source {
|
|
158
|
+
margin: 0.875rem 0 0;
|
|
159
|
+
}
|
|
160
|
+
@media (min-width: 48rem) {
|
|
161
|
+
.record {
|
|
162
|
+
grid-auto-flow: column;
|
|
163
|
+
grid-auto-columns: minmax(0, 1fr);
|
|
164
|
+
gap: 1.25rem;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
</style>
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
// A Scorecard's rows as its layouts draw them. One authored list (`votes`)
|
|
2
|
+
// carries two kinds of row, and each layout reads its own:
|
|
3
|
+
//
|
|
4
|
+
// - a vote: `bill`, `issue`, `vote` ('yea' | 'nay' | 'absent'), `position`
|
|
5
|
+
// ('agrees' | 'disagrees': whether the vote agrees with the party's
|
|
6
|
+
// position), `date` (YYYY-MM-DD) and `href` (the roll call). The Table
|
|
7
|
+
// layout draws these, the Record vs. promise layout lists their bills.
|
|
8
|
+
// - a person: `name`, `office`, `grade` (a letter), `score` (0 to 100) and
|
|
9
|
+
// `imageUrl`. The Grades layout draws these.
|
|
10
|
+
//
|
|
11
|
+
// A row without a bill is not a vote and one without a name is not a person;
|
|
12
|
+
// a value outside its list ('maybe' for a vote) is left out rather than shown.
|
|
13
|
+
|
|
14
|
+
import type { Section } from '@backgold/content'
|
|
15
|
+
import { safeSrc } from '@backgold/astro/server'
|
|
16
|
+
import { linkOf, rows, type Link } from '../../../lib/section'
|
|
17
|
+
import { formatShortDay, text } from '../../../lib/format'
|
|
18
|
+
|
|
19
|
+
const VOTES = { yea: 'Yea', nay: 'Nay', absent: 'Absent' } as const
|
|
20
|
+
const POSITIONS = ['agrees', 'disagrees'] as const
|
|
21
|
+
|
|
22
|
+
export interface Vote {
|
|
23
|
+
bill: string
|
|
24
|
+
/** The roll call, when the row has a safe address for it. */
|
|
25
|
+
link: Link | null
|
|
26
|
+
issue: string | null
|
|
27
|
+
/** "Yea", "Nay" or "Absent". */
|
|
28
|
+
vote: string | null
|
|
29
|
+
position: (typeof POSITIONS)[number] | null
|
|
30
|
+
/** The day as written (YYYY-MM-DD), for `<time datetime>`. */
|
|
31
|
+
date: string | null
|
|
32
|
+
/** "Sep 10", or "Sep 10, 2024" when the votes span more than one year. */
|
|
33
|
+
day: string | null
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface Graded {
|
|
37
|
+
name: string
|
|
38
|
+
office: string | null
|
|
39
|
+
grade: string | null
|
|
40
|
+
/** The score rounded to a whole number, when it is a number from 0 to 100. */
|
|
41
|
+
score: number | null
|
|
42
|
+
photo: string | null
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const YEAR = /^(\d{4})-\d{2}-\d{2}/
|
|
46
|
+
|
|
47
|
+
/** The section's votes in row order: the rows that name a bill. */
|
|
48
|
+
export function votesOf(section: Section): Vote[] {
|
|
49
|
+
const found = rows(section).flatMap((row) => {
|
|
50
|
+
const bill = text(row.bill)
|
|
51
|
+
if (!bill) return []
|
|
52
|
+
const vote = text(row.vote)?.trim().toLowerCase()
|
|
53
|
+
const position = text(row.position)?.trim().toLowerCase()
|
|
54
|
+
const date = text(row.date)?.trim() ?? null
|
|
55
|
+
return [
|
|
56
|
+
{
|
|
57
|
+
bill,
|
|
58
|
+
link: linkOf(bill, row.href),
|
|
59
|
+
issue: text(row.issue),
|
|
60
|
+
vote: vote && vote in VOTES ? VOTES[vote as keyof typeof VOTES] : null,
|
|
61
|
+
position: POSITIONS.find((p) => p === position) ?? null,
|
|
62
|
+
date: date && formatShortDay(date) ? date : null,
|
|
63
|
+
day: null as string | null,
|
|
64
|
+
},
|
|
65
|
+
]
|
|
66
|
+
})
|
|
67
|
+
const years = new Set(found.map((v) => (v.date ? YEAR.exec(v.date)?.[1] : null)).filter(Boolean))
|
|
68
|
+
for (const v of found) {
|
|
69
|
+
const short = formatShortDay(v.date)
|
|
70
|
+
v.day = short && years.size > 1 ? `${short}, ${YEAR.exec(v.date!)![1]}` : short
|
|
71
|
+
}
|
|
72
|
+
return found
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/** The section's graded people in row order: the rows that name someone. */
|
|
76
|
+
export function gradedOf(section: Section): Graded[] {
|
|
77
|
+
return rows(section).flatMap((row) => {
|
|
78
|
+
const name = text(row.name)
|
|
79
|
+
if (!name) return []
|
|
80
|
+
const score = typeof row.score === 'number' && Number.isFinite(row.score) && row.score >= 0 && row.score <= 100 ? Math.round(row.score) : null
|
|
81
|
+
return [{ name, office: text(row.office), grade: text(row.grade)?.trim() ?? null, score, photo: safeSrc(row.imageUrl) }]
|
|
82
|
+
})
|
|
83
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
// A section's head as board A1 draws it over Key issues, Upcoming events,
|
|
3
|
+
// the news and the candidate roster: the kicker over the heading at the
|
|
4
|
+
// left and the section's "more" links ("The whole platform", "All events")
|
|
5
|
+
// at the right, underlined, on the heading's baseline. On a phone the links
|
|
6
|
+
// wrap under the heading. Draws nothing when there is nothing to show.
|
|
7
|
+
import type { Link } from '../../lib/section'
|
|
8
|
+
|
|
9
|
+
interface Props {
|
|
10
|
+
kicker: string | null
|
|
11
|
+
heading: string | null
|
|
12
|
+
more: Link[]
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const { kicker, heading, more } = Astro.props
|
|
16
|
+
---
|
|
17
|
+
{(kicker || heading || more.length > 0) && (
|
|
18
|
+
<div class="section-head">
|
|
19
|
+
{(kicker || heading) && (
|
|
20
|
+
<div>
|
|
21
|
+
{kicker && <p class="kicker">{kicker}</p>}
|
|
22
|
+
{heading && <h2>{heading}</h2>}
|
|
23
|
+
</div>
|
|
24
|
+
)}
|
|
25
|
+
{more.length > 0 && (
|
|
26
|
+
<p class="section-head-more">
|
|
27
|
+
{more.map((link) => <a href={link.href} rel={link.rel}>{link.label}</a>)}
|
|
28
|
+
</p>
|
|
29
|
+
)}
|
|
30
|
+
</div>
|
|
31
|
+
)}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
// A service's button as every layout draws it: the row's words to the row's
|
|
3
|
+
// address, solid or outlined as the layout says. When the section offers more
|
|
4
|
+
// than one service the service's name follows the words for a screen reader
|
|
5
|
+
// ("Talk to us: Full campaign"), since two buttons may read the same.
|
|
6
|
+
import type { Service } from './services'
|
|
7
|
+
|
|
8
|
+
interface Props {
|
|
9
|
+
service: Service
|
|
10
|
+
solid: boolean
|
|
11
|
+
/** Whether other services sit beside this one. */
|
|
12
|
+
many: boolean
|
|
13
|
+
class?: string
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const { service, solid, many, class: className } = Astro.props
|
|
17
|
+
const link = service.link
|
|
18
|
+
---
|
|
19
|
+
{link && (
|
|
20
|
+
<a class:list={['button', !solid && 'button-quiet', className]} href={link.href} rel={link.rel}>
|
|
21
|
+
{link.label}
|
|
22
|
+
{many && <span class="visually-hidden">: {service.name}</span>}
|
|
23
|
+
</a>
|
|
24
|
+
)}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
// The check mark beside an included line and in the Compare table's cells:
|
|
3
|
+
// drawn, never read (what it means is said in words beside it).
|
|
4
|
+
---
|
|
5
|
+
<svg class="sv-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>
|
|
6
|
+
|
|
7
|
+
<style>
|
|
8
|
+
.sv-check {
|
|
9
|
+
flex: 0 0 auto;
|
|
10
|
+
color: var(--sv-check, var(--accent));
|
|
11
|
+
}
|
|
12
|
+
</style>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
// What a service includes as a checked list: a check mark in the accent (or
|
|
3
|
+
// `--sv-check`, set by a layout on a filled ground) beside each line, in the
|
|
4
|
+
// row's order. Draws nothing without one.
|
|
5
|
+
import Check from './Check.astro'
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
items: string[]
|
|
9
|
+
class?: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const { items, class: className } = Astro.props
|
|
13
|
+
---
|
|
14
|
+
{items.length > 0 && (
|
|
15
|
+
<ul class:list={['sv-includes', className]} role="list">
|
|
16
|
+
{items.map((line) => (
|
|
17
|
+
<li>
|
|
18
|
+
<Check />
|
|
19
|
+
<span>{line}</span>
|
|
20
|
+
</li>
|
|
21
|
+
))}
|
|
22
|
+
</ul>
|
|
23
|
+
)}
|
|
24
|
+
|
|
25
|
+
<style>
|
|
26
|
+
.sv-includes {
|
|
27
|
+
display: grid;
|
|
28
|
+
gap: 0.5rem;
|
|
29
|
+
margin: 0;
|
|
30
|
+
padding: 0;
|
|
31
|
+
list-style: none;
|
|
32
|
+
}
|
|
33
|
+
.sv-includes li {
|
|
34
|
+
display: flex;
|
|
35
|
+
align-items: flex-start;
|
|
36
|
+
gap: 0.625rem;
|
|
37
|
+
line-height: 1.45;
|
|
38
|
+
}
|
|
39
|
+
.sv-includes li :global(.sv-check) {
|
|
40
|
+
margin-top: 0.2em;
|
|
41
|
+
}
|
|
42
|
+
</style>
|
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Services, 'compare' layout (board S04, C, the compare table; the board's
|
|
3
|
+
// process strip is the Issues section's steps layout): the section head and
|
|
4
|
+
// the body, then a table on the band's surface with a column per service in
|
|
5
|
+
// the operator's order (its name, the copy's featured label as a chip on the
|
|
6
|
+
// featured service when the operator wrote one, its price as typed and its
|
|
7
|
+
// term in the header) and a row per line any service includes, in the order
|
|
8
|
+
// the lines first appear. A cell where the service lists the line holds a
|
|
9
|
+
// check and says "Included" to a screen reader; any other holds a muted dash
|
|
10
|
+
// and says "Not included". The services' buttons sit along the foot of the
|
|
11
|
+
// table, each under its own column: the featured service's solid, the others
|
|
12
|
+
// outlined. On a phone the table scrolls sideways inside its own bordered
|
|
13
|
+
// box, the lines' column held at the left edge.
|
|
14
|
+
//
|
|
15
|
+
// With one service there is nothing to compare: it is drawn as a card, its
|
|
16
|
+
// name, price and term over what it includes as a plain checked list, and
|
|
17
|
+
// its button. Several services that include nothing draw as the list layout.
|
|
18
|
+
// The note sits small under either. Nothing is drawn with neither a heading
|
|
19
|
+
// nor a service.
|
|
20
|
+
import type { ComponentProps } from 'astro/types'
|
|
21
|
+
import type Default from './index.astro'
|
|
22
|
+
import Band from '../Band.astro'
|
|
23
|
+
import SectionHead from '../SectionHead.astro'
|
|
24
|
+
import Prose from '../../Prose.astro'
|
|
25
|
+
import Button from './Button.astro'
|
|
26
|
+
import Check from './Check.astro'
|
|
27
|
+
import Includes from './Includes.astro'
|
|
28
|
+
import List from './list.astro'
|
|
29
|
+
import { everyInclude, servicesOf } from './services'
|
|
30
|
+
import { text } from '../../../lib/format'
|
|
31
|
+
|
|
32
|
+
type Props = ComponentProps<typeof Default>
|
|
33
|
+
|
|
34
|
+
const { section } = Astro.props
|
|
35
|
+
const kicker = text(section.copy.kicker)
|
|
36
|
+
const heading = text(section.copy.heading)
|
|
37
|
+
const s = servicesOf(section)
|
|
38
|
+
const lines = everyInclude(s.items)
|
|
39
|
+
const many = s.items.length > 1
|
|
40
|
+
const asList = many && lines.length === 0
|
|
41
|
+
const buttons = s.items.some((service) => service.link)
|
|
42
|
+
const regionId = `${section.id}-services-compare`.replace(/[^A-Za-z0-9_-]/g, '-')
|
|
43
|
+
const [only] = s.items
|
|
44
|
+
---
|
|
45
|
+
{asList ? (
|
|
46
|
+
<List {...Astro.props} />
|
|
47
|
+
) : (heading || only) && (
|
|
48
|
+
<Band section={section} class="services services-compare">
|
|
49
|
+
<SectionHead kicker={kicker} heading={heading} more={[]} />
|
|
50
|
+
<Prose value={section.copy.body} class="lede" />
|
|
51
|
+
{many ? (
|
|
52
|
+
<div class="sv-frame" role="region" aria-labelledby={regionId} tabindex="0">
|
|
53
|
+
<table class="sv-table" style={`--sv-services: ${s.items.length}`}>
|
|
54
|
+
<caption class="visually-hidden" id={regionId}>{heading ?? 'Services compared'}</caption>
|
|
55
|
+
<thead>
|
|
56
|
+
<tr>
|
|
57
|
+
<th scope="col" class="sv-line-col">Included</th>
|
|
58
|
+
{s.items.map((service) => (
|
|
59
|
+
<th scope="col" class:list={[service.featured && 'sv-col-featured']}>
|
|
60
|
+
<span class="sv-service-name">{service.name}</span>
|
|
61
|
+
{service.featured && s.featuredLabel && <span class="chip sv-featured">{s.featuredLabel}</span>}
|
|
62
|
+
{service.price && <span class="sv-service-price">{service.price}</span>}
|
|
63
|
+
{service.term && <span class="sv-service-term">{service.term}</span>}
|
|
64
|
+
</th>
|
|
65
|
+
))}
|
|
66
|
+
</tr>
|
|
67
|
+
</thead>
|
|
68
|
+
<tbody>
|
|
69
|
+
{lines.map((line) => (
|
|
70
|
+
<tr>
|
|
71
|
+
<th scope="row" class="sv-line-col">{line}</th>
|
|
72
|
+
{s.items.map((service) => (
|
|
73
|
+
<td class:list={[service.featured && 'sv-col-featured']}>
|
|
74
|
+
{service.includes.includes(line) ? (
|
|
75
|
+
<>
|
|
76
|
+
<Check />
|
|
77
|
+
<span class="visually-hidden">Included</span>
|
|
78
|
+
</>
|
|
79
|
+
) : (
|
|
80
|
+
<>
|
|
81
|
+
<span class="sv-dash" aria-hidden="true">–</span>
|
|
82
|
+
<span class="visually-hidden">Not included</span>
|
|
83
|
+
</>
|
|
84
|
+
)}
|
|
85
|
+
</td>
|
|
86
|
+
))}
|
|
87
|
+
</tr>
|
|
88
|
+
))}
|
|
89
|
+
</tbody>
|
|
90
|
+
{buttons && (
|
|
91
|
+
<tfoot>
|
|
92
|
+
<tr>
|
|
93
|
+
<td class="sv-line-col"></td>
|
|
94
|
+
{s.items.map((service) => (
|
|
95
|
+
<td class:list={[service.featured && 'sv-col-featured']}>
|
|
96
|
+
<Button service={service} solid={service.featured} many={many} class="sv-table-button" />
|
|
97
|
+
</td>
|
|
98
|
+
))}
|
|
99
|
+
</tr>
|
|
100
|
+
</tfoot>
|
|
101
|
+
)}
|
|
102
|
+
</table>
|
|
103
|
+
</div>
|
|
104
|
+
) : only && (
|
|
105
|
+
<div class="sv-single">
|
|
106
|
+
<div class="sv-single-head">
|
|
107
|
+
<div class="sv-single-name">
|
|
108
|
+
<h3>{only.name}</h3>
|
|
109
|
+
{only.featured && s.featuredLabel && <span class="chip">{s.featuredLabel}</span>}
|
|
110
|
+
</div>
|
|
111
|
+
{(only.price || only.term) && (
|
|
112
|
+
<p class="sv-single-price">
|
|
113
|
+
{only.price && <span class="sv-single-amount">{only.price}</span>}
|
|
114
|
+
{only.term && <span class="sv-single-term">{only.term}</span>}
|
|
115
|
+
</p>
|
|
116
|
+
)}
|
|
117
|
+
</div>
|
|
118
|
+
{only.summary && <p class="sv-single-summary">{only.summary}</p>}
|
|
119
|
+
<Includes items={only.includes} class="sv-single-includes" />
|
|
120
|
+
<Button service={only} solid={true} many={false} class="sv-single-button" />
|
|
121
|
+
</div>
|
|
122
|
+
)}
|
|
123
|
+
{s.note && <p class="fine sv-compare-note">{s.note}</p>}
|
|
124
|
+
</Band>
|
|
125
|
+
)}
|
|
126
|
+
|
|
127
|
+
<style>
|
|
128
|
+
/* Positioned, so a cell's visually hidden words stay inside the scroll box instead of widening the page. */
|
|
129
|
+
.sv-frame {
|
|
130
|
+
position: relative;
|
|
131
|
+
overflow-x: auto;
|
|
132
|
+
border: 1px solid var(--line-strong);
|
|
133
|
+
border-radius: var(--radius-card);
|
|
134
|
+
background: var(--surface);
|
|
135
|
+
color: var(--ink);
|
|
136
|
+
overscroll-behavior-x: contain;
|
|
137
|
+
}
|
|
138
|
+
:global(.lede) + .sv-frame,
|
|
139
|
+
:global(.lede) + .sv-single {
|
|
140
|
+
margin-top: clamp(1.5rem, 1rem + 1.5vw, 2.5rem);
|
|
141
|
+
}
|
|
142
|
+
.sv-table {
|
|
143
|
+
width: 100%;
|
|
144
|
+
min-width: calc(9rem + var(--sv-services) * 11rem);
|
|
145
|
+
table-layout: fixed;
|
|
146
|
+
border-collapse: separate;
|
|
147
|
+
border-spacing: 0;
|
|
148
|
+
font-size: 0.9375rem;
|
|
149
|
+
}
|
|
150
|
+
.sv-table th,
|
|
151
|
+
.sv-table td {
|
|
152
|
+
padding: 0.9375rem 1.125rem;
|
|
153
|
+
border-bottom: 1px solid var(--line);
|
|
154
|
+
text-align: left;
|
|
155
|
+
vertical-align: middle;
|
|
156
|
+
}
|
|
157
|
+
.sv-table tbody tr:last-child > *,
|
|
158
|
+
.sv-table tfoot td {
|
|
159
|
+
border-bottom: 0;
|
|
160
|
+
}
|
|
161
|
+
.sv-table thead th {
|
|
162
|
+
padding-block: 1.125rem 1.25rem;
|
|
163
|
+
border-bottom: 1px solid var(--button-2);
|
|
164
|
+
background: var(--button-2);
|
|
165
|
+
color: var(--button-2-ink);
|
|
166
|
+
vertical-align: bottom;
|
|
167
|
+
}
|
|
168
|
+
.sv-table thead .sv-line-col {
|
|
169
|
+
color: color-mix(in srgb, var(--button-2-ink) 78%, transparent);
|
|
170
|
+
font-size: var(--text-xs);
|
|
171
|
+
font-weight: 700;
|
|
172
|
+
letter-spacing: 0.16em;
|
|
173
|
+
text-transform: uppercase;
|
|
174
|
+
}
|
|
175
|
+
.sv-line-col {
|
|
176
|
+
position: sticky;
|
|
177
|
+
left: 0;
|
|
178
|
+
z-index: 1;
|
|
179
|
+
width: 30%;
|
|
180
|
+
background: var(--surface);
|
|
181
|
+
font-weight: 500;
|
|
182
|
+
}
|
|
183
|
+
tbody .sv-line-col,
|
|
184
|
+
tfoot .sv-line-col {
|
|
185
|
+
box-shadow: inset -1px 0 0 var(--line);
|
|
186
|
+
}
|
|
187
|
+
.sv-service-name {
|
|
188
|
+
display: block;
|
|
189
|
+
font-weight: 700;
|
|
190
|
+
line-height: 1.3;
|
|
191
|
+
}
|
|
192
|
+
.sv-featured {
|
|
193
|
+
margin-top: 0.375rem;
|
|
194
|
+
background: color-mix(in srgb, var(--button-2-ink) 16%, transparent);
|
|
195
|
+
color: var(--button-2-ink);
|
|
196
|
+
white-space: normal;
|
|
197
|
+
}
|
|
198
|
+
.sv-service-price {
|
|
199
|
+
display: block;
|
|
200
|
+
margin-top: 0.5rem;
|
|
201
|
+
font-family: var(--font-display);
|
|
202
|
+
font-size: clamp(1.375rem, 1.2rem + 0.6vw, 1.75rem);
|
|
203
|
+
font-variant-numeric: lining-nums;
|
|
204
|
+
font-weight: 800;
|
|
205
|
+
letter-spacing: -0.02em;
|
|
206
|
+
line-height: 1.1;
|
|
207
|
+
}
|
|
208
|
+
.sv-service-term {
|
|
209
|
+
display: block;
|
|
210
|
+
margin-top: 0.25rem;
|
|
211
|
+
font-size: var(--text-sm);
|
|
212
|
+
font-weight: 500;
|
|
213
|
+
opacity: 0.85;
|
|
214
|
+
}
|
|
215
|
+
tbody .sv-col-featured,
|
|
216
|
+
tfoot .sv-col-featured {
|
|
217
|
+
background: color-mix(in srgb, var(--button-2) 7%, transparent);
|
|
218
|
+
}
|
|
219
|
+
.sv-table td {
|
|
220
|
+
--sv-check: var(--accent);
|
|
221
|
+
}
|
|
222
|
+
.sv-table td :global(.sv-check) {
|
|
223
|
+
display: block;
|
|
224
|
+
width: 1.25rem;
|
|
225
|
+
height: 1.25rem;
|
|
226
|
+
}
|
|
227
|
+
.sv-dash {
|
|
228
|
+
color: var(--muted);
|
|
229
|
+
font-weight: 600;
|
|
230
|
+
}
|
|
231
|
+
.sv-table tfoot td {
|
|
232
|
+
padding: 1.125rem 0.75rem;
|
|
233
|
+
border-top: 1px solid var(--line);
|
|
234
|
+
vertical-align: top;
|
|
235
|
+
}
|
|
236
|
+
.sv-table :global(.sv-table-button) {
|
|
237
|
+
width: 100%;
|
|
238
|
+
padding-inline: 0.75rem;
|
|
239
|
+
}
|
|
240
|
+
.sv-table thead :focus-visible,
|
|
241
|
+
.sv-frame:focus-visible {
|
|
242
|
+
outline-offset: 2px;
|
|
243
|
+
}
|
|
244
|
+
.sv-single {
|
|
245
|
+
display: grid;
|
|
246
|
+
gap: 1.25rem;
|
|
247
|
+
max-width: 40rem;
|
|
248
|
+
padding: clamp(1.375rem, 1rem + 1.2vw, 2rem);
|
|
249
|
+
border: 1px solid var(--line);
|
|
250
|
+
border-radius: var(--radius-card);
|
|
251
|
+
background: var(--surface);
|
|
252
|
+
color: var(--ink);
|
|
253
|
+
}
|
|
254
|
+
.sv-single > * {
|
|
255
|
+
margin: 0;
|
|
256
|
+
}
|
|
257
|
+
.sv-single-head {
|
|
258
|
+
display: flex;
|
|
259
|
+
flex-wrap: wrap;
|
|
260
|
+
align-items: baseline;
|
|
261
|
+
justify-content: space-between;
|
|
262
|
+
gap: 0.5rem 1.5rem;
|
|
263
|
+
}
|
|
264
|
+
.sv-single-name {
|
|
265
|
+
display: flex;
|
|
266
|
+
flex-wrap: wrap;
|
|
267
|
+
align-items: center;
|
|
268
|
+
gap: 0.5rem 0.75rem;
|
|
269
|
+
}
|
|
270
|
+
.sv-single-name h3 {
|
|
271
|
+
margin: 0;
|
|
272
|
+
font-family: var(--font);
|
|
273
|
+
font-size: 1.0625rem;
|
|
274
|
+
font-weight: 700;
|
|
275
|
+
letter-spacing: 0;
|
|
276
|
+
}
|
|
277
|
+
/* The featured label's chip, outlined so it reads on a surface as dark as the tint (a dark scheme). */
|
|
278
|
+
.sv-single-name .chip {
|
|
279
|
+
box-shadow: inset 0 0 0 1px var(--line-strong);
|
|
280
|
+
}
|
|
281
|
+
.sv-single-price {
|
|
282
|
+
margin: 0;
|
|
283
|
+
}
|
|
284
|
+
.sv-single-amount {
|
|
285
|
+
display: block;
|
|
286
|
+
font-family: var(--font-display);
|
|
287
|
+
font-size: clamp(1.75rem, 1.5rem + 0.8vw, 2.25rem);
|
|
288
|
+
font-variant-numeric: lining-nums;
|
|
289
|
+
font-weight: 800;
|
|
290
|
+
letter-spacing: -0.02em;
|
|
291
|
+
line-height: 1.05;
|
|
292
|
+
}
|
|
293
|
+
.sv-single-term {
|
|
294
|
+
display: block;
|
|
295
|
+
margin-top: 0.25rem;
|
|
296
|
+
color: var(--muted);
|
|
297
|
+
font-size: var(--text-sm);
|
|
298
|
+
}
|
|
299
|
+
.sv-single-summary {
|
|
300
|
+
color: var(--muted);
|
|
301
|
+
}
|
|
302
|
+
.sv-single :global(.sv-single-includes) {
|
|
303
|
+
padding-top: 1.25rem;
|
|
304
|
+
border-top: 1px solid var(--line);
|
|
305
|
+
}
|
|
306
|
+
.sv-single :global(.sv-single-button) {
|
|
307
|
+
justify-self: start;
|
|
308
|
+
}
|
|
309
|
+
.sv-compare-note {
|
|
310
|
+
margin: 1.25rem 0 0;
|
|
311
|
+
}
|
|
312
|
+
/* On a phone the held column is narrower, so more of the scrolled services shows beside it. */
|
|
313
|
+
@media (max-width: 39.99rem) {
|
|
314
|
+
.sv-line-col {
|
|
315
|
+
width: 9rem;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
/* Wider, the single service's price sits at the right of its name. */
|
|
319
|
+
@media (min-width: 40rem) {
|
|
320
|
+
.sv-single-price {
|
|
321
|
+
text-align: right;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
:global(.bg-band-contrast) .sv-frame,
|
|
325
|
+
:global(.bg-band-contrast) .sv-single {
|
|
326
|
+
border-color: var(--line);
|
|
327
|
+
}
|
|
328
|
+
</style>
|