@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.
Files changed (349) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +12 -2
  3. package/dist/chunk-RJAVFRC6.js +67 -0
  4. package/dist/constants-BAIo_Q5U.d-lQbj1e1-.d.ts +48 -0
  5. package/dist/content-api-Cox1-wz5.d.ts +1096 -0
  6. package/dist/contract/content-api-examples.d.ts +72 -0
  7. package/dist/contract/content-api-examples.js +926 -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 +253 -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 +61 -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 +80 -0
  57. package/src/components/sections/About/index.astro +60 -0
  58. package/src/components/sections/About/left.astro +57 -0
  59. package/src/components/sections/About/letter.astro +111 -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 +126 -0
  102. package/src/components/sections/ContentPost/player.astro +254 -0
  103. package/src/components/sections/ContentPost/prose.astro +80 -0
  104. package/src/components/sections/ContentPost/theater.astro +329 -0
  105. package/src/components/sections/Countdown/index.astro +53 -0
  106. package/src/components/sections/Course/Bar.astro +46 -0
  107. package/src/components/sections/Course/CourseHead.astro +123 -0
  108. package/src/components/sections/Course/Crumbs.astro +44 -0
  109. package/src/components/sections/Course/Icon.astro +29 -0
  110. package/src/components/sections/Course/Ring.astro +62 -0
  111. package/src/components/sections/Course/Syllabus.astro +146 -0
  112. package/src/components/sections/Course/course.ts +146 -0
  113. package/src/components/sections/Course/index.astro +143 -0
  114. package/src/components/sections/Course/outline.astro +39 -0
  115. package/src/components/sections/Cta/banner.astro +64 -0
  116. package/src/components/sections/Cta/card.astro +88 -0
  117. package/src/components/sections/Cta/index.astro +31 -0
  118. package/src/components/sections/Cta/photo.astro +114 -0
  119. package/src/components/sections/Cta/strip.astro +91 -0
  120. package/src/components/sections/Donate/index.astro +136 -0
  121. package/src/components/sections/Donate/story.astro +7 -0
  122. package/src/components/sections/Event/card.astro +14 -0
  123. package/src/components/sections/Event/index.astro +14 -0
  124. package/src/components/sections/EventsList/AgendaMonths.astro +105 -0
  125. package/src/components/sections/EventsList/CalendarLine.astro +23 -0
  126. package/src/components/sections/EventsList/EventRows.astro +196 -0
  127. package/src/components/sections/EventsList/LiveCounts.astro +75 -0
  128. package/src/components/sections/EventsList/TypeTabs.astro +53 -0
  129. package/src/components/sections/EventsList/agenda.astro +55 -0
  130. package/src/components/sections/EventsList/calendar.astro +392 -0
  131. package/src/components/sections/EventsList/cards.astro +186 -0
  132. package/src/components/sections/EventsList/cohorts.astro +205 -0
  133. package/src/components/sections/EventsList/compact.astro +163 -0
  134. package/src/components/sections/EventsList/events.ts +168 -0
  135. package/src/components/sections/EventsList/index.astro +46 -0
  136. package/src/components/sections/EventsList/map.astro +436 -0
  137. package/src/components/sections/EventsList/shifts.astro +355 -0
  138. package/src/components/sections/EventsList/week.astro +361 -0
  139. package/src/components/sections/Faq/Contact.astro +63 -0
  140. package/src/components/sections/Faq/Questions.astro +98 -0
  141. package/src/components/sections/Faq/cards.astro +74 -0
  142. package/src/components/sections/Faq/faq.ts +101 -0
  143. package/src/components/sections/Faq/index.astro +49 -0
  144. package/src/components/sections/Faq/topics.astro +178 -0
  145. package/src/components/sections/Financials/Foot.astro +38 -0
  146. package/src/components/sections/Financials/Head.astro +47 -0
  147. package/src/components/sections/Financials/donut.astro +197 -0
  148. package/src/components/sections/Financials/financials.ts +52 -0
  149. package/src/components/sections/Financials/index.astro +148 -0
  150. package/src/components/sections/Financials/table.astro +157 -0
  151. package/src/components/sections/FormBlock/index.astro +33 -0
  152. package/src/components/sections/FormBlock/wide.astro +7 -0
  153. package/src/components/sections/Hero/cover.astro +176 -0
  154. package/src/components/sections/Hero/donate.astro +209 -0
  155. package/src/components/sections/Hero/field.astro +390 -0
  156. package/src/components/sections/Hero/index.astro +52 -0
  157. package/src/components/sections/Hero/overlap.astro +151 -0
  158. package/src/components/sections/Hero/rotating.astro +30 -0
  159. package/src/components/sections/Hero/split.astro +99 -0
  160. package/src/components/sections/Hero/statement.astro +55 -0
  161. package/src/components/sections/Hero/video.astro +399 -0
  162. package/src/components/sections/Issues/checklist.astro +204 -0
  163. package/src/components/sections/Issues/drawer.astro +237 -0
  164. package/src/components/sections/Issues/index.astro +115 -0
  165. package/src/components/sections/Issues/issues.ts +37 -0
  166. package/src/components/sections/Issues/numbered.astro +79 -0
  167. package/src/components/sections/Issues/rows.astro +137 -0
  168. package/src/components/sections/Issues/steps.astro +81 -0
  169. package/src/components/sections/Issues/tabs.astro +322 -0
  170. package/src/components/sections/Leaderboard/index.astro +29 -0
  171. package/src/components/sections/Lesson/Door.astro +121 -0
  172. package/src/components/sections/Lesson/LessonBody.astro +416 -0
  173. package/src/components/sections/Lesson/Rail.astro +182 -0
  174. package/src/components/sections/Lesson/Tracker.astro +137 -0
  175. package/src/components/sections/Lesson/index.astro +27 -0
  176. package/src/components/sections/Lesson/lesson.ts +233 -0
  177. package/src/components/sections/Lesson/reading.astro +21 -0
  178. package/src/components/sections/Map/CoverageLine.astro +19 -0
  179. package/src/components/sections/Map/RegionMap.astro +109 -0
  180. package/src/components/sections/Map/bar.astro +160 -0
  181. package/src/components/sections/Map/index.astro +192 -0
  182. package/src/components/sections/Map/map.astro +275 -0
  183. package/src/components/sections/MediaKit/BioCard.astro +108 -0
  184. package/src/components/sections/MediaKit/Downloads.astro +88 -0
  185. package/src/components/sections/MediaKit/index.astro +183 -0
  186. package/src/components/sections/MediaKit/kit.ts +140 -0
  187. package/src/components/sections/MediaKit/press.astro +189 -0
  188. package/src/components/sections/MediaKit/speaker.astro +205 -0
  189. package/src/components/sections/Membership/Benefits.astro +42 -0
  190. package/src/components/sections/Membership/Check.astro +12 -0
  191. package/src/components/sections/Membership/Price.astro +61 -0
  192. package/src/components/sections/Membership/compare.astro +312 -0
  193. package/src/components/sections/Membership/index.astro +281 -0
  194. package/src/components/sections/Membership/offers.ts +169 -0
  195. package/src/components/sections/Membership/tiers.astro +217 -0
  196. package/src/components/sections/MovementMap/index.astro +50 -0
  197. package/src/components/sections/MovementTicker/index.astro +43 -0
  198. package/src/components/sections/Pathways/Doors.astro +147 -0
  199. package/src/components/sections/Pathways/Head.astro +37 -0
  200. package/src/components/sections/Pathways/index.astro +27 -0
  201. package/src/components/sections/Pathways/pathways.ts +100 -0
  202. package/src/components/sections/Pathways/quiz.astro +286 -0
  203. package/src/components/sections/Pathways/tabs.astro +271 -0
  204. package/src/components/sections/PdfEmbed/card.astro +99 -0
  205. package/src/components/sections/PdfEmbed/index.astro +26 -0
  206. package/src/components/sections/PdfEmbed/medium.astro +7 -0
  207. package/src/components/sections/PdfEmbed/tall.astro +7 -0
  208. package/src/components/sections/Petition/coverage.astro +14 -0
  209. package/src/components/sections/Petition/image.astro +14 -0
  210. package/src/components/sections/Petition/index.astro +14 -0
  211. package/src/components/sections/Petition/map.astro +14 -0
  212. package/src/components/sections/PlatformPlanks/anchors.ts +66 -0
  213. package/src/components/sections/PlatformPlanks/columns.astro +171 -0
  214. package/src/components/sections/PlatformPlanks/index.astro +56 -0
  215. package/src/components/sections/PlatformPlanks/longread.astro +250 -0
  216. package/src/components/sections/PollBlock/index.astro +30 -0
  217. package/src/components/sections/Portfolio/featured.astro +343 -0
  218. package/src/components/sections/Portfolio/index.astro +571 -0
  219. package/src/components/sections/Portfolio/strip.astro +173 -0
  220. package/src/components/sections/Portfolio/work.ts +100 -0
  221. package/src/components/sections/Progress/MatchClock.astro +166 -0
  222. package/src/components/sections/Progress/compact.astro +150 -0
  223. package/src/components/sections/Progress/index.astro +32 -0
  224. package/src/components/sections/Progress/match.astro +126 -0
  225. package/src/components/sections/Progress/ring.astro +179 -0
  226. package/src/components/sections/QuickDonate/DonateCard.astro +149 -0
  227. package/src/components/sections/QuickDonate/Picker.astro +95 -0
  228. package/src/components/sections/QuickDonate/band.astro +164 -0
  229. package/src/components/sections/QuickDonate/bar.astro +208 -0
  230. package/src/components/sections/QuickDonate/donate.ts +126 -0
  231. package/src/components/sections/QuickDonate/hero.astro +143 -0
  232. package/src/components/sections/QuickDonate/index.astro +73 -0
  233. package/src/components/sections/QuickDonate/jar.astro +225 -0
  234. package/src/components/sections/QuickDonate/ladder.astro +248 -0
  235. package/src/components/sections/QuoteStrip/carousel.astro +340 -0
  236. package/src/components/sections/QuoteStrip/index.astro +58 -0
  237. package/src/components/sections/QuoteStrip/logos.astro +226 -0
  238. package/src/components/sections/QuoteStrip/quotes.ts +61 -0
  239. package/src/components/sections/QuoteStrip/single.astro +92 -0
  240. package/src/components/sections/QuoteStrip/ticker.astro +319 -0
  241. package/src/components/sections/QuoteStrip/wall.astro +113 -0
  242. package/src/components/sections/Resources/band.astro +93 -0
  243. package/src/components/sections/Resources/featured.astro +239 -0
  244. package/src/components/sections/Resources/index.astro +225 -0
  245. package/src/components/sections/Resources/resources.ts +92 -0
  246. package/src/components/sections/SampleBallot/Position.astro +39 -0
  247. package/src/components/sections/SampleBallot/ballot.ts +92 -0
  248. package/src/components/sections/SampleBallot/cards.astro +299 -0
  249. package/src/components/sections/SampleBallot/index.astro +326 -0
  250. package/src/components/sections/SampleBallot/measures.astro +172 -0
  251. package/src/components/sections/Scorecard/grades.astro +141 -0
  252. package/src/components/sections/Scorecard/index.astro +294 -0
  253. package/src/components/sections/Scorecard/promise.astro +167 -0
  254. package/src/components/sections/Scorecard/votes.ts +83 -0
  255. package/src/components/sections/SectionHead.astro +31 -0
  256. package/src/components/sections/Services/Button.astro +24 -0
  257. package/src/components/sections/Services/Check.astro +12 -0
  258. package/src/components/sections/Services/Includes.astro +42 -0
  259. package/src/components/sections/Services/compare.astro +328 -0
  260. package/src/components/sections/Services/index.astro +187 -0
  261. package/src/components/sections/Services/list.astro +181 -0
  262. package/src/components/sections/Services/services.ts +80 -0
  263. package/src/components/sections/ShareKit/Actions.astro +71 -0
  264. package/src/components/sections/ShareKit/Buttons.astro +62 -0
  265. package/src/components/sections/ShareKit/compact.astro +123 -0
  266. package/src/components/sections/ShareKit/index.astro +160 -0
  267. package/src/components/sections/ShareKit/share.ts +60 -0
  268. package/src/components/sections/ShareKit/strip.astro +173 -0
  269. package/src/components/sections/SignupCapture/band.astro +7 -0
  270. package/src/components/sections/SignupCapture/index.astro +103 -0
  271. package/src/components/sections/SignupCapture/inline.astro +7 -0
  272. package/src/components/sections/SocialFeed/index.astro +34 -0
  273. package/src/components/sections/StatCards/feature.astro +143 -0
  274. package/src/components/sections/StatCards/index.astro +51 -0
  275. package/src/components/sections/StatCards/ribbon.astro +113 -0
  276. package/src/components/sections/StatCards/wall.astro +177 -0
  277. package/src/components/sections/Store/featured.astro +14 -0
  278. package/src/components/sections/Store/index.astro +14 -0
  279. package/src/components/sections/Stories/Status.astro +42 -0
  280. package/src/components/sections/Stories/StoryCards.astro +171 -0
  281. package/src/components/sections/Stories/cards.astro +42 -0
  282. package/src/components/sections/Stories/index.astro +238 -0
  283. package/src/components/sections/Stories/stories.ts +97 -0
  284. package/src/components/sections/Stories/timeline.astro +135 -0
  285. package/src/components/sections/TeamGrid/board.astro +280 -0
  286. package/src/components/sections/TeamGrid/index.astro +71 -0
  287. package/src/components/sections/TeamGrid/list.astro +306 -0
  288. package/src/components/sections/TeamGrid/people.ts +178 -0
  289. package/src/components/sections/VideoEmbed/index.astro +52 -0
  290. package/src/components/sections/VideoEmbed/landscape.astro +7 -0
  291. package/src/components/sections/VideoEmbed/portrait.astro +7 -0
  292. package/src/components/sections/VideoEmbed/square.astro +7 -0
  293. package/src/components/sections/VoterTools/DaysLeft.astro +33 -0
  294. package/src/components/sections/VoterTools/Lookup.astro +43 -0
  295. package/src/components/sections/VoterTools/dates.astro +153 -0
  296. package/src/components/sections/VoterTools/index.astro +231 -0
  297. package/src/components/sections/VoterTools/polling.astro +144 -0
  298. package/src/components/sections/VoterTools/voter-tools.ts +71 -0
  299. package/src/components/sections/index.ts +373 -0
  300. package/src/components/sections/modules/Headed.astro +39 -0
  301. package/src/components/sections/modules/ModuleFrame.astro +181 -0
  302. package/src/components/store/CollectionPage.astro +40 -0
  303. package/src/components/store/ProductCard.astro +32 -0
  304. package/src/components/store/ProductGrid.astro +16 -0
  305. package/src/components/store/ProductPage.astro +146 -0
  306. package/src/components/store/StorePage.astro +137 -0
  307. package/src/components/store/StoreScript.astro +572 -0
  308. package/src/components/volunteer/ShiftLive.astro +90 -0
  309. package/src/components/volunteer/detail.astro +247 -0
  310. package/src/components/volunteer/list.astro +298 -0
  311. package/src/components/volunteer/props.ts +21 -0
  312. package/src/env.d.ts +22 -0
  313. package/src/index.d.ts +10 -0
  314. package/src/index.js +63 -0
  315. package/src/layouts/Site.astro +387 -0
  316. package/src/lib/academy.ts +146 -0
  317. package/src/lib/brand.ts +534 -0
  318. package/src/lib/chrome.ts +121 -0
  319. package/src/lib/donate-frame.ts +104 -0
  320. package/src/lib/entries.ts +190 -0
  321. package/src/lib/env.ts +34 -0
  322. package/src/lib/event-map-draw.ts +91 -0
  323. package/src/lib/events.ts +476 -0
  324. package/src/lib/fonts.ts +116 -0
  325. package/src/lib/footer.ts +24 -0
  326. package/src/lib/format.ts +160 -0
  327. package/src/lib/geo.ts +131 -0
  328. package/src/lib/live.ts +55 -0
  329. package/src/lib/menu.ts +48 -0
  330. package/src/lib/petition-text.ts +29 -0
  331. package/src/lib/reading.ts +17 -0
  332. package/src/lib/regions.ts +215 -0
  333. package/src/lib/section.ts +105 -0
  334. package/src/lib/shifts.ts +187 -0
  335. package/src/lib/store.ts +521 -0
  336. package/src/lib/stream-time.ts +20 -0
  337. package/src/lib/stream.ts +141 -0
  338. package/src/lib/visitor.ts +54 -0
  339. package/src/routes/catch-all.astro +435 -0
  340. package/src/routes/form.astro +30 -0
  341. package/src/routes/live.astro +49 -0
  342. package/src/routes/not-found.astro +18 -0
  343. package/src/routes/preview.astro +60 -0
  344. package/src/routes/setup.astro +62 -0
  345. package/src/routes/volunteer-shift.astro +61 -0
  346. package/src/styles/entries.css +784 -0
  347. package/src/styles/site.css +1910 -0
  348. package/src/styles/store.css +634 -0
  349. package/src/template.ts +182 -0
@@ -0,0 +1,215 @@
1
+ ---
2
+ // The /live page as the kit draws it (routes/live.astro; a template's
3
+ // `livePage` draws it in its place), from LivePageProps (lib/stream.ts), in
4
+ // one of three states:
5
+ //
6
+ // live the stream in YouTube's player at the top (16:9, playing on
7
+ // arrival), the title as the page's h1 under it, "Live now ·
8
+ // since <time>" after a dot in the state red, and Open on
9
+ // YouTube; the live chat beside them on a wide screen, under them
10
+ // on a phone.
11
+ // upcoming the stream's still with a play mark, opening it on YouTube; the
12
+ // title as the h1, "Next live: <day and time>", Open on YouTube.
13
+ // off "Not live right now", one line ("When <channel> goes live, the
14
+ // stream plays here."), and the three newest videos as the video
15
+ // list's cards, with All videos.
16
+ //
17
+ // The layout draws the page's areas around it in every state (the sign-up
18
+ // above the footer, say). Times are written in UTC and again in the visitor's
19
+ // own zone (LocalTime).
20
+ import VideoCards from '../entries/video/cards.astro'
21
+ import LocalTime from './LocalTime.astro'
22
+ import type { LivePageProps } from '../../lib/stream'
23
+
24
+ type Props = LivePageProps
25
+
26
+ const { stream, videos, videoList, channel } = Astro.props
27
+ ---
28
+ <div class="live-page" data-live-state={stream?.status ?? 'off'}>
29
+ {stream?.status === 'live' ? (
30
+ <div class="live-stage">
31
+ <div class="live-player">
32
+ <iframe src={stream.playerSrc} title={stream.title} allow="autoplay; encrypted-media; picture-in-picture; fullscreen" allowfullscreen referrerpolicy="strict-origin-when-cross-origin"></iframe>
33
+ </div>
34
+ <div class="live-words">
35
+ <h1>{stream.title}</h1>
36
+ <p class="live-status">
37
+ <span class="live-dot" aria-hidden="true"></span>
38
+ <span>Live now{stream.startedAt && stream.startedText && <> · since <LocalTime at={stream.startedAt} text={stream.startedText} moment="time" /></>}</span>
39
+ </p>
40
+ <p class="live-actions"><a class="button button-quiet" href={stream.watchUrl} rel="noopener">Open on YouTube</a></p>
41
+ </div>
42
+ <div class="live-chat">
43
+ <iframe src={stream.chatSrc} title={`Live chat: ${stream.title}`}></iframe>
44
+ </div>
45
+ </div>
46
+ ) : stream ? (
47
+ <div class="live-upcoming">
48
+ <a class="live-still" href={stream.watchUrl} rel="noopener">
49
+ <img src={stream.still} alt="" />
50
+ <span class="live-play" aria-hidden="true"></span>
51
+ <span class="visually-hidden">{stream.title} on YouTube</span>
52
+ </a>
53
+ <div class="live-words">
54
+ <h1>{stream.title}</h1>
55
+ <p class="live-status">
56
+ <span>Next live: {stream.scheduledAt && stream.scheduledText ? <LocalTime at={stream.scheduledAt} text={stream.scheduledText} moment="day" /> : 'soon'}</span>
57
+ </p>
58
+ <p class="live-actions"><a class="button button-quiet" href={stream.watchUrl} rel="noopener">Open on YouTube</a></p>
59
+ </div>
60
+ </div>
61
+ ) : (
62
+ <div class="live-off">
63
+ <h1>Not live right now</h1>
64
+ <p class="lede">When {channel} goes live, the stream plays here.</p>
65
+ {videos.length > 0 && (
66
+ <section class="live-newest" aria-labelledby="live-newest">
67
+ <div class="live-newest-head">
68
+ <h2 id="live-newest">Newest videos</h2>
69
+ {videoList && <a href={videoList.path}>All videos</a>}
70
+ </div>
71
+ <VideoCards entries={videos} level={3} />
72
+ </section>
73
+ )}
74
+ </div>
75
+ )}
76
+ </div>
77
+
78
+ <style>
79
+ .live-page {
80
+ max-width: calc(var(--content) + 2 * var(--gutter));
81
+ margin: 0 auto;
82
+ padding: clamp(1.25rem, 1rem + 1.5vw, 2.25rem) var(--gutter) var(--space);
83
+ }
84
+ .live-page h1 {
85
+ margin: 0;
86
+ font-size: clamp(1.875rem, 1.35rem + 1.8vw, 2.875rem);
87
+ line-height: 1.08;
88
+ }
89
+ .live-stage {
90
+ display: grid;
91
+ grid-template-areas: 'player' 'words' 'chat';
92
+ gap: 1.5rem;
93
+ }
94
+ .live-player {
95
+ grid-area: player;
96
+ position: relative;
97
+ aspect-ratio: 16 / 9;
98
+ overflow: hidden;
99
+ border-radius: var(--radius-card);
100
+ background: var(--band-contrast);
101
+ }
102
+ .live-player iframe {
103
+ position: absolute;
104
+ inset: 0;
105
+ width: 100%;
106
+ height: 100%;
107
+ border: 0;
108
+ }
109
+ .live-stage .live-words {
110
+ grid-area: words;
111
+ }
112
+ .live-status {
113
+ display: flex;
114
+ flex-wrap: wrap;
115
+ align-items: center;
116
+ gap: 0.5rem;
117
+ margin: 0.875rem 0 0;
118
+ color: var(--muted);
119
+ font-size: var(--text-sm);
120
+ font-weight: 600;
121
+ }
122
+ .live-actions {
123
+ margin: 1.25rem 0 0;
124
+ }
125
+ .live-chat {
126
+ grid-area: chat;
127
+ display: flex;
128
+ min-height: 28rem;
129
+ overflow: hidden;
130
+ border: 1px solid var(--line);
131
+ border-radius: var(--radius-card);
132
+ background: var(--surface);
133
+ }
134
+ .live-chat iframe {
135
+ flex: 1;
136
+ width: 100%;
137
+ min-height: 28rem;
138
+ border: 0;
139
+ }
140
+ .live-upcoming {
141
+ display: grid;
142
+ gap: 1.5rem;
143
+ align-items: center;
144
+ }
145
+ .live-still {
146
+ position: relative;
147
+ display: block;
148
+ aspect-ratio: 16 / 9;
149
+ overflow: hidden;
150
+ border-radius: var(--radius-card);
151
+ background: var(--band-contrast);
152
+ }
153
+ .live-still img {
154
+ display: block;
155
+ width: 100%;
156
+ height: 100%;
157
+ object-fit: cover;
158
+ }
159
+ .live-play {
160
+ position: absolute;
161
+ left: 50%;
162
+ top: 50%;
163
+ width: 4.5rem;
164
+ height: 4.5rem;
165
+ border-radius: 50%;
166
+ background: var(--button);
167
+ translate: -50% -50%;
168
+ }
169
+ .live-play::after {
170
+ content: '';
171
+ position: absolute;
172
+ inset: 0;
173
+ margin: auto;
174
+ width: 30%;
175
+ height: 34%;
176
+ translate: 10% 0;
177
+ background: var(--button-ink);
178
+ clip-path: polygon(0 0, 100% 50%, 0 100%);
179
+ }
180
+ .live-off .lede {
181
+ margin: 1rem 0 0;
182
+ }
183
+ .live-newest {
184
+ margin-top: clamp(2.25rem, 1.5rem + 2vw, 3.5rem);
185
+ }
186
+ .live-newest-head {
187
+ display: flex;
188
+ flex-wrap: wrap;
189
+ align-items: baseline;
190
+ justify-content: space-between;
191
+ gap: 0.5rem 1rem;
192
+ margin-bottom: 1.25rem;
193
+ }
194
+ .live-newest-head h2 {
195
+ margin: 0;
196
+ }
197
+ .live-newest-head a {
198
+ color: var(--link);
199
+ font-weight: 700;
200
+ }
201
+ @media (min-width: 56rem) {
202
+ .live-upcoming {
203
+ grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
204
+ gap: 2.5rem;
205
+ }
206
+ }
207
+ @media (min-width: 64rem) {
208
+ .live-stage {
209
+ grid-template-columns: minmax(0, 1fr) 22rem;
210
+ grid-template-rows: auto auto;
211
+ grid-template-areas: 'player chat' 'words chat';
212
+ gap: 1.5rem 1.75rem;
213
+ }
214
+ }
215
+ </style>
@@ -0,0 +1,29 @@
1
+ ---
2
+ // A live stream's moment as the visitor's own clock reads it: the server
3
+ // writes it in UTC (`text`, lib/stream.ts), and a few lines of script write it
4
+ // again in the visitor's zone, in the same words (lib/stream-time.ts), once
5
+ // the page loads. Without script the UTC words stay. One copy of the script
6
+ // serves every moment on the page.
7
+ import type { StreamMoment } from '../../lib/stream-time'
8
+
9
+ interface Props {
10
+ /** The moment, ISO 8601. */
11
+ at: string
12
+ /** The moment in words in UTC. */
13
+ text: string
14
+ moment: StreamMoment
15
+ }
16
+
17
+ const { at, text, moment } = Astro.props
18
+ ---
19
+ <time datetime={at} data-bg-local={moment}>{text}</time>
20
+
21
+ <script>
22
+ import { streamTime, type StreamMoment } from '../../lib/stream-time'
23
+
24
+ for (const node of document.querySelectorAll<HTMLTimeElement>('time[data-bg-local]')) {
25
+ const moment = node.dataset.bgLocal as StreamMoment
26
+ const local = streamTime(node.dateTime, moment === 'day' ? 'day' : 'time')
27
+ if (local) node.textContent = local
28
+ }
29
+ </script>
@@ -0,0 +1,188 @@
1
+ ---
2
+ // About, 'books' layout (board S19, B, "Books shelf"): the person's card at
3
+ // the left, a panel filled in the contrast band's colours (on a section
4
+ // already on the contrast band, a tint of its ink) with the kicker, their
5
+ // name (the heading) in the display face, their role, the story and the
6
+ // section's one button; at the right the book rows as a shelf, three across
7
+ // (two on a phone): each book's cover (2:3; without one, a panel on the
8
+ // band's surface with the title set on it), its title, the year and the
9
+ // detail muted under it ("2026 · Pine Valley Press"), and "Get the book"
10
+ // when the row has an address. On a phone the card sits over the shelf. A
11
+ // card with no words is left out and the shelf takes the row, and the card
12
+ // takes it alone with no book; a shelf alone runs four across on a wide
13
+ // screen. Nothing is drawn with neither.
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 { buttonOf, credentialsOf } from './credentials'
19
+ import { prose, text } from '../../../lib/format'
20
+
21
+ type Props = ComponentProps<typeof Default>
22
+
23
+ const { section } = Astro.props
24
+ const kicker = text(section.copy.kicker)
25
+ const heading = text(section.copy.heading)
26
+ const role = text(section.copy.role)
27
+ const button = buttonOf(section)
28
+ const { books } = credentialsOf(section)
29
+ const card = !!(kicker || heading || role || prose(section.copy.body) || button)
30
+ ---
31
+ {(card || books.length > 0) && (
32
+ <Band section={section} class="about about-books">
33
+ <div class:list={['books', card && books.length > 0 && 'books-split']}>
34
+ {card && (
35
+ <div class="books-card bg-band-contrast">
36
+ {kicker && <p class="kicker">{kicker}</p>}
37
+ {heading && <h2 class="books-name">{heading}</h2>}
38
+ {role && <p class="books-role">{role}</p>}
39
+ <Prose value={section.copy.body} class="books-body" />
40
+ {button && (
41
+ <p class="actions">
42
+ <a class="button" href={button.href} rel={button.rel}>{button.label}</a>
43
+ </p>
44
+ )}
45
+ </div>
46
+ )}
47
+ {books.length > 0 && (
48
+ <ul class="books-shelf" role="list">
49
+ {books.map((book) => (
50
+ <li class="book">
51
+ {book.cover ? (
52
+ <img class="book-cover" src={book.cover} alt="" loading="lazy" decoding="async" />
53
+ ) : (
54
+ <div class="book-cover book-blank" aria-hidden="true"><span>{book.title}</span></div>
55
+ )}
56
+ <h3 class="book-title">{book.title}</h3>
57
+ {(book.year || book.detail) && (
58
+ <p class="book-meta">
59
+ {book.year && (book.datetime ? <time datetime={book.datetime}>{book.year}</time> : book.year)}
60
+ {book.year && book.detail && ' · '}
61
+ {book.detail}
62
+ </p>
63
+ )}
64
+ {book.link && (
65
+ <p class="book-get">
66
+ <a href={book.link.href} rel={book.link.rel}>Get the book<span class="visually-hidden">: {book.title}</span><span aria-hidden="true"> →</span></a>
67
+ </p>
68
+ )}
69
+ </li>
70
+ ))}
71
+ </ul>
72
+ )}
73
+ </div>
74
+ </Band>
75
+ )}
76
+
77
+ <style>
78
+ .books {
79
+ display: grid;
80
+ gap: 1.75rem;
81
+ }
82
+ .books-card {
83
+ min-width: 0;
84
+ padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
85
+ border-radius: var(--radius-card);
86
+ background: var(--bg-band-background);
87
+ color: var(--bg-band-color);
88
+ }
89
+ :global(.bg-band-contrast) .books-card {
90
+ border: 1px solid var(--line);
91
+ background: color-mix(in srgb, var(--ink) 7%, transparent);
92
+ }
93
+ .books-card > :last-child {
94
+ margin-bottom: 0;
95
+ }
96
+ .books-name {
97
+ margin-bottom: 0.375rem;
98
+ }
99
+ .books-role {
100
+ margin: 0 0 1rem;
101
+ color: var(--muted);
102
+ font-weight: 600;
103
+ }
104
+ .books-card :global(.books-body) {
105
+ color: var(--muted);
106
+ }
107
+ .books-card :global(.books-body) > :global(:last-child) {
108
+ margin-bottom: 0;
109
+ }
110
+ .books-card .actions {
111
+ margin-top: 1.5rem;
112
+ }
113
+
114
+ .books-shelf {
115
+ display: grid;
116
+ grid-template-columns: repeat(2, minmax(0, 1fr));
117
+ gap: 1.75rem 1rem;
118
+ align-content: start;
119
+ margin: 0;
120
+ padding: 0;
121
+ list-style: none;
122
+ }
123
+ .book {
124
+ min-width: 0;
125
+ }
126
+ .book > * {
127
+ margin: 0;
128
+ }
129
+ .book-cover {
130
+ display: block;
131
+ width: 100%;
132
+ aspect-ratio: 2 / 3;
133
+ object-fit: cover;
134
+ border-radius: var(--radius);
135
+ box-shadow: var(--shadow);
136
+ }
137
+ /* No cover: the title set on the band's surface, where the cover would be. */
138
+ .book-blank {
139
+ display: flex;
140
+ align-items: flex-end;
141
+ padding: 1rem;
142
+ border: 1px solid var(--line);
143
+ background: var(--surface);
144
+ box-shadow: none;
145
+ color: var(--ink);
146
+ font-family: var(--font-display);
147
+ font-size: clamp(1.0625rem, 0.95rem + 0.5vw, 1.375rem);
148
+ font-weight: 700;
149
+ line-height: 1.15;
150
+ overflow-wrap: anywhere;
151
+ }
152
+ .book .book-title {
153
+ margin-top: 0.875rem;
154
+ font-family: var(--font);
155
+ font-size: var(--text);
156
+ font-weight: 700;
157
+ line-height: 1.35;
158
+ letter-spacing: 0;
159
+ }
160
+ .book .book-meta {
161
+ margin-top: 0.125rem;
162
+ color: var(--muted);
163
+ font-size: var(--text-sm);
164
+ }
165
+ .book .book-get {
166
+ margin-top: 0.5rem;
167
+ font-size: var(--text-sm);
168
+ font-weight: 700;
169
+ }
170
+
171
+ @media (min-width: 40rem) {
172
+ .books-shelf {
173
+ grid-template-columns: repeat(3, minmax(0, 1fr));
174
+ gap: 2rem 1.25rem;
175
+ }
176
+ }
177
+ @media (min-width: 56rem) {
178
+ .books-split {
179
+ grid-template-columns: minmax(16rem, 1fr) minmax(0, 2fr);
180
+ gap: clamp(1.75rem, 3vw, 2.5rem);
181
+ align-items: start;
182
+ }
183
+ /* A shelf with no card beside it: four across, so a cover stays book-sized. */
184
+ .books:not(.books-split) .books-shelf {
185
+ grid-template-columns: repeat(4, minmax(0, 1fr));
186
+ }
187
+ }
188
+ </style>
@@ -0,0 +1,80 @@
1
+ // An About section as its portrait and books layouts read it: the person's
2
+ // words from the copy, and the authored list (`credentials`, prop `items`)
3
+ // sorted by each row's `kind`:
4
+ //
5
+ // - 'credential': a line of what the person has done or holds ("Former
6
+ // campaign manager"), its `detail` under it, its `year` before it, its
7
+ // `href` on the label;
8
+ // - 'book': a book the person wrote, its `imageUrl` the cover, its `year`
9
+ // and `detail` (the publisher, "New") the line under the title, its `href`
10
+ // where to get it;
11
+ // - 'milestone': a step of the person's story, its `year` over its `label`,
12
+ // its `detail` under.
13
+ //
14
+ // Each kind keeps the operator's row order. A row with no label, or with a
15
+ // kind that is not one of the three, is left out. A year is drawn as typed;
16
+ // one that is a plain four-digit year is also given to `<time datetime>`.
17
+ // The pull quote (`quote`) is drawn without any quote marks typed around it,
18
+ // since the layout sets it as a quotation, and its source as written.
19
+
20
+ import type { Section } from '@backgold/content'
21
+ import { safeSrc } from '@backgold/astro/server'
22
+ import { linkOf, links, rows, type Link } from '../../../lib/section'
23
+ import { text } from '../../../lib/format'
24
+
25
+ export interface Credential {
26
+ label: string
27
+ /** The label's link, when the row has a safe address. */
28
+ link: Link | null
29
+ detail: string | null
30
+ year: string | null
31
+ /** The year as a `<time datetime>` value, when it is a four-digit year. */
32
+ datetime: string | null
33
+ }
34
+
35
+ export interface Book {
36
+ title: string
37
+ /** Where to get the book, when the row has a safe address. */
38
+ link: Link | null
39
+ detail: string | null
40
+ year: string | null
41
+ datetime: string | null
42
+ /** The cover's address, or null for none or an unsafe one. */
43
+ cover: string | null
44
+ }
45
+
46
+ export interface Credentials {
47
+ credentials: Credential[]
48
+ books: Book[]
49
+ milestones: Credential[]
50
+ }
51
+
52
+ const trimmed = (value: unknown): string | null => text(value)?.trim() || null
53
+
54
+ const yearOf = (year: string | null): string | null => (year && /^\d{4}$/.test(year) ? year : null)
55
+
56
+ /** The section's credential, book and milestone rows, each in row order. */
57
+ export function credentialsOf(section: Section): Credentials {
58
+ const out: Credentials = { credentials: [], books: [], milestones: [] }
59
+ for (const row of rows(section)) {
60
+ const label = trimmed(row.label)
61
+ if (!label) continue
62
+ const year = trimmed(row.year)
63
+ const line: Credential = { label, link: linkOf(label, row.href), detail: trimmed(row.detail), year, datetime: yearOf(year) }
64
+ if (row.kind === 'credential') out.credentials.push(line)
65
+ else if (row.kind === 'milestone') out.milestones.push(line)
66
+ else if (row.kind === 'book') out.books.push({ ...line, title: label, cover: safeSrc(row.imageUrl) })
67
+ }
68
+ return out
69
+ }
70
+
71
+ /** The pull quote and its source; null without a quote. */
72
+ export function quoteOf(section: Section): { quote: string; source: string | null } | null {
73
+ const quote = trimmed(section.copy.quote)?.replace(/^["“”']+|["“”']+$/g, '').trim()
74
+ return quote ? { quote, source: trimmed(section.copy.quoteSource) } : null
75
+ }
76
+
77
+ /** The section's one button (`buttonLabel` → `buttonHref`), or null. */
78
+ export function buttonOf(section: Section): Link | null {
79
+ return links(section)[0] ?? null
80
+ }
@@ -0,0 +1,60 @@
1
+ ---
2
+ // About, 'right' layout, the default (Photo right; board A10-petition,
3
+ // section 2): the heading and the story on the left, the photo on the right;
4
+ // on a phone the photo follows the words. Without a photo the words take
5
+ // the column alone. A photo crops to fill its frame; with the photo
6
+ // treatment 'badge' or 'plain' (a logo) it shows whole in it (lib/section.ts
7
+ // photoStyleOf, styles/site.css). 'left' and 'letter' are their own files beside this one.
8
+ import type { Section } from '@backgold/content'
9
+ import Band from '../Band.astro'
10
+ import Prose from '../../Prose.astro'
11
+ import { media, photoStyleOf } from '../../../lib/section'
12
+ import { text } from '../../../lib/format'
13
+
14
+ interface Props {
15
+ section: Section
16
+ variant?: string
17
+ }
18
+
19
+ const { section } = Astro.props
20
+ const heading = text(section.copy.heading)
21
+ const photo = media(section, 'photoUrl')
22
+ const style = photoStyleOf(section)
23
+ ---
24
+ <Band section={section} class="about">
25
+ <div class:list={['about-right', photo && 'about-right-photo']}>
26
+ <div class="about-right-words">
27
+ {heading && <h2>{heading}</h2>}
28
+ <Prose value={section.copy.body} />
29
+ </div>
30
+ {photo && <img class:list={['about-right-image', style !== 'photo' && `photo-${style}`]} src={photo.url} alt={photo.alt} loading="lazy" decoding="async" />}
31
+ </div>
32
+ </Band>
33
+
34
+ <style>
35
+ .about-right {
36
+ display: grid;
37
+ gap: 2rem;
38
+ }
39
+ .about-right-words > :last-child {
40
+ margin-bottom: 0;
41
+ }
42
+ .about-right-image {
43
+ display: block;
44
+ width: 100%;
45
+ max-width: 26rem;
46
+ aspect-ratio: 4 / 4.4;
47
+ object-fit: cover;
48
+ border-radius: calc(var(--radius) * 2);
49
+ }
50
+ @media (min-width: 48rem) {
51
+ .about-right-photo {
52
+ grid-template-columns: minmax(0, 1fr) minmax(16rem, 22.5rem);
53
+ gap: clamp(2.5rem, 4vw, 3.5rem);
54
+ align-items: start;
55
+ }
56
+ .about-right-image {
57
+ max-width: none;
58
+ }
59
+ }
60
+ </style>
@@ -0,0 +1,57 @@
1
+ ---
2
+ // About, 'left' layout (Photo left; board A11-contact, section 3): a square
3
+ // photo on the left, the heading and the story on the right; on a phone the
4
+ // photo comes first. Without a photo the words take the column alone. The
5
+ // photo treatment 'badge' or 'plain' shows the whole picture in the square
6
+ // (lib/section.ts photoStyleOf).
7
+ import type { ComponentProps } from 'astro/types'
8
+ import Band from '../Band.astro'
9
+ import Prose from '../../Prose.astro'
10
+ import type Default from './index.astro'
11
+ import { media, photoStyleOf } from '../../../lib/section'
12
+ import { text } from '../../../lib/format'
13
+
14
+ type Props = ComponentProps<typeof Default>
15
+
16
+ const { section } = Astro.props
17
+ const heading = text(section.copy.heading)
18
+ const photo = media(section, 'photoUrl')
19
+ const style = photoStyleOf(section)
20
+ ---
21
+ <Band section={section} class="about">
22
+ <div class:list={['about-left', photo && 'about-left-photo']}>
23
+ {photo && <img class:list={['about-left-image', style !== 'photo' && `photo-${style}`]} src={photo.url} alt={photo.alt} loading="lazy" decoding="async" />}
24
+ <div class="about-left-words">
25
+ {heading && <h2>{heading}</h2>}
26
+ <Prose value={section.copy.body} />
27
+ </div>
28
+ </div>
29
+ </Band>
30
+
31
+ <style>
32
+ .about-left {
33
+ display: grid;
34
+ gap: 2rem;
35
+ }
36
+ .about-left-words > :last-child {
37
+ margin-bottom: 0;
38
+ }
39
+ .about-left-image {
40
+ display: block;
41
+ width: 100%;
42
+ max-width: 22rem;
43
+ aspect-ratio: 1;
44
+ object-fit: cover;
45
+ border-radius: calc(var(--radius) * 2);
46
+ }
47
+ @media (min-width: 48rem) {
48
+ .about-left-photo {
49
+ grid-template-columns: minmax(14rem, 18.75rem) minmax(0, 1fr);
50
+ gap: clamp(2.5rem, 4vw, 3.5rem);
51
+ align-items: start;
52
+ }
53
+ .about-left-image {
54
+ max-width: none;
55
+ }
56
+ }
57
+ </style>