@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.
Files changed (340) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +12 -2
  3. package/dist/chunk-KOB36GSF.js +62 -0
  4. package/dist/constants-DvTNj4JI.d-Batjcj3Z.d.ts +38 -0
  5. package/dist/content-api-CYeY0vU8.d.ts +849 -0
  6. package/dist/contract/content-api-examples.d.ts +58 -0
  7. package/dist/contract/content-api-examples.js +783 -0
  8. package/dist/contract/content-api.d.ts +2 -0
  9. package/dist/contract/content-api.js +1 -0
  10. package/dist/contract/site-templates.d.ts +252 -0
  11. package/dist/contract/site-templates.js +185 -0
  12. package/package.json +70 -3
  13. package/src/components/EntryCard.astro +35 -0
  14. package/src/components/EventMap.astro +118 -0
  15. package/src/components/EventPage.astro +194 -0
  16. package/src/components/FieldValue.astro +41 -0
  17. package/src/components/LeadingHero.astro +21 -0
  18. package/src/components/NotFound.astro +20 -0
  19. package/src/components/PageSections.astro +47 -0
  20. package/src/components/Prose.astro +18 -0
  21. package/src/components/chrome/Brand.astro +54 -0
  22. package/src/components/chrome/ClosingCall.astro +94 -0
  23. package/src/components/chrome/DonateStrip.astro +61 -0
  24. package/src/components/chrome/FooterColumns.astro +32 -0
  25. package/src/components/chrome/FooterContact.astro +28 -0
  26. package/src/components/chrome/MenuList.astro +45 -0
  27. package/src/components/chrome/ModeToggle.astro +125 -0
  28. package/src/components/chrome/SignedInNotice.astro +53 -0
  29. package/src/components/chrome/SignupBand.astro +12 -0
  30. package/src/components/chrome/TakeoverBanner.astro +56 -0
  31. package/src/components/chrome/VisitorAccount.astro +82 -0
  32. package/src/components/entries/AuthorBox.astro +47 -0
  33. package/src/components/entries/EntryFields.astro +29 -0
  34. package/src/components/entries/EntryHeader.astro +77 -0
  35. package/src/components/entries/ListFrame.astro +126 -0
  36. package/src/components/entries/ListSearch.astro +24 -0
  37. package/src/components/entries/Share.astro +24 -0
  38. package/src/components/entries/course/classroom.astro +26 -0
  39. package/src/components/entries/course/lesson.astro +18 -0
  40. package/src/components/entries/course/section.ts +20 -0
  41. package/src/components/entries/course/syllabus.astro +15 -0
  42. package/src/components/entries/index.ts +77 -0
  43. package/src/components/entries/newsletter/issue.astro +41 -0
  44. package/src/components/entries/newsletter/list.astro +26 -0
  45. package/src/components/entries/podcast/episode.astro +42 -0
  46. package/src/components/entries/podcast/list.astro +36 -0
  47. package/src/components/entries/post/article.astro +31 -0
  48. package/src/components/entries/post/list.astro +85 -0
  49. package/src/components/entries/props.ts +61 -0
  50. package/src/components/entries/video/cards.astro +39 -0
  51. package/src/components/entries/video/grid.astro +15 -0
  52. package/src/components/entries/video/watch.astro +41 -0
  53. package/src/components/live/LivePage.astro +215 -0
  54. package/src/components/live/LocalTime.astro +29 -0
  55. package/src/components/sections/About/books.astro +188 -0
  56. package/src/components/sections/About/credentials.ts +90 -0
  57. package/src/components/sections/About/index.astro +57 -0
  58. package/src/components/sections/About/left.astro +54 -0
  59. package/src/components/sections/About/letter.astro +108 -0
  60. package/src/components/sections/About/portrait.astro +308 -0
  61. package/src/components/sections/Advocacy/compact.astro +14 -0
  62. package/src/components/sections/Advocacy/index.astro +14 -0
  63. package/src/components/sections/Band.astro +39 -0
  64. package/src/components/sections/Blog/feature.astro +176 -0
  65. package/src/components/sections/Blog/index.astro +37 -0
  66. package/src/components/sections/Blog/latest.ts +80 -0
  67. package/src/components/sections/Blog/list.astro +186 -0
  68. package/src/components/sections/Booking/index.astro +139 -0
  69. package/src/components/sections/Booking/list.astro +144 -0
  70. package/src/components/sections/Booking/types.ts +60 -0
  71. package/src/components/sections/Calendar/agenda.astro +14 -0
  72. package/src/components/sections/Calendar/index.astro +14 -0
  73. package/src/components/sections/CandidateRoster/ballot.astro +394 -0
  74. package/src/components/sections/CandidateRoster/candidates.ts +69 -0
  75. package/src/components/sections/CandidateRoster/compact.astro +115 -0
  76. package/src/components/sections/CandidateRoster/index.astro +57 -0
  77. package/src/components/sections/CaseStudies/beforeafter.astro +222 -0
  78. package/src/components/sections/CaseStudies/cases.ts +111 -0
  79. package/src/components/sections/CaseStudies/grid.astro +261 -0
  80. package/src/components/sections/CaseStudies/index.astro +333 -0
  81. package/src/components/sections/Classroom/CourseCard.astro +181 -0
  82. package/src/components/sections/Classroom/Courses.astro +88 -0
  83. package/src/components/sections/Classroom/classroom.ts +141 -0
  84. package/src/components/sections/Classroom/index.astro +20 -0
  85. package/src/components/sections/Classroom/list.astro +15 -0
  86. package/src/components/sections/Collection/compact.astro +7 -0
  87. package/src/components/sections/Collection/entries.ts +62 -0
  88. package/src/components/sections/Collection/feature.astro +180 -0
  89. package/src/components/sections/Collection/index.astro +46 -0
  90. package/src/components/sections/Collection/library.astro +271 -0
  91. package/src/components/sections/Collection/list.astro +7 -0
  92. package/src/components/sections/Collection/outline.astro +134 -0
  93. package/src/components/sections/Collection/shelves.astro +191 -0
  94. package/src/components/sections/Comparison/Unlisted.astro +6 -0
  95. package/src/components/sections/Comparison/cards.astro +171 -0
  96. package/src/components/sections/Comparison/index.astro +191 -0
  97. package/src/components/sections/Comparison/sides.ts +98 -0
  98. package/src/components/sections/Comparison/spectrum.astro +261 -0
  99. package/src/components/sections/ContentPost/banner.astro +152 -0
  100. package/src/components/sections/ContentPost/index.astro +35 -0
  101. package/src/components/sections/ContentPost/lesson.ts +119 -0
  102. package/src/components/sections/ContentPost/player.astro +254 -0
  103. package/src/components/sections/ContentPost/theater.astro +329 -0
  104. package/src/components/sections/Countdown/index.astro +53 -0
  105. package/src/components/sections/Course/Bar.astro +46 -0
  106. package/src/components/sections/Course/CourseHead.astro +123 -0
  107. package/src/components/sections/Course/Crumbs.astro +44 -0
  108. package/src/components/sections/Course/Icon.astro +29 -0
  109. package/src/components/sections/Course/Ring.astro +62 -0
  110. package/src/components/sections/Course/Syllabus.astro +146 -0
  111. package/src/components/sections/Course/course.ts +146 -0
  112. package/src/components/sections/Course/index.astro +143 -0
  113. package/src/components/sections/Course/outline.astro +39 -0
  114. package/src/components/sections/Cta/banner.astro +64 -0
  115. package/src/components/sections/Cta/card.astro +88 -0
  116. package/src/components/sections/Cta/index.astro +31 -0
  117. package/src/components/sections/Cta/photo.astro +114 -0
  118. package/src/components/sections/Cta/strip.astro +91 -0
  119. package/src/components/sections/Donate/index.astro +136 -0
  120. package/src/components/sections/Donate/story.astro +7 -0
  121. package/src/components/sections/Event/card.astro +14 -0
  122. package/src/components/sections/Event/index.astro +14 -0
  123. package/src/components/sections/EventsList/AgendaMonths.astro +105 -0
  124. package/src/components/sections/EventsList/CalendarLine.astro +23 -0
  125. package/src/components/sections/EventsList/EventRows.astro +196 -0
  126. package/src/components/sections/EventsList/LiveCounts.astro +75 -0
  127. package/src/components/sections/EventsList/TypeTabs.astro +53 -0
  128. package/src/components/sections/EventsList/agenda.astro +55 -0
  129. package/src/components/sections/EventsList/calendar.astro +392 -0
  130. package/src/components/sections/EventsList/cards.astro +186 -0
  131. package/src/components/sections/EventsList/cohorts.astro +205 -0
  132. package/src/components/sections/EventsList/compact.astro +163 -0
  133. package/src/components/sections/EventsList/events.ts +168 -0
  134. package/src/components/sections/EventsList/index.astro +46 -0
  135. package/src/components/sections/EventsList/map.astro +436 -0
  136. package/src/components/sections/EventsList/shifts.astro +355 -0
  137. package/src/components/sections/EventsList/week.astro +361 -0
  138. package/src/components/sections/Faq/Contact.astro +63 -0
  139. package/src/components/sections/Faq/Questions.astro +98 -0
  140. package/src/components/sections/Faq/cards.astro +74 -0
  141. package/src/components/sections/Faq/faq.ts +101 -0
  142. package/src/components/sections/Faq/index.astro +49 -0
  143. package/src/components/sections/Faq/topics.astro +178 -0
  144. package/src/components/sections/Financials/Foot.astro +38 -0
  145. package/src/components/sections/Financials/Head.astro +47 -0
  146. package/src/components/sections/Financials/donut.astro +197 -0
  147. package/src/components/sections/Financials/financials.ts +52 -0
  148. package/src/components/sections/Financials/index.astro +148 -0
  149. package/src/components/sections/Financials/table.astro +157 -0
  150. package/src/components/sections/FormBlock/index.astro +33 -0
  151. package/src/components/sections/FormBlock/wide.astro +7 -0
  152. package/src/components/sections/Hero/cover.astro +170 -0
  153. package/src/components/sections/Hero/donate.astro +209 -0
  154. package/src/components/sections/Hero/field.astro +390 -0
  155. package/src/components/sections/Hero/index.astro +52 -0
  156. package/src/components/sections/Hero/overlap.astro +151 -0
  157. package/src/components/sections/Hero/rotating.astro +30 -0
  158. package/src/components/sections/Hero/split.astro +96 -0
  159. package/src/components/sections/Hero/statement.astro +55 -0
  160. package/src/components/sections/Hero/video.astro +399 -0
  161. package/src/components/sections/Issues/checklist.astro +204 -0
  162. package/src/components/sections/Issues/drawer.astro +237 -0
  163. package/src/components/sections/Issues/index.astro +115 -0
  164. package/src/components/sections/Issues/issues.ts +37 -0
  165. package/src/components/sections/Issues/numbered.astro +79 -0
  166. package/src/components/sections/Issues/rows.astro +137 -0
  167. package/src/components/sections/Issues/steps.astro +81 -0
  168. package/src/components/sections/Issues/tabs.astro +322 -0
  169. package/src/components/sections/Leaderboard/index.astro +29 -0
  170. package/src/components/sections/Lesson/Door.astro +121 -0
  171. package/src/components/sections/Lesson/LessonBody.astro +416 -0
  172. package/src/components/sections/Lesson/Rail.astro +182 -0
  173. package/src/components/sections/Lesson/Tracker.astro +137 -0
  174. package/src/components/sections/Lesson/index.astro +27 -0
  175. package/src/components/sections/Lesson/lesson.ts +233 -0
  176. package/src/components/sections/Lesson/reading.astro +21 -0
  177. package/src/components/sections/Map/CoverageLine.astro +19 -0
  178. package/src/components/sections/Map/RegionMap.astro +109 -0
  179. package/src/components/sections/Map/bar.astro +160 -0
  180. package/src/components/sections/Map/index.astro +192 -0
  181. package/src/components/sections/Map/map.astro +275 -0
  182. package/src/components/sections/MediaKit/BioCard.astro +108 -0
  183. package/src/components/sections/MediaKit/Downloads.astro +88 -0
  184. package/src/components/sections/MediaKit/index.astro +183 -0
  185. package/src/components/sections/MediaKit/kit.ts +140 -0
  186. package/src/components/sections/MediaKit/press.astro +189 -0
  187. package/src/components/sections/MediaKit/speaker.astro +205 -0
  188. package/src/components/sections/Membership/Benefits.astro +42 -0
  189. package/src/components/sections/Membership/Check.astro +12 -0
  190. package/src/components/sections/Membership/Price.astro +61 -0
  191. package/src/components/sections/Membership/compare.astro +312 -0
  192. package/src/components/sections/Membership/index.astro +281 -0
  193. package/src/components/sections/Membership/offers.ts +169 -0
  194. package/src/components/sections/Membership/tiers.astro +217 -0
  195. package/src/components/sections/MovementMap/index.astro +50 -0
  196. package/src/components/sections/MovementTicker/index.astro +43 -0
  197. package/src/components/sections/Pathways/Doors.astro +147 -0
  198. package/src/components/sections/Pathways/Head.astro +37 -0
  199. package/src/components/sections/Pathways/index.astro +27 -0
  200. package/src/components/sections/Pathways/pathways.ts +100 -0
  201. package/src/components/sections/Pathways/quiz.astro +286 -0
  202. package/src/components/sections/Pathways/tabs.astro +271 -0
  203. package/src/components/sections/PdfEmbed/card.astro +99 -0
  204. package/src/components/sections/PdfEmbed/index.astro +26 -0
  205. package/src/components/sections/PdfEmbed/medium.astro +7 -0
  206. package/src/components/sections/PdfEmbed/tall.astro +7 -0
  207. package/src/components/sections/Petition/coverage.astro +14 -0
  208. package/src/components/sections/Petition/image.astro +14 -0
  209. package/src/components/sections/Petition/index.astro +14 -0
  210. package/src/components/sections/Petition/map.astro +14 -0
  211. package/src/components/sections/PlatformPlanks/anchors.ts +66 -0
  212. package/src/components/sections/PlatformPlanks/columns.astro +171 -0
  213. package/src/components/sections/PlatformPlanks/index.astro +56 -0
  214. package/src/components/sections/PlatformPlanks/longread.astro +250 -0
  215. package/src/components/sections/PollBlock/index.astro +30 -0
  216. package/src/components/sections/Portfolio/featured.astro +343 -0
  217. package/src/components/sections/Portfolio/index.astro +571 -0
  218. package/src/components/sections/Portfolio/strip.astro +173 -0
  219. package/src/components/sections/Portfolio/work.ts +100 -0
  220. package/src/components/sections/Progress/MatchClock.astro +166 -0
  221. package/src/components/sections/Progress/compact.astro +150 -0
  222. package/src/components/sections/Progress/index.astro +32 -0
  223. package/src/components/sections/Progress/match.astro +126 -0
  224. package/src/components/sections/Progress/ring.astro +179 -0
  225. package/src/components/sections/QuickDonate/DonateCard.astro +149 -0
  226. package/src/components/sections/QuickDonate/Picker.astro +95 -0
  227. package/src/components/sections/QuickDonate/band.astro +164 -0
  228. package/src/components/sections/QuickDonate/bar.astro +208 -0
  229. package/src/components/sections/QuickDonate/donate.ts +126 -0
  230. package/src/components/sections/QuickDonate/hero.astro +143 -0
  231. package/src/components/sections/QuickDonate/index.astro +73 -0
  232. package/src/components/sections/QuickDonate/jar.astro +225 -0
  233. package/src/components/sections/QuickDonate/ladder.astro +248 -0
  234. package/src/components/sections/QuoteStrip/carousel.astro +340 -0
  235. package/src/components/sections/QuoteStrip/index.astro +58 -0
  236. package/src/components/sections/QuoteStrip/logos.astro +226 -0
  237. package/src/components/sections/QuoteStrip/quotes.ts +61 -0
  238. package/src/components/sections/QuoteStrip/single.astro +92 -0
  239. package/src/components/sections/QuoteStrip/ticker.astro +319 -0
  240. package/src/components/sections/QuoteStrip/wall.astro +113 -0
  241. package/src/components/sections/Resources/band.astro +93 -0
  242. package/src/components/sections/Resources/featured.astro +239 -0
  243. package/src/components/sections/Resources/index.astro +225 -0
  244. package/src/components/sections/Resources/resources.ts +92 -0
  245. package/src/components/sections/SampleBallot/Position.astro +39 -0
  246. package/src/components/sections/SampleBallot/ballot.ts +92 -0
  247. package/src/components/sections/SampleBallot/cards.astro +299 -0
  248. package/src/components/sections/SampleBallot/index.astro +326 -0
  249. package/src/components/sections/SampleBallot/measures.astro +172 -0
  250. package/src/components/sections/Scorecard/grades.astro +141 -0
  251. package/src/components/sections/Scorecard/index.astro +294 -0
  252. package/src/components/sections/Scorecard/promise.astro +167 -0
  253. package/src/components/sections/Scorecard/votes.ts +83 -0
  254. package/src/components/sections/SectionHead.astro +31 -0
  255. package/src/components/sections/Services/Button.astro +24 -0
  256. package/src/components/sections/Services/Check.astro +12 -0
  257. package/src/components/sections/Services/Includes.astro +42 -0
  258. package/src/components/sections/Services/compare.astro +328 -0
  259. package/src/components/sections/Services/index.astro +187 -0
  260. package/src/components/sections/Services/list.astro +181 -0
  261. package/src/components/sections/Services/services.ts +80 -0
  262. package/src/components/sections/ShareKit/Actions.astro +71 -0
  263. package/src/components/sections/ShareKit/Buttons.astro +62 -0
  264. package/src/components/sections/ShareKit/compact.astro +123 -0
  265. package/src/components/sections/ShareKit/index.astro +160 -0
  266. package/src/components/sections/ShareKit/share.ts +60 -0
  267. package/src/components/sections/ShareKit/strip.astro +173 -0
  268. package/src/components/sections/SignupCapture/band.astro +7 -0
  269. package/src/components/sections/SignupCapture/index.astro +103 -0
  270. package/src/components/sections/SignupCapture/inline.astro +7 -0
  271. package/src/components/sections/SocialFeed/index.astro +34 -0
  272. package/src/components/sections/StatCards/feature.astro +143 -0
  273. package/src/components/sections/StatCards/index.astro +51 -0
  274. package/src/components/sections/StatCards/ribbon.astro +113 -0
  275. package/src/components/sections/StatCards/wall.astro +177 -0
  276. package/src/components/sections/Store/featured.astro +14 -0
  277. package/src/components/sections/Store/index.astro +14 -0
  278. package/src/components/sections/Stories/Status.astro +42 -0
  279. package/src/components/sections/Stories/StoryCards.astro +171 -0
  280. package/src/components/sections/Stories/cards.astro +42 -0
  281. package/src/components/sections/Stories/index.astro +238 -0
  282. package/src/components/sections/Stories/stories.ts +97 -0
  283. package/src/components/sections/Stories/timeline.astro +135 -0
  284. package/src/components/sections/TeamGrid/board.astro +280 -0
  285. package/src/components/sections/TeamGrid/index.astro +71 -0
  286. package/src/components/sections/TeamGrid/list.astro +306 -0
  287. package/src/components/sections/TeamGrid/people.ts +178 -0
  288. package/src/components/sections/VideoEmbed/index.astro +52 -0
  289. package/src/components/sections/VideoEmbed/landscape.astro +7 -0
  290. package/src/components/sections/VideoEmbed/portrait.astro +7 -0
  291. package/src/components/sections/VideoEmbed/square.astro +7 -0
  292. package/src/components/sections/VoterTools/DaysLeft.astro +33 -0
  293. package/src/components/sections/VoterTools/dates.astro +149 -0
  294. package/src/components/sections/VoterTools/index.astro +228 -0
  295. package/src/components/sections/VoterTools/polling.astro +141 -0
  296. package/src/components/sections/VoterTools/voter-tools.ts +70 -0
  297. package/src/components/sections/index.ts +370 -0
  298. package/src/components/sections/modules/Headed.astro +39 -0
  299. package/src/components/sections/modules/ModuleFrame.astro +179 -0
  300. package/src/components/volunteer/ShiftLive.astro +90 -0
  301. package/src/components/volunteer/detail.astro +247 -0
  302. package/src/components/volunteer/list.astro +298 -0
  303. package/src/components/volunteer/props.ts +21 -0
  304. package/src/env.d.ts +22 -0
  305. package/src/index.d.ts +10 -0
  306. package/src/index.js +64 -0
  307. package/src/layouts/Site.astro +371 -0
  308. package/src/lib/academy.ts +146 -0
  309. package/src/lib/brand.ts +534 -0
  310. package/src/lib/chrome.ts +119 -0
  311. package/src/lib/donate-frame.ts +64 -0
  312. package/src/lib/entries.ts +190 -0
  313. package/src/lib/env.ts +34 -0
  314. package/src/lib/event-map-draw.ts +91 -0
  315. package/src/lib/events.ts +476 -0
  316. package/src/lib/fonts.ts +116 -0
  317. package/src/lib/footer.ts +24 -0
  318. package/src/lib/format.ts +160 -0
  319. package/src/lib/geo.ts +131 -0
  320. package/src/lib/live.ts +54 -0
  321. package/src/lib/menu.ts +48 -0
  322. package/src/lib/petition-text.ts +29 -0
  323. package/src/lib/reading.ts +17 -0
  324. package/src/lib/regions.ts +215 -0
  325. package/src/lib/section.ts +94 -0
  326. package/src/lib/shifts.ts +186 -0
  327. package/src/lib/stream-time.ts +20 -0
  328. package/src/lib/stream.ts +141 -0
  329. package/src/lib/visitor.ts +54 -0
  330. package/src/routes/catch-all.astro +286 -0
  331. package/src/routes/form.astro +30 -0
  332. package/src/routes/live.astro +49 -0
  333. package/src/routes/not-found.astro +18 -0
  334. package/src/routes/preview.astro +60 -0
  335. package/src/routes/setup.astro +62 -0
  336. package/src/routes/volunteer-shift.astro +61 -0
  337. package/src/routes/volunteer.astro +37 -0
  338. package/src/styles/entries.css +784 -0
  339. package/src/styles/site.css +1839 -0
  340. package/src/template.ts +182 -0
@@ -0,0 +1,141 @@
1
+ ---
2
+ // VoterTools, 'polling' layout (mock 02, B, without its address search and
3
+ // map: BackGold has no polling-place lookup of its own, so the finder is the
4
+ // official one the organization links to). The polling-place card leads,
5
+ // raised on the band's card colour: the kicker, the heading and the body,
6
+ // the polling-place link as the main call, then under a rule the early
7
+ // voting line and the ID note as a chip. Beside it (under it on a phone) the
8
+ // election-day card: the election-day line large in the display face, with
9
+ // an accent rule over it, and the registration link as an outline (the main
10
+ // call when there is no polling link). The key dates belong to the 'dates'
11
+ // and 'register' layouts; this one leaves them out. Each card draws only
12
+ // what it has, and a card with nothing is left out. Nothing is drawn when
13
+ // the section has neither a heading, a link nor a date.
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 { voterTools } from './voter-tools'
19
+ import { prose } from '../../../lib/format'
20
+
21
+ type Props = ComponentProps<typeof Default>
22
+
23
+ const { section } = Astro.props
24
+ const vt = voterTools(section)
25
+ const place = !!(vt.kicker || vt.heading || prose(section.copy.body) || vt.polling || vt.earlyVoting || vt.idNote)
26
+ const day = !!(vt.electionDay || vt.register)
27
+ const shown = !!(vt.heading || vt.register || vt.polling || vt.dates.length > 0)
28
+ ---
29
+ {shown && (place || day) && (
30
+ <Band section={section} class="voter-tools vt-polling">
31
+ <div class:list={['vt-cards', place && day && 'vt-cards-two']}>
32
+ {place && (
33
+ <div class="vt-card vt-place">
34
+ {vt.kicker && <p class="kicker">{vt.kicker}</p>}
35
+ {vt.heading && <h2>{vt.heading}</h2>}
36
+ <Prose value={section.copy.body} class="vt-body" />
37
+ {vt.polling && (
38
+ <p class="actions vt-actions">
39
+ <a class="button" href={vt.polling.href} rel={vt.polling.rel}>{vt.polling.label}</a>
40
+ </p>
41
+ )}
42
+ {(vt.earlyVoting || vt.idNote) && (
43
+ <div class="vt-details">
44
+ {vt.earlyVoting && <p class="vt-early">{vt.earlyVoting}</p>}
45
+ {vt.idNote && <p class="vt-id"><span class="chip">{vt.idNote}</span></p>}
46
+ </div>
47
+ )}
48
+ </div>
49
+ )}
50
+ {day && (
51
+ <div class="vt-card vt-day">
52
+ {vt.electionDay && <p class="vt-lead">{vt.electionDay}</p>}
53
+ {vt.register && (
54
+ <p class="vt-day-action">
55
+ <a class:list={['button', vt.polling && 'button-quiet']} href={vt.register.href} rel={vt.register.rel}>{vt.register.label}</a>
56
+ </p>
57
+ )}
58
+ </div>
59
+ )}
60
+ </div>
61
+ </Band>
62
+ )}
63
+
64
+ <style>
65
+ .vt-cards {
66
+ display: grid;
67
+ gap: clamp(1rem, 2vw, 1.5rem);
68
+ }
69
+ .vt-card {
70
+ min-width: 0;
71
+ padding: clamp(1.375rem, 1rem + 1.5vw, 2.25rem);
72
+ border: 1px solid var(--line);
73
+ border-radius: var(--radius-card);
74
+ }
75
+ .vt-card > :last-child {
76
+ margin-bottom: 0;
77
+ }
78
+ .vt-place {
79
+ background: var(--surface);
80
+ box-shadow: var(--shadow);
81
+ }
82
+ .vt-place h2 {
83
+ max-width: 18ch;
84
+ }
85
+ .vt-place :global(.vt-body) {
86
+ color: var(--muted);
87
+ font-size: var(--text-lg);
88
+ }
89
+ .vt-place :global(.vt-body) > :last-child {
90
+ margin-bottom: 0;
91
+ }
92
+ .vt-actions {
93
+ margin-top: 1.75rem;
94
+ }
95
+ .vt-details {
96
+ margin-top: 1.75rem;
97
+ padding-top: 1.25rem;
98
+ border-top: 1px solid var(--line);
99
+ }
100
+ .vt-place > .vt-details:first-child {
101
+ margin-top: 0;
102
+ padding-top: 0;
103
+ border-top: 0;
104
+ }
105
+ .vt-details > :last-child {
106
+ margin-bottom: 0;
107
+ }
108
+ .vt-early {
109
+ margin: 0 0 0.875rem;
110
+ font-weight: 600;
111
+ }
112
+ .vt-id {
113
+ margin: 0;
114
+ }
115
+ /* The election-day card: an accent rule, then the line large in the display face. */
116
+ .vt-day {
117
+ display: flex;
118
+ flex-direction: column;
119
+ gap: 1.5rem;
120
+ background: linear-gradient(var(--accent), var(--accent)) top / 100% 4px no-repeat;
121
+ }
122
+ .vt-day > * {
123
+ margin: 0;
124
+ }
125
+ .vt-lead {
126
+ font-family: var(--font-display);
127
+ font-size: clamp(1.75rem, 1.35rem + 1.4vw, 2.5rem);
128
+ font-weight: 800;
129
+ line-height: 1.08;
130
+ letter-spacing: -0.018em;
131
+ text-wrap: balance;
132
+ }
133
+ @media (min-width: 48rem) {
134
+ .vt-cards-two {
135
+ grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
136
+ }
137
+ .vt-day {
138
+ justify-content: center;
139
+ }
140
+ }
141
+ </style>
@@ -0,0 +1,70 @@
1
+ // A VoterTools section as its layouts draw it: its words, its two links and
2
+ // its key dates. The links go to the official lookups the organization
3
+ // names (its state's registration check and polling-place finder); BackGold
4
+ // has no lookup of its own yet, so nothing here asks the visitor for
5
+ // anything. The Content API sends the links without their keys, so each is
6
+ // told apart by its label: the one labelled with `registerLabel` is the
7
+ // registration link, the one labelled with `pollingLabel` the polling link.
8
+ // A date row is drawn when it has a label; its `date` (YYYY-MM-DD, a
9
+ // calendar day) is kept only when it is one.
10
+
11
+ import type { Section } from '@backgold/content'
12
+ import { linkOf, rows, type Link } from '../../../lib/section'
13
+ import { formatDay, formatShortDay, text } from '../../../lib/format'
14
+
15
+ const CALENDAR_DAY = /^\d{4}-\d{2}-\d{2}$/
16
+
17
+ export interface KeyDate {
18
+ label: string
19
+ /** The row's YYYY-MM-DD, for `<time datetime>` and the island; null when the row has no usable date. */
20
+ day: string | null
21
+ /** "Oct 20" */
22
+ short: string | null
23
+ /** "October 20, 2026", for a screen reader. */
24
+ full: string | null
25
+ note: string | null
26
+ }
27
+
28
+ export interface VoterTools {
29
+ kicker: string | null
30
+ heading: string | null
31
+ register: Link | null
32
+ polling: Link | null
33
+ idNote: string | null
34
+ earlyVoting: string | null
35
+ electionDay: string | null
36
+ datesHeading: string | null
37
+ dates: KeyDate[]
38
+ }
39
+
40
+ export function voterTools(section: Section): VoterTools {
41
+ const copy = section.copy
42
+ const registerLabel = text(copy.registerLabel)
43
+ const pollingLabel = text(copy.pollingLabel)
44
+ let register: Link | null = null
45
+ let polling: Link | null = null
46
+ for (const raw of section.links ?? []) {
47
+ const link = linkOf(raw.label, raw.url)
48
+ if (!link) continue
49
+ if (!register && link.label === registerLabel) register = link
50
+ else if (!polling && link.label === pollingLabel) polling = link
51
+ }
52
+ const dates = rows(section).flatMap((row): KeyDate[] => {
53
+ const label = text(row.label)
54
+ if (!label) return []
55
+ const raw = text(row.date)?.trim() ?? null
56
+ const day = raw && CALENDAR_DAY.test(raw) && formatShortDay(raw) ? raw : null
57
+ return [{ label, day, short: formatShortDay(day), full: formatDay(day), note: text(row.note) }]
58
+ })
59
+ return {
60
+ kicker: text(copy.kicker),
61
+ heading: text(copy.heading),
62
+ register,
63
+ polling,
64
+ idNote: text(copy.idNote),
65
+ earlyVoting: text(copy.earlyVoting),
66
+ electionDay: text(copy.electionDay),
67
+ datesHeading: text(copy.datesHeading),
68
+ dates,
69
+ }
70
+ }
@@ -0,0 +1,370 @@
1
+ // Which component renders each section type, by the type's name in BackGold.
2
+ // `<Section components={sections}>` (from @backgold/astro) looks a section up
3
+ // here as '<Type>:<variant>' first, where the variant is the section's stored
4
+ // layout (the Layout chosen in BackGold), then as '<Type>'; a type that is
5
+ // not listed renders through the package's DefaultSection, so a block
6
+ // BackGold adds later still shows. The areas (src/layouts/Site.astro and the
7
+ // Sidebar in src/routes/catch-all.astro) draw their sections through this map
8
+ // too, TakeoverBanner among them. It is `kitSections` (src/template.ts); a
9
+ // template's own `sections` is this map with the layouts it draws itself
10
+ // added.
11
+ //
12
+ // Each type has a directory: `<Type>/index.astro` is its default layout (the
13
+ // first one a template.json lists) and `<Type>/<layout>.astro` each other
14
+ // layout it lists for it. Every layout the kit draws is registered below; a
15
+ // layout BackGold stores that the template's map does not list falls back to
16
+ // `<Type>/index.astro`, which gets the layout as its `variant` prop.
17
+ //
18
+ // BackGold's money and consent modules (Donate, FormBlock, PollBlock,
19
+ // Petition, Store, Event, Calendar, SignupCapture, Advocacy) are listed for
20
+ // their frame only: each draws its section's heading and its card around
21
+ // BackGold's own frame (modules/ModuleFrame.astro),
22
+ // which it asks to wear the site in the chosen layout. The fields, limits,
23
+ // receipts and consent stay inside BackGold's frame; never draw them here.
24
+ // SocialFrame has no frame a site can place and stays unlisted.
25
+ //
26
+ // The academy's sections (Classroom, Course, Lesson) read their courses for
27
+ // the visitor signed in on the site, if any (lib/visitor.ts): a section's
28
+ // baked rows are the public courses only, and a visitor's progress and locks
29
+ // come from the visitor's own reads, never from the cached page data.
30
+
31
+ import About from './About/index.astro'
32
+ import Blog from './Blog/index.astro'
33
+ import CandidateRoster from './CandidateRoster/index.astro'
34
+ import Classroom from './Classroom/index.astro'
35
+ import ClassroomList from './Classroom/list.astro'
36
+ import Collection from './Collection/index.astro'
37
+ import ContentPost from './ContentPost/index.astro'
38
+ import ContentPostPlayer from './ContentPost/player.astro'
39
+ import ContentPostBanner from './ContentPost/banner.astro'
40
+ import ContentPostTheater from './ContentPost/theater.astro'
41
+ import Countdown from './Countdown/index.astro'
42
+ import Course from './Course/index.astro'
43
+ import CourseOutline from './Course/outline.astro'
44
+ import Cta from './Cta/index.astro'
45
+ import EventsList from './EventsList/index.astro'
46
+ import Hero from './Hero/index.astro'
47
+ import Issues from './Issues/index.astro'
48
+ import Leaderboard from './Leaderboard/index.astro'
49
+ import Lesson from './Lesson/index.astro'
50
+ import LessonReading from './Lesson/reading.astro'
51
+ import MapSection from './Map/index.astro'
52
+ import MovementMap from './MovementMap/index.astro'
53
+ import MovementTicker from './MovementTicker/index.astro'
54
+ import PdfEmbed from './PdfEmbed/index.astro'
55
+ import PlatformPlanks from './PlatformPlanks/index.astro'
56
+ import Progress from './Progress/index.astro'
57
+ import QuoteStrip from './QuoteStrip/index.astro'
58
+ import SocialFeed from './SocialFeed/index.astro'
59
+ import StatCards from './StatCards/index.astro'
60
+ import TeamGrid from './TeamGrid/index.astro'
61
+ import VideoEmbed from './VideoEmbed/index.astro'
62
+
63
+ import AboutLeft from './About/left.astro'
64
+ import AboutLetter from './About/letter.astro'
65
+ import AboutPortrait from './About/portrait.astro'
66
+ import AboutBooks from './About/books.astro'
67
+ import BlogList from './Blog/list.astro'
68
+ import BlogFeature from './Blog/feature.astro'
69
+ import CandidateRosterBallot from './CandidateRoster/ballot.astro'
70
+ import CandidateRosterCompact from './CandidateRoster/compact.astro'
71
+ import CollectionList from './Collection/list.astro'
72
+ import CollectionCompact from './Collection/compact.astro'
73
+ import CollectionFeature from './Collection/feature.astro'
74
+ import CollectionLibrary from './Collection/library.astro'
75
+ import CollectionShelves from './Collection/shelves.astro'
76
+ import CollectionOutline from './Collection/outline.astro'
77
+ import CtaBanner from './Cta/banner.astro'
78
+ import CtaCard from './Cta/card.astro'
79
+ import CtaPhoto from './Cta/photo.astro'
80
+ import CtaStrip from './Cta/strip.astro'
81
+ import EventsListCards from './EventsList/cards.astro'
82
+ import EventsListAgenda from './EventsList/agenda.astro'
83
+ import EventsListCalendar from './EventsList/calendar.astro'
84
+ import EventsListCompact from './EventsList/compact.astro'
85
+ import EventsListShifts from './EventsList/shifts.astro'
86
+ import EventsListWeek from './EventsList/week.astro'
87
+ import EventsListCohorts from './EventsList/cohorts.astro'
88
+ import EventsListMap from './EventsList/map.astro'
89
+ import HeroCover from './Hero/cover.astro'
90
+ import HeroSplit from './Hero/split.astro'
91
+ import HeroOverlap from './Hero/overlap.astro'
92
+ import HeroStatement from './Hero/statement.astro'
93
+ import HeroDonate from './Hero/donate.astro'
94
+ import HeroVideo from './Hero/video.astro'
95
+ import HeroRotating from './Hero/rotating.astro'
96
+ import HeroField from './Hero/field.astro'
97
+ import IssuesSteps from './Issues/steps.astro'
98
+ import IssuesNumbered from './Issues/numbered.astro'
99
+ import IssuesRows from './Issues/rows.astro'
100
+ import IssuesChecklist from './Issues/checklist.astro'
101
+ import IssuesTabs from './Issues/tabs.astro'
102
+ import IssuesDrawer from './Issues/drawer.astro'
103
+ import MapSectionMap from './Map/map.astro'
104
+ import MapSectionBar from './Map/bar.astro'
105
+ import PdfEmbedMedium from './PdfEmbed/medium.astro'
106
+ import PdfEmbedTall from './PdfEmbed/tall.astro'
107
+ import PdfEmbedCard from './PdfEmbed/card.astro'
108
+ import PlatformPlanksLongread from './PlatformPlanks/longread.astro'
109
+ import PlatformPlanksColumns from './PlatformPlanks/columns.astro'
110
+ import ProgressMatch from './Progress/match.astro'
111
+ import ProgressRing from './Progress/ring.astro'
112
+ import ProgressCompact from './Progress/compact.astro'
113
+ import QuoteStripSingle from './QuoteStrip/single.astro'
114
+ import QuoteStripTicker from './QuoteStrip/ticker.astro'
115
+ import QuoteStripLogos from './QuoteStrip/logos.astro'
116
+ import QuoteStripCarousel from './QuoteStrip/carousel.astro'
117
+ import QuoteStripWall from './QuoteStrip/wall.astro'
118
+ import StatCardsRibbon from './StatCards/ribbon.astro'
119
+ import StatCardsFeature from './StatCards/feature.astro'
120
+ import StatCardsWall from './StatCards/wall.astro'
121
+ import TeamGridBoard from './TeamGrid/board.astro'
122
+ import TeamGridList from './TeamGrid/list.astro'
123
+ import VideoEmbedLandscape from './VideoEmbed/landscape.astro'
124
+ import VideoEmbedPortrait from './VideoEmbed/portrait.astro'
125
+ import VideoEmbedSquare from './VideoEmbed/square.astro'
126
+ import TakeoverBanner from '../chrome/TakeoverBanner.astro'
127
+ import Donate from './Donate/index.astro'
128
+ import DonateStory from './Donate/story.astro'
129
+ import FormBlock from './FormBlock/index.astro'
130
+ import FormBlockWide from './FormBlock/wide.astro'
131
+ import PollBlock from './PollBlock/index.astro'
132
+ import SignupCapture from './SignupCapture/index.astro'
133
+ import SignupCaptureBand from './SignupCapture/band.astro'
134
+ import SignupCaptureInline from './SignupCapture/inline.astro'
135
+ import Petition from './Petition/index.astro'
136
+ import PetitionImage from './Petition/image.astro'
137
+ import PetitionMap from './Petition/map.astro'
138
+ import PetitionCoverage from './Petition/coverage.astro'
139
+ import Event from './Event/index.astro'
140
+ import EventCard from './Event/card.astro'
141
+ import Store from './Store/index.astro'
142
+ import StoreFeatured from './Store/featured.astro'
143
+ import Calendar from './Calendar/index.astro'
144
+ import CalendarAgenda from './Calendar/agenda.astro'
145
+ import Advocacy from './Advocacy/index.astro'
146
+ import AdvocacyCompact from './Advocacy/compact.astro'
147
+ import QuickDonate from './QuickDonate/index.astro'
148
+ import QuickDonateHero from './QuickDonate/hero.astro'
149
+ import QuickDonateBar from './QuickDonate/bar.astro'
150
+ import QuickDonateJar from './QuickDonate/jar.astro'
151
+ import QuickDonateBand from './QuickDonate/band.astro'
152
+ import QuickDonateLadder from './QuickDonate/ladder.astro'
153
+ import VoterTools from './VoterTools/index.astro'
154
+ import VoterToolsPolling from './VoterTools/polling.astro'
155
+ import VoterToolsDates from './VoterTools/dates.astro'
156
+ import SampleBallot from './SampleBallot/index.astro'
157
+ import SampleBallotCards from './SampleBallot/cards.astro'
158
+ import SampleBallotMeasures from './SampleBallot/measures.astro'
159
+ import Scorecard from './Scorecard/index.astro'
160
+ import ScorecardGrades from './Scorecard/grades.astro'
161
+ import ScorecardPromise from './Scorecard/promise.astro'
162
+ import Membership from './Membership/index.astro'
163
+ import MembershipTiers from './Membership/tiers.astro'
164
+ import MembershipCompare from './Membership/compare.astro'
165
+ import Faq from './Faq/index.astro'
166
+ import FaqTopics from './Faq/topics.astro'
167
+ import FaqCards from './Faq/cards.astro'
168
+ import Comparison from './Comparison/index.astro'
169
+ import ComparisonCards from './Comparison/cards.astro'
170
+ import ComparisonSpectrum from './Comparison/spectrum.astro'
171
+ import Stories from './Stories/index.astro'
172
+ import StoriesCards from './Stories/cards.astro'
173
+ import StoriesTimeline from './Stories/timeline.astro'
174
+ import ShareKit from './ShareKit/index.astro'
175
+ import ShareKitStrip from './ShareKit/strip.astro'
176
+ import ShareKitCompact from './ShareKit/compact.astro'
177
+ import Financials from './Financials/index.astro'
178
+ import FinancialsDonut from './Financials/donut.astro'
179
+ import FinancialsTable from './Financials/table.astro'
180
+ import Services from './Services/index.astro'
181
+ import ServicesList from './Services/list.astro'
182
+ import ServicesCompare from './Services/compare.astro'
183
+ import CaseStudies from './CaseStudies/index.astro'
184
+ import CaseStudiesGrid from './CaseStudies/grid.astro'
185
+ import CaseStudiesBeforeafter from './CaseStudies/beforeafter.astro'
186
+ import Resources from './Resources/index.astro'
187
+ import ResourcesFeatured from './Resources/featured.astro'
188
+ import ResourcesBand from './Resources/band.astro'
189
+ import Pathways from './Pathways/index.astro'
190
+ import PathwaysTabs from './Pathways/tabs.astro'
191
+ import PathwaysQuiz from './Pathways/quiz.astro'
192
+ import Portfolio from './Portfolio/index.astro'
193
+ import PortfolioFeatured from './Portfolio/featured.astro'
194
+ import PortfolioStrip from './Portfolio/strip.astro'
195
+ import MediaKit from './MediaKit/index.astro'
196
+ import MediaKitSpeaker from './MediaKit/speaker.astro'
197
+ import MediaKitPress from './MediaKit/press.astro'
198
+ import Booking from './Booking/index.astro'
199
+ import BookingList from './Booking/list.astro'
200
+
201
+ export const sections = {
202
+ Hero,
203
+ 'Hero:cover': HeroCover,
204
+ 'Hero:split': HeroSplit,
205
+ 'Hero:overlap': HeroOverlap,
206
+ 'Hero:statement': HeroStatement,
207
+ 'Hero:donate': HeroDonate,
208
+ 'Hero:video': HeroVideo,
209
+ 'Hero:rotating': HeroRotating,
210
+ 'Hero:field': HeroField,
211
+ About,
212
+ 'About:left': AboutLeft,
213
+ 'About:letter': AboutLetter,
214
+ 'About:portrait': AboutPortrait,
215
+ 'About:books': AboutBooks,
216
+ Issues,
217
+ 'Issues:steps': IssuesSteps,
218
+ 'Issues:numbered': IssuesNumbered,
219
+ 'Issues:rows': IssuesRows,
220
+ 'Issues:checklist': IssuesChecklist,
221
+ 'Issues:tabs': IssuesTabs,
222
+ 'Issues:drawer': IssuesDrawer,
223
+ StatCards,
224
+ 'StatCards:ribbon': StatCardsRibbon,
225
+ 'StatCards:feature': StatCardsFeature,
226
+ 'StatCards:wall': StatCardsWall,
227
+ Cta,
228
+ 'Cta:card': CtaCard,
229
+ 'Cta:banner': CtaBanner,
230
+ 'Cta:strip': CtaStrip,
231
+ 'Cta:photo': CtaPhoto,
232
+ QuoteStrip,
233
+ 'QuoteStrip:single': QuoteStripSingle,
234
+ 'QuoteStrip:ticker': QuoteStripTicker,
235
+ 'QuoteStrip:logos': QuoteStripLogos,
236
+ 'QuoteStrip:carousel': QuoteStripCarousel,
237
+ 'QuoteStrip:wall': QuoteStripWall,
238
+ Map: MapSection,
239
+ 'Map:map': MapSectionMap,
240
+ 'Map:bar': MapSectionBar,
241
+ MovementMap,
242
+ VideoEmbed,
243
+ 'VideoEmbed:landscape': VideoEmbedLandscape,
244
+ 'VideoEmbed:portrait': VideoEmbedPortrait,
245
+ 'VideoEmbed:square': VideoEmbedSquare,
246
+ PdfEmbed,
247
+ 'PdfEmbed:medium': PdfEmbedMedium,
248
+ 'PdfEmbed:tall': PdfEmbedTall,
249
+ 'PdfEmbed:card': PdfEmbedCard,
250
+ Progress,
251
+ 'Progress:ring': ProgressRing,
252
+ 'Progress:compact': ProgressCompact,
253
+ 'Progress:match': ProgressMatch,
254
+ Countdown,
255
+ Leaderboard,
256
+ SocialFeed,
257
+ MovementTicker,
258
+ EventsList,
259
+ 'EventsList:cards': EventsListCards,
260
+ 'EventsList:agenda': EventsListAgenda,
261
+ 'EventsList:calendar': EventsListCalendar,
262
+ 'EventsList:compact': EventsListCompact,
263
+ 'EventsList:shifts': EventsListShifts,
264
+ 'EventsList:week': EventsListWeek,
265
+ 'EventsList:cohorts': EventsListCohorts,
266
+ 'EventsList:map': EventsListMap,
267
+ Blog,
268
+ 'Blog:list': BlogList,
269
+ 'Blog:feature': BlogFeature,
270
+ Collection,
271
+ 'Collection:list': CollectionList,
272
+ 'Collection:compact': CollectionCompact,
273
+ 'Collection:feature': CollectionFeature,
274
+ 'Collection:library': CollectionLibrary,
275
+ 'Collection:shelves': CollectionShelves,
276
+ 'Collection:outline': CollectionOutline,
277
+ ContentPost,
278
+ 'ContentPost:banner': ContentPostBanner,
279
+ 'ContentPost:player': ContentPostPlayer,
280
+ 'ContentPost:theater': ContentPostTheater,
281
+ PlatformPlanks,
282
+ 'PlatformPlanks:columns': PlatformPlanksColumns,
283
+ 'PlatformPlanks:longread': PlatformPlanksLongread,
284
+ CandidateRoster,
285
+ 'CandidateRoster:ballot': CandidateRosterBallot,
286
+ 'CandidateRoster:compact': CandidateRosterCompact,
287
+ TeamGrid,
288
+ 'TeamGrid:board': TeamGridBoard,
289
+ 'TeamGrid:list': TeamGridList,
290
+ TakeoverBanner,
291
+ Donate,
292
+ 'Donate:story': DonateStory,
293
+ FormBlock,
294
+ 'FormBlock:wide': FormBlockWide,
295
+ PollBlock,
296
+ SignupCapture,
297
+ 'SignupCapture:band': SignupCaptureBand,
298
+ 'SignupCapture:inline': SignupCaptureInline,
299
+ Petition,
300
+ 'Petition:image': PetitionImage,
301
+ 'Petition:map': PetitionMap,
302
+ 'Petition:coverage': PetitionCoverage,
303
+ Event,
304
+ 'Event:card': EventCard,
305
+ Store,
306
+ 'Store:featured': StoreFeatured,
307
+ Calendar,
308
+ 'Calendar:agenda': CalendarAgenda,
309
+ Advocacy,
310
+ 'Advocacy:compact': AdvocacyCompact,
311
+ QuickDonate,
312
+ 'QuickDonate:hero': QuickDonateHero,
313
+ 'QuickDonate:bar': QuickDonateBar,
314
+ 'QuickDonate:jar': QuickDonateJar,
315
+ 'QuickDonate:band': QuickDonateBand,
316
+ 'QuickDonate:ladder': QuickDonateLadder,
317
+ VoterTools,
318
+ 'VoterTools:polling': VoterToolsPolling,
319
+ 'VoterTools:dates': VoterToolsDates,
320
+ SampleBallot,
321
+ 'SampleBallot:cards': SampleBallotCards,
322
+ 'SampleBallot:measures': SampleBallotMeasures,
323
+ Scorecard,
324
+ 'Scorecard:grades': ScorecardGrades,
325
+ 'Scorecard:promise': ScorecardPromise,
326
+ Membership,
327
+ 'Membership:tiers': MembershipTiers,
328
+ 'Membership:compare': MembershipCompare,
329
+ Faq,
330
+ 'Faq:topics': FaqTopics,
331
+ 'Faq:cards': FaqCards,
332
+ Comparison,
333
+ 'Comparison:cards': ComparisonCards,
334
+ 'Comparison:spectrum': ComparisonSpectrum,
335
+ Stories,
336
+ 'Stories:cards': StoriesCards,
337
+ 'Stories:timeline': StoriesTimeline,
338
+ ShareKit,
339
+ 'ShareKit:strip': ShareKitStrip,
340
+ 'ShareKit:compact': ShareKitCompact,
341
+ Financials,
342
+ 'Financials:donut': FinancialsDonut,
343
+ 'Financials:table': FinancialsTable,
344
+ Services,
345
+ 'Services:list': ServicesList,
346
+ 'Services:compare': ServicesCompare,
347
+ CaseStudies,
348
+ 'CaseStudies:grid': CaseStudiesGrid,
349
+ 'CaseStudies:beforeafter': CaseStudiesBeforeafter,
350
+ Resources,
351
+ 'Resources:featured': ResourcesFeatured,
352
+ 'Resources:band': ResourcesBand,
353
+ Pathways,
354
+ 'Pathways:tabs': PathwaysTabs,
355
+ 'Pathways:quiz': PathwaysQuiz,
356
+ Portfolio,
357
+ 'Portfolio:featured': PortfolioFeatured,
358
+ 'Portfolio:strip': PortfolioStrip,
359
+ MediaKit,
360
+ 'MediaKit:speaker': MediaKitSpeaker,
361
+ 'MediaKit:press': MediaKitPress,
362
+ Booking,
363
+ 'Booking:list': BookingList,
364
+ Classroom,
365
+ 'Classroom:list': ClassroomList,
366
+ Course,
367
+ 'Course:outline': CourseOutline,
368
+ Lesson,
369
+ 'Lesson:reading': LessonReading,
370
+ }
@@ -0,0 +1,39 @@
1
+ ---
2
+ // A BackGold module under its section head: the kicker and heading the
3
+ // section carries, then the module's frame (ModuleFrame). Petition, One event,
4
+ // Store, Calendar and Contact your legislators draw through this, each with
5
+ // its own card and starting height. A module with nothing to frame keeps its
6
+ // head and says it is not available (ModuleFrame).
7
+ import type { Section } from '@backgold/content'
8
+ import Band from '../Band.astro'
9
+ import SectionHead from '../SectionHead.astro'
10
+ import ModuleFrame from './ModuleFrame.astro'
11
+ import { text } from '../../../lib/format'
12
+
13
+ interface Props {
14
+ section: Section
15
+ layout: string
16
+ card?: boolean
17
+ height?: string
18
+ /** Draw the heading (false where the module draws its own header, a petition's image, map or coverage). */
19
+ head?: boolean
20
+ /** The width the module keeps on a wide screen; none is the full content width. */
21
+ narrow?: boolean
22
+ }
23
+
24
+ const { section, layout, card = false, height, head = true, narrow = false } = Astro.props
25
+ const kicker = text(section.copy.kicker)
26
+ const heading = text(section.copy.heading)
27
+ ---
28
+ <Band section={section} class:list={['headed-module', narrow && 'headed-module-narrow']}>
29
+ {(head || !section.embed) && <SectionHead kicker={kicker} heading={heading} more={[]} />}
30
+ <ModuleFrame embed={section.embed} band={section.band} type={section.type} layout={layout} card={card} title={heading ?? section.type} height={height} />
31
+ </Band>
32
+
33
+ <style>
34
+ :global(.headed-module-narrow .section-head),
35
+ :global(.headed-module-narrow .module) {
36
+ max-width: 40rem;
37
+ margin-inline: auto;
38
+ }
39
+ </style>