@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,39 @@
1
+ ---
2
+ // Course · Outline: the same course held to the reading column, for a page
3
+ // that carries a course among other sections. The head without its cover
4
+ // (CourseHead: the bar and "Continue · Lesson 5" for a visitor), then the
5
+ // syllabus (Syllabus) and one line under it, "Who can watch: …", with the
6
+ // lessons whose rule is not the course's. Nothing is drawn without a course
7
+ // (course.ts).
8
+ import type { ComponentProps } from 'astro/types'
9
+ import type Default from './index.astro'
10
+ import Band from '../Band.astro'
11
+ import CourseHead from './CourseHead.astro'
12
+ import Syllabus from './Syllabus.astro'
13
+ import { courseOf } from './course'
14
+
15
+ type Props = ComponentProps<typeof Default>
16
+
17
+ const { section, lead = false } = Astro.props
18
+ const view = Astro.props.view !== undefined ? Astro.props.view : await courseOf(section, Astro)
19
+ ---
20
+ {view && (
21
+ <Band section={section} class="course course-outline">
22
+ <div class="co">
23
+ <CourseHead view={view} lead={lead} cover={false} />
24
+ <Syllabus rows={view.rows} />
25
+ <p class="fine co-who">
26
+ Who can watch: {view.whoCanWatch}{view.exceptions.map((e) => <>; Lesson {e.n}: {e.who}</>)}.
27
+ </p>
28
+ </div>
29
+ </Band>
30
+ )}
31
+
32
+ <style>
33
+ .co {
34
+ max-width: calc(var(--measure) + 6rem);
35
+ }
36
+ .co-who {
37
+ margin: 1rem 0 0;
38
+ }
39
+ </style>
@@ -0,0 +1,64 @@
1
+ ---
2
+ // Cta, 'banner' layout (board A3-leadership, section 4): one band-wide row,
3
+ // the eyebrow, the heading and the line of copy on the left and the buttons
4
+ // (the donate link first) on the right; on a phone the buttons follow the
5
+ // words. It sits on the section's own band, which is the contrast band unless
6
+ // the organization picks another. A donate link goes to the organization's
7
+ // own donate page in BackGold, exactly as given: never rebuild it on this site.
8
+ import type { ComponentProps } from 'astro/types'
9
+ import Band from '../Band.astro'
10
+ import Prose from '../../Prose.astro'
11
+ import type Default from './index.astro'
12
+ import { links } from '../../../lib/section'
13
+ import { text } from '../../../lib/format'
14
+
15
+ type Props = ComponentProps<typeof Default>
16
+
17
+ const { section } = Astro.props
18
+ const eyebrow = text(section.copy.eyebrow)
19
+ const heading = text(section.copy.heading)
20
+ const buttons = links(section)
21
+ ---
22
+ <Band section={section} class="cta">
23
+ <div class="banner">
24
+ <div class="banner-words">
25
+ {eyebrow && <p class="kicker">{eyebrow}</p>}
26
+ {heading && <h2>{heading}</h2>}
27
+ <Prose value={section.copy.body} class="lede" />
28
+ </div>
29
+ {buttons.length > 0 && (
30
+ <p class="actions banner-actions">
31
+ {buttons.map((link, i) => <a class:list={['button', i > 0 && 'button-quiet']} href={link.href} rel={link.rel}>{link.label}</a>)}
32
+ </p>
33
+ )}
34
+ </div>
35
+ </Band>
36
+
37
+ <style>
38
+ .banner {
39
+ display: flex;
40
+ flex-wrap: wrap;
41
+ align-items: center;
42
+ gap: 1.5rem 2rem;
43
+ }
44
+ .banner-words {
45
+ flex: 1 1 25rem;
46
+ min-width: 0;
47
+ }
48
+ .banner-words h2 {
49
+ font-size: clamp(1.875rem, 1.35rem + 1.7vw, 2.5rem);
50
+ line-height: 1.05;
51
+ max-width: 24em;
52
+ margin: 0;
53
+ }
54
+ .banner-words > :global(.lede) {
55
+ margin: 0.75rem 0 0;
56
+ }
57
+ .banner-words > :last-child {
58
+ margin-bottom: 0;
59
+ }
60
+ .banner-actions {
61
+ flex: 0 1 auto;
62
+ margin: 0;
63
+ }
64
+ </style>
@@ -0,0 +1,88 @@
1
+ ---
2
+ // Cta, 'card' layout (board C8's Join; A4's, A6's and C5's sidebar): the
3
+ // eyebrow, the heading, the line of copy and up to two buttons (the donate
4
+ // link first, the rest outlines) on one card. In the page's column it is one
5
+ // raised card centred on the band, on the band's card colour, its words and
6
+ // buttons centred; a page that opens with it draws no title band over it
7
+ // (PageSections: the card's heading is what the page says first). In a
8
+ // sidebar the section itself is the card, on the brand's ground (site.css),
9
+ // and the words sit at the left. A donate link goes to the organization's
10
+ // own donate page in BackGold, exactly as given: never rebuild it on this
11
+ // site.
12
+ import type { ComponentProps } from 'astro/types'
13
+ import Band from '../Band.astro'
14
+ import Prose from '../../Prose.astro'
15
+ import type Default from './index.astro'
16
+ import { links } from '../../../lib/section'
17
+ import { text } from '../../../lib/format'
18
+
19
+ type Props = ComponentProps<typeof Default>
20
+
21
+ const { section } = Astro.props
22
+ const eyebrow = text(section.copy.eyebrow)
23
+ const heading = text(section.copy.heading)
24
+ const buttons = links(section)
25
+ ---
26
+ <Band section={section} class="cta cta-card">
27
+ <div class="cta-card-box">
28
+ {eyebrow && <p class="kicker">{eyebrow}</p>}
29
+ {heading && <h2>{heading}</h2>}
30
+ <Prose value={section.copy.body} class="lede" />
31
+ {buttons.length > 0 && (
32
+ <p class="actions">
33
+ {buttons.map((link, i) => <a class:list={['button', i > 0 && 'button-quiet']} href={link.href} rel={link.rel}>{link.label}</a>)}
34
+ </p>
35
+ )}
36
+ </div>
37
+ </Band>
38
+
39
+ <style>
40
+ .cta-card-box {
41
+ max-width: 47.5rem;
42
+ margin: 0 auto;
43
+ padding: clamp(1.5rem, 1rem + 2.5vw, 3rem) clamp(1.375rem, 0.9rem + 2vw, 2.5rem);
44
+ border: 1px solid var(--line);
45
+ border-radius: var(--radius-card);
46
+ background: var(--surface);
47
+ box-shadow: var(--shadow);
48
+ text-align: center;
49
+ }
50
+ .cta-card-box > * {
51
+ margin: 0;
52
+ }
53
+ .cta-card-box h2 {
54
+ font-size: clamp(2.25rem, 1.5rem + 2.6vw, 4rem);
55
+ line-height: 0.98;
56
+ }
57
+ .cta-card-box .kicker + h2 {
58
+ margin-top: 0.75rem;
59
+ }
60
+ .cta-card-box > :global(.lede) {
61
+ margin: 1rem auto 0;
62
+ }
63
+ .cta-card-box .actions {
64
+ justify-content: center;
65
+ margin-top: 1.625rem;
66
+ }
67
+ :global(.rail) .cta-card-box {
68
+ max-width: none;
69
+ padding: 0;
70
+ border: 0;
71
+ border-radius: 0;
72
+ background: transparent;
73
+ box-shadow: none;
74
+ text-align: left;
75
+ }
76
+ :global(.rail) .cta-card-box h2 {
77
+ font-size: var(--h3);
78
+ line-height: 1.15;
79
+ }
80
+ :global(.rail) .cta-card-box > :global(.lede) {
81
+ margin: 0.5rem 0 0;
82
+ font-size: var(--text);
83
+ }
84
+ :global(.rail) .cta-card-box .actions {
85
+ justify-content: flex-start;
86
+ margin-top: 1rem;
87
+ }
88
+ </style>
@@ -0,0 +1,31 @@
1
+ ---
2
+ // Cta: an eyebrow, a heading, a line of copy and up to two buttons (the
3
+ // donate link first). A donate link goes to the organization's own donate
4
+ // page in BackGold, exactly as given: never rebuild it on this site.
5
+ // `variant` is the layout chosen in BackGold, kept as `data-variant`.
6
+ import type { Section } from '@backgold/content'
7
+ import Band from '../Band.astro'
8
+ import Prose from '../../Prose.astro'
9
+ import { links } from '../../../lib/section'
10
+ import { text } from '../../../lib/format'
11
+
12
+ interface Props {
13
+ section: Section
14
+ variant?: string
15
+ }
16
+
17
+ const { section } = Astro.props
18
+ const eyebrow = text(section.copy.eyebrow)
19
+ const heading = text(section.copy.heading)
20
+ const buttons = links(section)
21
+ ---
22
+ <Band section={section} class="cta">
23
+ {eyebrow && <p class="kicker">{eyebrow}</p>}
24
+ {heading && <h2>{heading}</h2>}
25
+ <Prose value={section.copy.body} class="lede" />
26
+ {buttons.length > 0 && (
27
+ <p class="actions">
28
+ {buttons.map((link, i) => <a class:list={['button', i > 0 && 'button-quiet']} href={link.href} rel={link.rel}>{link.label}</a>)}
29
+ </p>
30
+ )}
31
+ </Band>
@@ -0,0 +1,114 @@
1
+ ---
2
+ // Cta, 'photo' layout (With photo; board A1-home, section 7): the photo
3
+ // fills one half of the band edge to edge, with its caption at its lower
4
+ // left when the section carries one (`copy.caption`), and the eyebrow, the
5
+ // heading, the line of copy and the buttons (the first the main call, the
6
+ // rest outlines) sit in the other; on a phone the photo is a strip above the
7
+ // words. Without a photo it is the words alone on the band. A donate link goes to the organization's own
8
+ // donate page in BackGold, exactly as given: never rebuild it on this site.
9
+ import type { ComponentProps } from 'astro/types'
10
+ import Band from '../Band.astro'
11
+ import Prose from '../../Prose.astro'
12
+ import type Default from './index.astro'
13
+ import { links, media } from '../../../lib/section'
14
+ import { text } from '../../../lib/format'
15
+
16
+ type Props = ComponentProps<typeof Default>
17
+
18
+ const { section } = Astro.props
19
+ const eyebrow = text(section.copy.eyebrow)
20
+ const heading = text(section.copy.heading)
21
+ const caption = text(section.copy.caption)
22
+ const photo = media(section, 'photoUrl', 'imageUrl')
23
+ const buttons = links(section)
24
+ ---
25
+ <Band section={section} class:list={['cta', photo && 'cta-photo']}>
26
+ <div class="cta-photo-grid">
27
+ {photo && (
28
+ <div class="cta-photo-frame">
29
+ <img class="cta-photo-image" src={photo.url} alt={photo.alt} loading="lazy" decoding="async" />
30
+ {caption && <p class="cta-photo-caption">{caption}</p>}
31
+ </div>
32
+ )}
33
+ <div class="cta-photo-words">
34
+ {eyebrow && <p class="kicker cta-photo-kicker">{eyebrow}</p>}
35
+ {heading && <h2>{heading}</h2>}
36
+ <Prose value={section.copy.body} class="lede" />
37
+ {buttons.length > 0 && (
38
+ <p class="actions">
39
+ {buttons.map((link, i) => <a class:list={['button', i > 0 && 'button-quiet']} href={link.href} rel={link.rel}>{link.label}</a>)}
40
+ </p>
41
+ )}
42
+ </div>
43
+ </div>
44
+ </Band>
45
+
46
+ <style>
47
+ /* With a photo the band has no padding of its own: the photo meets its edges, the words keep theirs. */
48
+ :global(.bg-section.cta-photo) {
49
+ --bg-section-padding: 0;
50
+ overflow: hidden;
51
+ }
52
+ :global(.bg-section.cta-photo) > :global(.bg-section-inner) {
53
+ max-width: none;
54
+ }
55
+ .cta-photo-grid {
56
+ display: grid;
57
+ }
58
+ .cta-photo-frame {
59
+ position: relative;
60
+ }
61
+ .cta-photo-image {
62
+ display: block;
63
+ width: 100%;
64
+ height: 100%;
65
+ min-height: 12.5rem;
66
+ max-height: 22rem;
67
+ object-fit: cover;
68
+ }
69
+ .cta-photo-caption {
70
+ position: absolute;
71
+ left: 0.75rem;
72
+ bottom: 0.625rem;
73
+ max-width: calc(100% - 1.5rem);
74
+ margin: 0;
75
+ padding: 0.1875rem 0.5rem;
76
+ border-radius: 0.25rem;
77
+ background: color-mix(in srgb, var(--band-photo) 70%, transparent);
78
+ color: var(--band-photo-ink);
79
+ font-size: 0.6875rem;
80
+ line-height: 1.4;
81
+ }
82
+ :global(.cta-photo) .cta-photo-words {
83
+ padding: 1.75rem var(--gutter) 2rem;
84
+ }
85
+ /* A1 sets the eyebrow over the photo call in the band's muted ink. */
86
+ .cta-photo-kicker {
87
+ color: var(--muted);
88
+ }
89
+ .cta-photo-words h2 {
90
+ font-size: clamp(2rem, 1.35rem + 2.1vw, 2.75rem);
91
+ line-height: 1.04;
92
+ margin-bottom: 1rem;
93
+ }
94
+ .cta-photo-words :global(.lede) {
95
+ font-size: 1.0625rem;
96
+ }
97
+ .cta-photo-words > :last-child {
98
+ margin-bottom: 0;
99
+ }
100
+ @media (min-width: 48rem) {
101
+ :global(.cta-photo) .cta-photo-grid {
102
+ grid-template-columns: repeat(2, minmax(0, 1fr));
103
+ }
104
+ .cta-photo-image {
105
+ min-height: 21.25rem;
106
+ max-height: none;
107
+ }
108
+ :global(.cta-photo) .cta-photo-words {
109
+ align-self: center;
110
+ max-width: 36rem;
111
+ padding: clamp(2.5rem, 4vw, 3rem) clamp(1.75rem, 3.5vw, 2.75rem);
112
+ }
113
+ }
114
+ </style>
@@ -0,0 +1,91 @@
1
+ ---
2
+ // Cta, 'strip' layout (board A1, "Area · Top banner · Convention notice:
3
+ // Call to action · Strip"): one slim line on the section's band: a dot in
4
+ // the accent, the heading in bold, " · " and the line of copy (the place and
5
+ // the date), and the section's links at the right as underlined text. On a
6
+ // phone (A13) it wraps, the link under the words. Made for the Top banner
7
+ // area, which Site.astro draws above the header, and drawn the same wherever
8
+ // a page places it. A donate link goes to the organization's own donate page
9
+ // in BackGold, exactly as given.
10
+ import type { ComponentProps } from 'astro/types'
11
+ import Band from '../Band.astro'
12
+ import type Default from './index.astro'
13
+ import { links } from '../../../lib/section'
14
+ import { text } from '../../../lib/format'
15
+
16
+ type Props = ComponentProps<typeof Default>
17
+
18
+ const { section } = Astro.props
19
+ const heading = text(section.copy.heading)
20
+ const body = text(section.copy.body)
21
+ const buttons = links(section)
22
+ ---
23
+ {(heading || body || buttons.length > 0) && (
24
+ <Band section={section} class="cta-strip">
25
+ <p class="strip">
26
+ <span class="strip-dot" aria-hidden="true"></span>
27
+ {(heading || body) && (
28
+ <span class="strip-words">
29
+ {heading && <b>{heading}</b>}
30
+ {heading && body && ' · '}
31
+ {body}
32
+ </span>
33
+ )}
34
+ {buttons.length > 0 && (
35
+ <span class="strip-links">
36
+ {buttons.map((link) => <a href={link.href} rel={link.rel}>{link.label}</a>)}
37
+ </span>
38
+ )}
39
+ </p>
40
+ </Band>
41
+ )}
42
+
43
+ <style>
44
+ /* A1's .tbar: 46px tall, 14px type (13px on a phone). */
45
+ :global(.bg-section.cta-strip) {
46
+ --bg-section-padding: 0.375rem var(--gutter);
47
+ font-size: 0.8125rem;
48
+ }
49
+ .strip {
50
+ display: flex;
51
+ flex-wrap: wrap;
52
+ align-items: center;
53
+ gap: 0.25rem 0.875rem;
54
+ min-height: 2.125rem;
55
+ margin: 0;
56
+ line-height: 1.5;
57
+ }
58
+ .strip-dot {
59
+ flex: 0 0 auto;
60
+ width: 0.5rem;
61
+ height: 0.5rem;
62
+ border-radius: 50%;
63
+ background: var(--button);
64
+ }
65
+ .strip-words b {
66
+ font-weight: 700;
67
+ }
68
+ .strip-links {
69
+ display: flex;
70
+ flex-wrap: wrap;
71
+ gap: 0.25rem 1rem;
72
+ }
73
+ .strip-links a {
74
+ color: var(--ink);
75
+ font-weight: 700;
76
+ text-decoration: underline;
77
+ text-underline-offset: 3px;
78
+ }
79
+ @media (min-width: 48rem) {
80
+ :global(.bg-section.cta-strip) {
81
+ font-size: var(--text-sm);
82
+ }
83
+ .strip {
84
+ flex-wrap: nowrap;
85
+ }
86
+ .strip-links {
87
+ margin-left: auto;
88
+ white-space: nowrap;
89
+ }
90
+ }
91
+ </style>
@@ -0,0 +1,136 @@
1
+ ---
2
+ // Donate (boards A8, A12): the organization's one donate form, BackGold's
3
+ // frame (ModuleFrame) on a raised card.
4
+ // form (the default) the heading, then the checkout card, centred
5
+ // story (A8) the form's story at the left: its picture, the heading as the
6
+ // kicker, the story's headline and words, and Share / Copy link;
7
+ // the checkout card at the right (under it on a phone)
8
+ // The asks, the fields, the attestation, the limits and the receipt are
9
+ // BackGold's; the layout only places the story beside them. With no form to
10
+ // frame, the card says donations are not available (ModuleFrame). The card is
11
+ // the panel, so a section on the panel band sits on the tint (A8, C7: the
12
+ // card raised off the band, never white on white). A template whose story
13
+ // draws no kicker (the candidate's C7) passes `kicker={false}`.
14
+ import type { Section } from '@backgold/content'
15
+ import Band from '../Band.astro'
16
+ import Prose from '../../Prose.astro'
17
+ import ModuleFrame from '../modules/ModuleFrame.astro'
18
+ import { media } from '../../../lib/section'
19
+ import { text } from '../../../lib/format'
20
+
21
+ interface Props {
22
+ section: Section
23
+ variant?: string
24
+ /** The story's heading as its kicker; true unless the template's board draws none. */
25
+ kicker?: boolean
26
+ }
27
+
28
+ const { section, variant, kicker = true } = Astro.props
29
+ const ground: Section = section.band === 'panel' ? { ...section, band: 'tint' } : section
30
+ const heading = text(section.copy.heading)
31
+ const storyHeadline = text(section.copy.storyHeadline)
32
+ const photo = media(section, 'storyImageUrl')
33
+ const story = variant === 'story' && (storyHeadline || text(section.copy.storyBody) || photo)
34
+ const layout = story ? 'story' : 'form'
35
+ ---
36
+ <Band section={ground} class:list={['donate', `donate-${layout}`]}>
37
+ {story ? (
38
+ <div class="donate-story">
39
+ <div class="donate-words">
40
+ {photo && <img class="donate-photo" src={photo.url} alt={photo.alt} loading="lazy" />}
41
+ {kicker && heading && <p class="kicker">{heading}</p>}
42
+ {storyHeadline && <h2>{storyHeadline}</h2>}
43
+ <Prose value={section.copy.storyBody} class="lede" />
44
+ <p class="donate-share" data-share>
45
+ <a href="#" data-share-native hidden>Share</a>
46
+ <a href="#" data-share-copy>Copy link</a>
47
+ </p>
48
+ </div>
49
+ <ModuleFrame embed={section.embed} band={section.band} type={section.type} layout="story" card title={heading ?? 'Donate'} height="64rem" />
50
+ </div>
51
+ ) : (
52
+ <div class="donate-form">
53
+ {heading && <h2>{heading}</h2>}
54
+ <ModuleFrame embed={section.embed} band={section.band} type={section.type} layout="form" card title={heading ?? 'Donate'} height="64rem" />
55
+ </div>
56
+ )}
57
+ </Band>
58
+
59
+ {story && (
60
+ <script is:inline>
61
+ ;(function () {
62
+ var row = document.currentScript && document.currentScript.previousElementSibling
63
+ var bar = row && row.querySelector('[data-share]')
64
+ if (!bar) return
65
+ var native = bar.querySelector('[data-share-native]')
66
+ var copy = bar.querySelector('[data-share-copy]')
67
+ if (navigator.share && native) {
68
+ native.hidden = false
69
+ native.addEventListener('click', function (e) {
70
+ e.preventDefault()
71
+ navigator.share({ title: document.title, url: location.href }).catch(function () {})
72
+ })
73
+ }
74
+ copy.addEventListener('click', function (e) {
75
+ e.preventDefault()
76
+ if (!navigator.clipboard) return
77
+ navigator.clipboard.writeText(location.href).then(function () {
78
+ copy.textContent = 'Link copied'
79
+ })
80
+ })
81
+ })()
82
+ </script>
83
+ )}
84
+
85
+ <style>
86
+ .donate-form {
87
+ max-width: 40rem;
88
+ margin-inline: auto;
89
+ }
90
+ .donate-form h2 {
91
+ margin: 0 0 1.5rem;
92
+ text-align: center;
93
+ }
94
+ .donate-story {
95
+ display: grid;
96
+ gap: 1.75rem;
97
+ align-items: start;
98
+ }
99
+ .donate-photo {
100
+ display: block;
101
+ width: 100%;
102
+ aspect-ratio: 4 / 3;
103
+ object-fit: cover;
104
+ border-radius: var(--radius-card);
105
+ margin-bottom: 1.625rem;
106
+ }
107
+ .donate-words h2 {
108
+ margin: 0 0 0.875rem;
109
+ font-size: clamp(2rem, 1.3rem + 2vw, 2.875rem);
110
+ line-height: 1.04;
111
+ font-weight: 800;
112
+ }
113
+ .donate-share {
114
+ display: flex;
115
+ gap: 0.625rem;
116
+ margin: 1.25rem 0 0;
117
+ }
118
+ .donate-share a {
119
+ padding: 0.4375rem 0.875rem;
120
+ border: 1.5px solid var(--line-strong);
121
+ border-radius: var(--pill);
122
+ color: var(--ink);
123
+ font-size: var(--text-sm);
124
+ font-weight: 700;
125
+ text-decoration: none;
126
+ }
127
+ .donate-share [hidden] {
128
+ display: none;
129
+ }
130
+ @media (min-width: 56rem) {
131
+ .donate-story {
132
+ grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
133
+ gap: 2.75rem;
134
+ }
135
+ }
136
+ </style>
@@ -0,0 +1,7 @@
1
+ ---
2
+ import type { ComponentProps } from 'astro/types'
3
+ import Default from './index.astro'
4
+
5
+ type Props = ComponentProps<typeof Default>
6
+ ---
7
+ <Default {...Astro.props} variant="story" />
@@ -0,0 +1,14 @@
1
+ ---
2
+ // One event · Card: one event on another page, compact, on a raised card: its
3
+ // date, place and one RSVP or Get tickets.
4
+ import type { Section } from '@backgold/content'
5
+ import Headed from '../modules/Headed.astro'
6
+
7
+ interface Props {
8
+ section: Section
9
+ variant?: string
10
+ }
11
+
12
+ const { section } = Astro.props
13
+ ---
14
+ <Headed section={section} layout="card" card height="16rem" narrow />
@@ -0,0 +1,14 @@
1
+ ---
2
+ // One event · Full (board A12, the default): the heading, then BackGold's RSVP
3
+ // and tickets on a raised card.
4
+ import type { Section } from '@backgold/content'
5
+ import Headed from '../modules/Headed.astro'
6
+
7
+ interface Props {
8
+ section: Section
9
+ variant?: string
10
+ }
11
+
12
+ const { section } = Astro.props
13
+ ---
14
+ <Headed section={section} layout="detail" card height="44rem" narrow />