@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,92 @@
1
+ ---
2
+ // QuoteStrip, 'single' layout (Single; board A2-about-platform, section 5):
3
+ // one quote, large and centred in the display serif, with who said it under
4
+ // it and, muted, their role or publication ("Editorial board, September";
5
+ // C4 draws the same). It draws the section's first quote; the heading, when there is one,
6
+ // sits small above it. Nothing is drawn when there is neither a heading nor
7
+ // a quote.
8
+ import type { ComponentProps } from 'astro/types'
9
+ import Band from '../Band.astro'
10
+ import type Default from './index.astro'
11
+ import { rows } 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 [quote] = rows(section)
19
+ .map((row) => ({ quote: text(row.quote), attribution: text(row.attribution), role: text(row.role) }))
20
+ .filter((q): q is { quote: string; attribution: string | null; role: string | null } => q.quote !== null)
21
+ ---
22
+ {(heading || quote) && (
23
+ <Band section={section} class="quotes">
24
+ <div class="single">
25
+ {heading && <h2 class="single-heading">{heading}</h2>}
26
+ {quote && (
27
+ <figure class="single-quote">
28
+ <blockquote><p>{quote.quote}</p></blockquote>
29
+ {(quote.attribution || quote.role) && (
30
+ <figcaption>
31
+ {quote.attribution && <span class="single-name">{quote.attribution}</span>}
32
+ {quote.role && <span class="single-role">{quote.role}</span>}
33
+ </figcaption>
34
+ )}
35
+ </figure>
36
+ )}
37
+ </div>
38
+ </Band>
39
+ )}
40
+
41
+ <style>
42
+ .single {
43
+ max-width: 54rem;
44
+ margin-inline: auto;
45
+ text-align: center;
46
+ }
47
+ .single-heading {
48
+ margin: 0 0 1.5rem;
49
+ max-width: none;
50
+ color: var(--link);
51
+ font-family: var(--font);
52
+ font-size: var(--text-sm);
53
+ font-weight: 700;
54
+ letter-spacing: 0.08em;
55
+ text-transform: uppercase;
56
+ }
57
+ .single-quote {
58
+ margin: 0;
59
+ }
60
+ .single-quote blockquote {
61
+ margin: 0;
62
+ }
63
+ .single-quote blockquote p {
64
+ margin: 0;
65
+ font-family: var(--font-display);
66
+ font-size: clamp(1.5rem, 1rem + 1.9vw, 2.25rem);
67
+ font-style: italic;
68
+ font-weight: 500;
69
+ line-height: 1.28;
70
+ letter-spacing: -0.01em;
71
+ text-wrap: balance;
72
+ }
73
+ .single-quote blockquote p::before {
74
+ content: open-quote;
75
+ }
76
+ .single-quote blockquote p::after {
77
+ content: close-quote;
78
+ }
79
+ .single-quote figcaption {
80
+ margin-top: 1.25rem;
81
+ font-size: var(--text-sm);
82
+ }
83
+ .single-name {
84
+ display: block;
85
+ font-weight: 700;
86
+ }
87
+ .single-role {
88
+ display: block;
89
+ margin-top: 0.25rem;
90
+ color: var(--muted);
91
+ }
92
+ </style>
@@ -0,0 +1,319 @@
1
+ ---
2
+ // QuoteStrip, 'ticker' layout (board A12, Press quotes, Ticker): the heading,
3
+ // then the quotes on a wash panel, each a tile on the band's surface with
4
+ // the words in the display face (curly quotes added unless the operator
5
+ // typed their own) and, under them, who said it and their role
6
+ // ("attribution · role") beside the row's mark, small. The server draws the
7
+ // tiles as the row draws them, as many across as fit and wrapping, one to a
8
+ // line on a phone, and that is what a visitor without script, or asking for
9
+ // reduced motion, sees.
10
+ // With script, and when the tiles are wider than the panel, an inline island
11
+ // lays them in one line that runs right to left behind the panel's clipped
12
+ // edges at about 40px a second, a hidden copy of the line following it so
13
+ // the loop has no seam. The line holds still while a pointer is over the
14
+ // panel or focus is inside it, while the tab is hidden and while the panel
15
+ // is off screen; a Pause button (shown only while the line can move, WCAG
16
+ // 2.2.2) stops it until it is pressed again. A single quote, or quotes that
17
+ // fit the panel's width, are drawn as the row and never move, and the line
18
+ // goes back to the row if reduced motion is asked for while it runs.
19
+ // Nothing is drawn with no heading and no quote.
20
+ import type { ComponentProps } from 'astro/types'
21
+ import Band from '../Band.astro'
22
+ import type Default from './index.astro'
23
+ import { quotesOf } from './quotes'
24
+ import { text } from '../../../lib/format'
25
+
26
+ type Props = ComponentProps<typeof Default>
27
+
28
+ const { section } = Astro.props
29
+ const heading = text(section.copy.heading)
30
+ const quotes = quotesOf(section)
31
+ const many = quotes.length > 1
32
+ ---
33
+ {(heading || quotes.length > 0) && (
34
+ <Band section={section} class="quotes quotes-ticker">
35
+ <div class="qt" data-qt>
36
+ {(heading || many) && (
37
+ <div class="qt-head">
38
+ {heading && <h2>{heading}</h2>}
39
+ {many && (
40
+ <button type="button" class="qt-toggle" data-qt-toggle hidden>
41
+ <svg class="qt-icon qt-icon-pause" viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path d="M4 3h3v10H4zM9 3h3v10H9z" /></svg>
42
+ <svg class="qt-icon qt-icon-play" viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path d="M5 3l8 5-8 5z" /></svg>
43
+ <span class="visually-hidden" data-qt-label>Pause the moving quotes</span>
44
+ </button>
45
+ )}
46
+ </div>
47
+ )}
48
+ {quotes.length > 0 && (
49
+ <div class="qt-panel" data-qt-panel>
50
+ <div class="qt-belt" data-qt-belt>
51
+ <ul class="qt-track" role="list" data-qt-track>
52
+ {quotes.map((q) => (
53
+ <li class="qt-tile">
54
+ <figure>
55
+ <blockquote>
56
+ <p class:list={['qt-words', q.quoted && 'qt-quoted']}>{q.quote}</p>
57
+ </blockquote>
58
+ {(q.attribution || q.role || q.logo) && (
59
+ <figcaption class="qt-by">
60
+ {q.logo && <img class="qt-by-mark" src={q.logo} alt="" loading="lazy" decoding="async" />}
61
+ {(q.attribution || q.role) && (
62
+ <span>
63
+ {q.attribution && <span class="qt-by-name">{q.attribution}</span>}
64
+ {q.attribution && q.role && <span class="qt-by-dot" aria-hidden="true"> · </span>}
65
+ {q.attribution && q.role && <span class="visually-hidden">, </span>}
66
+ {q.role && <span class="qt-by-role">{q.role}</span>}
67
+ </span>
68
+ )}
69
+ </figcaption>
70
+ )}
71
+ </figure>
72
+ </li>
73
+ ))}
74
+ </ul>
75
+ </div>
76
+ </div>
77
+ )}
78
+ {many && (
79
+ <script is:inline>
80
+ ;(function (root) {
81
+ if (!root) return
82
+ var panel = root.querySelector('[data-qt-panel]')
83
+ var belt = root.querySelector('[data-qt-belt]')
84
+ var track = root.querySelector('[data-qt-track]')
85
+ var toggle = root.querySelector('[data-qt-toggle]')
86
+ var label = toggle && toggle.querySelector('[data-qt-label]')
87
+ if (!panel || !belt || !track || !toggle || !label) return
88
+ var reduce = window.matchMedia('(prefers-reduced-motion: reduce)')
89
+ var copy = null
90
+ var paused = false
91
+ var inView = true
92
+ var room = 0
93
+
94
+ // The line moves only when it is wider than the panel: measured
95
+ // laid out in one line, again once the faces load and whenever the
96
+ // window changes size. One track's width at 40px a second is one lap.
97
+ function lay() {
98
+ if (copy) {
99
+ copy.remove()
100
+ copy = null
101
+ }
102
+ panel.setAttribute('data-ticker-live', '')
103
+ var width = track.getBoundingClientRect().width
104
+ room = panel.clientWidth
105
+ if (reduce.matches || width <= room + 1) {
106
+ panel.removeAttribute('data-ticker-live')
107
+ panel.style.removeProperty('--qt-lap')
108
+ } else {
109
+ copy = track.cloneNode(true)
110
+ copy.setAttribute('aria-hidden', 'true')
111
+ copy.removeAttribute('data-qt-track')
112
+ belt.appendChild(copy)
113
+ panel.style.setProperty('--qt-lap', Math.round(width / 40) + 's')
114
+ }
115
+ run()
116
+ }
117
+ function run() {
118
+ var live = copy !== null
119
+ panel.classList.toggle('qt-held', paused || !inView || document.hidden)
120
+ toggle.hidden = !live
121
+ toggle.setAttribute('data-paused', paused ? 'true' : 'false')
122
+ label.textContent = (paused ? 'Play' : 'Pause') + ' the moving quotes'
123
+ }
124
+
125
+ toggle.addEventListener('click', function () {
126
+ paused = !paused
127
+ run()
128
+ })
129
+ if (reduce.addEventListener) reduce.addEventListener('change', lay)
130
+ document.addEventListener('visibilitychange', run)
131
+ window.addEventListener('resize', function () {
132
+ if (panel.clientWidth !== room) lay()
133
+ })
134
+ if (document.fonts && document.fonts.ready) document.fonts.ready.then(lay)
135
+ if ('IntersectionObserver' in window) {
136
+ new IntersectionObserver(function (entries) {
137
+ inView = entries[0].isIntersecting
138
+ run()
139
+ }).observe(panel)
140
+ }
141
+ lay()
142
+ })(document.currentScript.closest('[data-qt]'))
143
+ </script>
144
+ )}
145
+ </div>
146
+ </Band>
147
+ )}
148
+
149
+ <style>
150
+ .qt-head {
151
+ display: flex;
152
+ flex-wrap: wrap;
153
+ align-items: flex-end;
154
+ justify-content: space-between;
155
+ gap: 0.75rem 1rem;
156
+ margin-bottom: 1.5rem;
157
+ }
158
+ .qt-head h2 {
159
+ margin: 0;
160
+ }
161
+ /* Without a heading the head holds only the button, and takes no room while it is hidden. */
162
+ .qt-head:not(:has(h2)):not(:has(.qt-toggle:not([hidden]))) {
163
+ display: none;
164
+ }
165
+
166
+ /* Pause / play: video.astro's corner button at the head's end, at a full 44px target. */
167
+ .qt-toggle {
168
+ flex: 0 0 auto;
169
+ display: inline-flex;
170
+ align-items: center;
171
+ justify-content: center;
172
+ width: 2.75rem;
173
+ height: 2.75rem;
174
+ margin: 0 0 0 auto;
175
+ padding: 0;
176
+ border: 1px solid var(--line-strong);
177
+ border-radius: 50%;
178
+ background: var(--surface);
179
+ color: var(--ink);
180
+ cursor: pointer;
181
+ }
182
+ .qt-toggle:hover {
183
+ border-color: var(--ink);
184
+ }
185
+ .qt-toggle[hidden] {
186
+ display: none;
187
+ }
188
+ .qt-icon {
189
+ width: 0.875rem;
190
+ height: 0.875rem;
191
+ fill: currentColor;
192
+ }
193
+ .qt-toggle[data-paused='true'] .qt-icon-pause,
194
+ .qt-toggle:not([data-paused='true']) .qt-icon-play {
195
+ display: none;
196
+ }
197
+
198
+ /* The board's wash: a quiet panel a step off the band. */
199
+ .qt-panel {
200
+ padding: clamp(1rem, 0.75rem + 1vw, 1.5rem);
201
+ border: 1px solid var(--line);
202
+ border-radius: var(--radius-card);
203
+ background: color-mix(in srgb, var(--ink) 6%, transparent);
204
+ }
205
+ .qt-track {
206
+ display: grid;
207
+ grid-template-columns: 1fr;
208
+ gap: 1rem;
209
+ margin: 0;
210
+ padding: 0;
211
+ list-style: none;
212
+ }
213
+ @media (min-width: 40rem) {
214
+ .qt-track {
215
+ grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
216
+ }
217
+ }
218
+ .qt-tile {
219
+ min-width: 0;
220
+ border: 1px solid var(--line);
221
+ border-radius: var(--radius);
222
+ background: var(--surface);
223
+ color: var(--ink);
224
+ }
225
+ .qt-tile figure {
226
+ display: flex;
227
+ flex-direction: column;
228
+ justify-content: space-between;
229
+ gap: 1rem;
230
+ height: 100%;
231
+ margin: 0;
232
+ padding: 1.125rem 1.25rem 1.25rem;
233
+ }
234
+ .qt-tile blockquote {
235
+ margin: 0;
236
+ }
237
+ .qt-words {
238
+ margin: 0;
239
+ font-family: var(--font-display);
240
+ font-size: var(--text-lg);
241
+ font-style: italic;
242
+ font-weight: 500;
243
+ line-height: 1.4;
244
+ text-indent: -0.36em;
245
+ }
246
+ .qt-words:not(.qt-quoted)::before {
247
+ content: open-quote;
248
+ }
249
+ .qt-words:not(.qt-quoted)::after {
250
+ content: close-quote;
251
+ }
252
+ .qt-by {
253
+ display: flex;
254
+ flex-wrap: wrap;
255
+ align-items: center;
256
+ gap: 0.5rem 0.75rem;
257
+ font-size: var(--text-sm);
258
+ line-height: 1.4;
259
+ }
260
+ /* A client's mark is drawn for a light ground: it sits on the tile's surface lifted to a pale tint of its own hue. */
261
+ .qt-by-mark {
262
+ box-sizing: content-box;
263
+ display: block;
264
+ width: auto;
265
+ height: 1.5rem;
266
+ max-width: 6rem;
267
+ padding: 0.25rem 0.375rem;
268
+ border-radius: 0.375rem;
269
+ background: var(--surface);
270
+ object-fit: contain;
271
+ }
272
+ @supports (color: oklch(from red l c h)) {
273
+ .qt-by-mark {
274
+ background: oklch(from var(--surface) max(l, 0.95) min(c, 0.012) h);
275
+ }
276
+ }
277
+ .qt-by-name {
278
+ font-weight: 700;
279
+ }
280
+ .qt-by-dot,
281
+ .qt-by-role {
282
+ color: var(--muted);
283
+ }
284
+
285
+ /* Moving: one line of tiles, then its hidden copy, run under the panel's clipped edges. */
286
+ .qt-panel[data-ticker-live] {
287
+ overflow: hidden;
288
+ padding-inline: 0;
289
+ }
290
+ [data-ticker-live] .qt-belt {
291
+ display: flex;
292
+ width: max-content;
293
+ }
294
+ [data-ticker-live] .qt-track {
295
+ display: flex;
296
+ width: max-content;
297
+ padding-right: 1rem;
298
+ }
299
+ [data-ticker-live] .qt-tile {
300
+ flex: 0 0 auto;
301
+ width: min(22rem, 78vw);
302
+ }
303
+ @media (prefers-reduced-motion: no-preference) {
304
+ [data-ticker-live] .qt-belt {
305
+ animation: qt-run var(--qt-lap, 40s) linear infinite;
306
+ }
307
+ .qt-panel:hover .qt-belt,
308
+ .qt-panel:focus-within .qt-belt,
309
+ .qt-held .qt-belt {
310
+ animation-play-state: paused;
311
+ }
312
+ }
313
+ /* The belt is two equal tracks, each with its trailing gap: half its width is one lap. */
314
+ @keyframes qt-run {
315
+ to {
316
+ transform: translateX(-50%);
317
+ }
318
+ }
319
+ </style>
@@ -0,0 +1,113 @@
1
+ ---
2
+ // QuoteStrip, 'wall' layout (board 10, C, without its rating panel: a star
3
+ // average is a claim the rows do not hold): the heading, then every quote as
4
+ // a short card on the band's surface, laid in columns that pack like a
5
+ // masonry wall: three on a wide screen, two from 40rem, one on a phone; two
6
+ // at most for four quotes or fewer, and a lone quote is one card, not a band
7
+ // across the page. The cards run down each column in row order. Each sets
8
+ // the quote, curly quotes added (hanging into the margin) unless the
9
+ // operator typed their own, then "— attribution, role" in the muted ink,
10
+ // either part left out when the row has none. Nothing is drawn with no
11
+ // heading and no quote.
12
+ import type { ComponentProps } from 'astro/types'
13
+ import Band from '../Band.astro'
14
+ import SectionHead from '../SectionHead.astro'
15
+ import type Default from './index.astro'
16
+ import { quotesOf } from './quotes'
17
+ import { text } from '../../../lib/format'
18
+
19
+ type Props = ComponentProps<typeof Default>
20
+
21
+ const { section } = Astro.props
22
+ const heading = text(section.copy.heading)
23
+ const quotes = quotesOf(section)
24
+ // Columns balance by height, so four short cards in three columns leave the
25
+ // third empty: three columns from five quotes, two up to four, one for one.
26
+ const cols = quotes.length >= 5 ? 3 : Math.min(quotes.length, 2)
27
+ ---
28
+ {(heading || quotes.length > 0) && (
29
+ <Band section={section} class="quotes quotes-wall">
30
+ <SectionHead kicker={null} heading={heading} more={[]} />
31
+ {quotes.length > 0 && (
32
+ <ul class="qw" role="list" data-cols={cols}>
33
+ {quotes.map((q) => {
34
+ const by = [q.attribution, q.role].filter(Boolean).join(', ')
35
+ return (
36
+ <li class="qw-card">
37
+ <figure>
38
+ <blockquote>
39
+ <p class:list={['qw-quote', q.quoted && 'qw-quoted']}>{q.quote}</p>
40
+ </blockquote>
41
+ {by && <figcaption class="qw-by">— {by}</figcaption>}
42
+ </figure>
43
+ </li>
44
+ )
45
+ })}
46
+ </ul>
47
+ )}
48
+ </Band>
49
+ )}
50
+
51
+ <style>
52
+ .qw {
53
+ columns: 1;
54
+ column-gap: 1rem;
55
+ margin: 0 0 -1rem;
56
+ padding: 0;
57
+ list-style: none;
58
+ }
59
+ /* One quote is one card, not a band across the page. */
60
+ .qw[data-cols='1'] {
61
+ max-width: 36rem;
62
+ }
63
+ .qw-card {
64
+ display: inline-block;
65
+ width: 100%;
66
+ margin: 0 0 1rem;
67
+ break-inside: avoid;
68
+ border: 1px solid var(--line);
69
+ border-radius: var(--radius);
70
+ background: var(--surface);
71
+ }
72
+ .qw-card figure {
73
+ margin: 0;
74
+ padding: 1.125rem 1.25rem 1.25rem;
75
+ }
76
+ .qw-card blockquote {
77
+ margin: 0;
78
+ }
79
+ .qw-quote {
80
+ margin: 0;
81
+ line-height: 1.5;
82
+ text-indent: -0.36em;
83
+ }
84
+ .qw-quote:not(.qw-quoted)::before {
85
+ content: open-quote;
86
+ }
87
+ .qw-quote:not(.qw-quoted)::after {
88
+ content: close-quote;
89
+ }
90
+ .qw-by {
91
+ margin-top: 0.625rem;
92
+ color: var(--muted);
93
+ font-size: var(--text-sm);
94
+ line-height: 1.4;
95
+ }
96
+ @media (min-width: 40rem) {
97
+ .qw {
98
+ column-gap: 1.25rem;
99
+ margin-bottom: -1.25rem;
100
+ }
101
+ .qw:not([data-cols='1']) {
102
+ columns: 2;
103
+ }
104
+ .qw-card {
105
+ margin-bottom: 1.25rem;
106
+ }
107
+ }
108
+ @media (min-width: 60rem) {
109
+ .qw[data-cols='3'] {
110
+ columns: 3;
111
+ }
112
+ }
113
+ </style>
@@ -0,0 +1,93 @@
1
+ ---
2
+ // Resources · Band (board 09, C, the inline offer box, without its email
3
+ // field or its thank-you, which are BackGold's): a slim line for the middle
4
+ // of an article, drawn as Cta/strip draws the template's slim band: a
5
+ // hairline above and below, a dot in the button colour, the first
6
+ // resource's title in bold and the first line of its summary at the left,
7
+ // the one small button at the right. The button is the
8
+ // section's link (`buttonLabel` → `buttonHref`, where BackGold's sign-up
9
+ // is), else the resource's own address under the same words. With no
10
+ // resource the heading takes the title's place. On a phone the button
11
+ // wraps under the words. With no resource and no heading it draws nothing.
12
+ import type { ComponentProps } from 'astro/types'
13
+ import type Default from './index.astro'
14
+ import Band from '../Band.astro'
15
+ import { buttonFor, resourcesOf } from './resources'
16
+
17
+ type Props = ComponentProps<typeof Default>
18
+
19
+ const { section } = Astro.props
20
+ const found = resourcesOf(section)
21
+ const first = found.resources[0]
22
+ const title = first?.title ?? found.heading
23
+ const line = first?.points[0] ?? null
24
+ const button = buttonFor(found, first)
25
+ ---
26
+ {title && (
27
+ <Band section={section} class="resources resources-band">
28
+ <div class="res-offer">
29
+ <span class="res-offer-dot" aria-hidden="true"></span>
30
+ <div class="res-offer-words">
31
+ <h2 class="res-offer-title">{title}</h2>
32
+ {line && <p class="res-offer-line">{line}</p>}
33
+ </div>
34
+ {button && <a class="button button-small res-offer-button" href={button.href} rel={button.rel}>{button.label}</a>}
35
+ </div>
36
+ </Band>
37
+ )}
38
+
39
+ <style>
40
+ :global(.bg-section.resources-band) {
41
+ --bg-section-padding: calc(var(--space) / 2) var(--gutter);
42
+ }
43
+ .res-offer {
44
+ display: flex;
45
+ flex-wrap: wrap;
46
+ align-items: center;
47
+ gap: 0.875rem 1.5rem;
48
+ padding: 1rem 0;
49
+ border-top: 1px solid var(--line);
50
+ border-bottom: 1px solid var(--line);
51
+ }
52
+ .res-offer-dot {
53
+ flex: 0 0 auto;
54
+ width: 0.5rem;
55
+ height: 0.5rem;
56
+ border-radius: 50%;
57
+ background: var(--button);
58
+ }
59
+ .res-offer-words {
60
+ flex: 1 1 18rem;
61
+ min-width: 0;
62
+ }
63
+ .res-offer-words > * {
64
+ margin: 0;
65
+ }
66
+ .res-offer-words .res-offer-title {
67
+ font-family: var(--font);
68
+ font-size: var(--text);
69
+ font-weight: 700;
70
+ letter-spacing: 0;
71
+ line-height: 1.35;
72
+ }
73
+ .res-offer-line {
74
+ margin-top: 0.25rem;
75
+ color: var(--muted);
76
+ font-size: var(--text-sm);
77
+ line-height: 1.45;
78
+ }
79
+ .res-offer-button {
80
+ flex: 0 0 auto;
81
+ min-height: 2.75rem;
82
+ white-space: nowrap;
83
+ }
84
+ @media (min-width: 40rem) {
85
+ .res-offer {
86
+ flex-wrap: nowrap;
87
+ padding: 1.125rem 0;
88
+ }
89
+ .res-offer-words .res-offer-title {
90
+ font-size: 1.0625rem;
91
+ }
92
+ }
93
+ </style>