@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,123 @@
1
+ ---
2
+ // Share kit · Compact (REPORT §2 G18): the kicker and heading, the body,
3
+ // then the posts as a list on the band's surface, one row each under a thin
4
+ // rule and no pictures: the network as a chip, the post's words and the
5
+ // row's link reading "Open" (a screen reader hears "Open on X") at the left, Copy and Share side by side at the
6
+ // right. On a phone the buttons drop under the words. Copy and Share are
7
+ // drawn hidden and shown by the section's island where the browser can do
8
+ // them; without script each row is its words and its link. No counts. The
9
+ // section's own links follow the list as its buttons. Nothing is drawn with
10
+ // no post and no heading.
11
+ import type { ComponentProps } from 'astro/types'
12
+ import type Default from './index.astro'
13
+ import Band from '../Band.astro'
14
+ import SectionHead from '../SectionHead.astro'
15
+ import Prose from '../../Prose.astro'
16
+ import Actions from './Actions.astro'
17
+ import Buttons from './Buttons.astro'
18
+ import { labelsOf, postsOf } from './share'
19
+ import { links } from '../../../lib/section'
20
+ import { text } from '../../../lib/format'
21
+
22
+ type Props = ComponentProps<typeof Default>
23
+
24
+ const { section } = Astro.props
25
+ const kicker = text(section.copy.kicker)
26
+ const heading = text(section.copy.heading)
27
+ const posts = postsOf(section)
28
+ const labels = labelsOf(section)
29
+ const ctas = links(section)
30
+ ---
31
+ {(heading || posts.length > 0) && (
32
+ <Band section={section} class="sharekit sharekit-compact">
33
+ <div data-share-kit>
34
+ <SectionHead kicker={kicker} heading={heading} more={[]} />
35
+ <Prose value={section.copy.body} class="lede sharekit-lede" />
36
+ {posts.length > 0 && (
37
+ <ul class="share-list" role="list">
38
+ {posts.map((post) => (
39
+ <li class="share-row" data-share-item data-share-text={post.text} data-share-name={post.name}>
40
+ <div class="share-row-words">
41
+ {post.network && <p class="share-row-network"><span class="chip">{post.network}</span></p>}
42
+ <p class="share-row-text">{post.text}</p>
43
+ {post.href && <p class="share-row-open"><a href={post.href} rel={post.rel}>Open<span class="visually-hidden">{post.openHint}</span><span aria-hidden="true"> →</span></a></p>}
44
+ </div>
45
+ <Buttons post={post} labels={labels} />
46
+ </li>
47
+ ))}
48
+ </ul>
49
+ )}
50
+ {ctas.length > 0 && (
51
+ <p class="actions">
52
+ {ctas.map((link, i) => <a class:list={['button', i > 0 && 'button-quiet']} href={link.href} rel={link.rel}>{link.label}</a>)}
53
+ </p>
54
+ )}
55
+ {posts.length > 0 && <Actions />}
56
+ </div>
57
+ </Band>
58
+ )}
59
+
60
+ <style>
61
+ .sharekit-compact :global(.sharekit-lede) {
62
+ margin: -0.5rem 0 1.75rem;
63
+ }
64
+ .share-list {
65
+ margin: 0;
66
+ padding: 0;
67
+ list-style: none;
68
+ border: 1px solid var(--line);
69
+ border-radius: var(--radius-card);
70
+ background: var(--surface);
71
+ color: var(--ink);
72
+ }
73
+ .share-row {
74
+ display: grid;
75
+ gap: 0.875rem;
76
+ padding: 1rem 1.125rem;
77
+ }
78
+ .share-row + .share-row {
79
+ border-top: 1px solid var(--line);
80
+ }
81
+ .share-row-words {
82
+ display: grid;
83
+ gap: 0.375rem;
84
+ min-width: 0;
85
+ }
86
+ .share-row-words > p {
87
+ margin: 0;
88
+ }
89
+ /* The network chip sits on the card's surface, so it takes its ground from the ink: the band's own chip ground can match the surface in a dark band. */
90
+ .share-row-network .chip {
91
+ background: color-mix(in srgb, var(--ink) 8%, transparent);
92
+ color: var(--ink);
93
+ white-space: normal;
94
+ }
95
+ .share-row-words .share-row-text {
96
+ max-width: 68ch;
97
+ line-height: 1.55;
98
+ white-space: pre-line;
99
+ overflow-wrap: anywhere;
100
+ }
101
+ .share-row-open {
102
+ font-size: var(--text-sm);
103
+ font-weight: 700;
104
+ }
105
+ .share-row-open a {
106
+ color: var(--link);
107
+ text-decoration: underline;
108
+ text-decoration-thickness: 1.5px;
109
+ text-underline-offset: 0.25em;
110
+ }
111
+ @media (min-width: 40rem) {
112
+ .share-row {
113
+ grid-template-columns: minmax(0, 1fr) auto;
114
+ align-items: center;
115
+ gap: 1.5rem;
116
+ padding: 1.125rem 1.5rem;
117
+ }
118
+ .share-row :global(.share-buttons) {
119
+ flex-wrap: nowrap;
120
+ justify-content: flex-end;
121
+ }
122
+ }
123
+ </style>
@@ -0,0 +1,160 @@
1
+ ---
2
+ // Share kit · Cards, the default (REPORT §2 G18): pre-written posts and
3
+ // graphics a supporter carries off and posts as their own. The kicker and
4
+ // heading, the body, then one card per post on the band's surface, three
5
+ // across on a wide screen, two on a tablet and one on a phone: the graphic
6
+ // at 16:9 (the shape the networks show a shared picture) when the post has
7
+ // one, the network as a chip in the operator's own word, the post's words
8
+ // on a soft panel as the supporter will paste them, the row's link (to the
9
+ // network's compose page or a page to open) reading "Open" with an arrow
10
+ // (a screen reader hears "Open on X"; the chip already shows the word), then
11
+ // Copy and Share, which carry the words alone. Copy and Share are drawn
12
+ // hidden and shown by the section's island where the browser can do them,
13
+ // so without script a card is its words and its link. No counts, no tallies,
14
+ // no sign-in. The section's own links follow the cards as its buttons.
15
+ // Nothing is drawn with no post and no heading.
16
+ import type { Section } from '@backgold/content'
17
+ import Band from '../Band.astro'
18
+ import SectionHead from '../SectionHead.astro'
19
+ import Prose from '../../Prose.astro'
20
+ import Actions from './Actions.astro'
21
+ import Buttons from './Buttons.astro'
22
+ import { labelsOf, postsOf } from './share'
23
+ import { links } from '../../../lib/section'
24
+ import { text } from '../../../lib/format'
25
+
26
+ interface Props {
27
+ section: Section
28
+ variant?: string
29
+ }
30
+
31
+ const { section } = Astro.props
32
+ const kicker = text(section.copy.kicker)
33
+ const heading = text(section.copy.heading)
34
+ const posts = postsOf(section)
35
+ const labels = labelsOf(section)
36
+ const ctas = links(section)
37
+ ---
38
+ {(heading || posts.length > 0) && (
39
+ <Band section={section} class="sharekit sharekit-cards">
40
+ <div data-share-kit>
41
+ <SectionHead kicker={kicker} heading={heading} more={[]} />
42
+ <Prose value={section.copy.body} class="lede sharekit-lede" />
43
+ {posts.length > 0 && (
44
+ <ul class="share-cards" role="list">
45
+ {posts.map((post) => (
46
+ <li class="share-card" data-share-item data-share-text={post.text} data-share-name={post.name}>
47
+ {post.image && (
48
+ <div class="share-frame">
49
+ <img class="share-photo" src={post.image} alt="" loading="lazy" decoding="async" />
50
+ </div>
51
+ )}
52
+ <div class="share-body">
53
+ {post.network && <p class="share-network"><span class="chip">{post.network}</span></p>}
54
+ <p class="share-text">{post.text}</p>
55
+ {post.href && <p class="share-open"><a href={post.href} rel={post.rel}>Open<span class="visually-hidden">{post.openHint}</span><span aria-hidden="true"> →</span></a></p>}
56
+ <Buttons post={post} labels={labels} />
57
+ </div>
58
+ </li>
59
+ ))}
60
+ </ul>
61
+ )}
62
+ {ctas.length > 0 && (
63
+ <p class="actions">
64
+ {ctas.map((link, i) => <a class:list={['button', i > 0 && 'button-quiet']} href={link.href} rel={link.rel}>{link.label}</a>)}
65
+ </p>
66
+ )}
67
+ {posts.length > 0 && <Actions />}
68
+ </div>
69
+ </Band>
70
+ )}
71
+
72
+ <style>
73
+ .sharekit-cards :global(.sharekit-lede) {
74
+ margin: -0.5rem 0 1.75rem;
75
+ }
76
+ .share-cards {
77
+ display: grid;
78
+ grid-template-columns: minmax(0, 1fr);
79
+ gap: 1rem;
80
+ margin: 0;
81
+ padding: 0;
82
+ list-style: none;
83
+ }
84
+ .share-card {
85
+ display: flex;
86
+ flex-direction: column;
87
+ min-width: 0;
88
+ overflow: hidden;
89
+ border: 1px solid var(--line);
90
+ border-radius: var(--radius-card);
91
+ background: var(--surface);
92
+ color: var(--ink);
93
+ }
94
+ .share-frame {
95
+ aspect-ratio: 16 / 9;
96
+ overflow: hidden;
97
+ border-bottom: 1px solid var(--line);
98
+ background: color-mix(in srgb, var(--ink) 6%, transparent);
99
+ }
100
+ .share-photo {
101
+ display: block;
102
+ width: 100%;
103
+ height: 100%;
104
+ object-fit: cover;
105
+ }
106
+ .share-body {
107
+ display: flex;
108
+ flex: 1 1 auto;
109
+ flex-direction: column;
110
+ align-items: flex-start;
111
+ gap: 0.875rem;
112
+ padding: 1.125rem 1.25rem 1.25rem;
113
+ }
114
+ .share-body > p {
115
+ margin: 0;
116
+ }
117
+ /* The network chip sits on the card's surface, so it takes its ground from the ink: the band's own chip ground can match the surface in a dark band. */
118
+ .share-network .chip {
119
+ background: color-mix(in srgb, var(--ink) 8%, transparent);
120
+ color: var(--ink);
121
+ white-space: normal;
122
+ }
123
+ /* The post as it will be pasted: its own words on a soft panel, the line breaks kept. */
124
+ .share-body .share-text {
125
+ align-self: stretch;
126
+ padding: 0.875rem 1rem;
127
+ border-radius: var(--radius);
128
+ background: color-mix(in srgb, var(--ink) 5%, transparent);
129
+ font-size: var(--text);
130
+ line-height: 1.55;
131
+ white-space: pre-line;
132
+ overflow-wrap: anywhere;
133
+ }
134
+ .share-open {
135
+ font-size: var(--text-sm);
136
+ font-weight: 700;
137
+ }
138
+ .share-open a {
139
+ color: var(--link);
140
+ text-decoration: underline;
141
+ text-decoration-thickness: 1.5px;
142
+ text-underline-offset: 0.25em;
143
+ }
144
+ /* Copy and Share sit at the card's foot, level across a row of cards. */
145
+ .share-body :global(.share-buttons) {
146
+ margin-top: auto;
147
+ }
148
+ @media (min-width: 40rem) {
149
+ .share-cards {
150
+ grid-template-columns: repeat(2, minmax(0, 1fr));
151
+ gap: 1.25rem;
152
+ }
153
+ }
154
+ @media (min-width: 60rem) {
155
+ .share-cards {
156
+ grid-template-columns: repeat(3, minmax(0, 1fr));
157
+ gap: 1.5rem;
158
+ }
159
+ }
160
+ </style>
@@ -0,0 +1,60 @@
1
+ // A Share kit's posts as its layouts draw them (REPORT §2 G18): the rows of
2
+ // the authored list (`share`, prop `items`), in row order, the first 12.
3
+ // Each post reads `network` (the operator's word: "X", "Facebook", "Text a
4
+ // friend"), `text` (the words a supporter posts, any address written into
5
+ // them), `href` (where the row's link goes: the network's compose or share
6
+ // page, or a page to open) and `imageUrl` (the graphic). A row without text
7
+ // is not a post. Copy and Share carry the text alone: the href is only the
8
+ // link's address and is never copied or shared.
9
+ //
10
+ // Addresses are checked as the siblings check theirs: a graphic with an
11
+ // unsafe or missing address is left out, and so is a link. There are no
12
+ // counts here and nothing about who shared: the kit is words and pictures
13
+ // a visitor carries off on their own device.
14
+
15
+ import type { Section } from '@backgold/content'
16
+ import { relFor, safeHref, safeSrc } from '@backgold/astro/server'
17
+ import { rows } from '../../../lib/section'
18
+ import { text } from '../../../lib/format'
19
+
20
+ const MAX = 12
21
+
22
+ export interface Post {
23
+ network: string | null
24
+ text: string
25
+ /** Where the row's link goes, checked. */
26
+ href: string | null
27
+ rel: 'noopener' | undefined
28
+ /** The graphic's checked address. */
29
+ image: string | null
30
+ /** The words a screen reader hears after "Copy" and "Share": "the X post", "post 3". */
31
+ name: string
32
+ /** The hidden words after the link's visible "Open": " on X", or " the link for post 3" with no network. */
33
+ openHint: string
34
+ }
35
+
36
+ /** The section's posts in row order: the first 12 rows that have text. */
37
+ export function postsOf(section: Section): Post[] {
38
+ return rows(section)
39
+ .flatMap((row) => {
40
+ const words = text(row.text)?.trim()
41
+ if (!words) return []
42
+ const network = text(row.network)?.trim() ?? null
43
+ const href = safeHref(row.href)
44
+ return [{ network, text: words, href, rel: href ? relFor(href) : undefined, image: safeSrc(row.imageUrl) }]
45
+ })
46
+ .slice(0, MAX)
47
+ .map((post, i) => ({
48
+ ...post,
49
+ name: post.network ? `the ${post.network} post` : `post ${i + 1}`,
50
+ openHint: post.network ? ` on ${post.network}` : ` the link for post ${i + 1}`,
51
+ }))
52
+ }
53
+
54
+ /** The Copy and Share buttons' words: the section's own, or "Copy" and "Share". */
55
+ export function labelsOf(section: Section): { copy: string; share: string } {
56
+ return {
57
+ copy: text(section.copy.copyLabel)?.trim() ?? 'Copy',
58
+ share: text(section.copy.shareLabel)?.trim() ?? 'Share',
59
+ }
60
+ }
@@ -0,0 +1,173 @@
1
+ ---
2
+ // Share kit · Strip (REPORT §2 G18): the kicker and heading, the body, then
3
+ // the posts in one row that scrolls sideways, smaller than the cards: each
4
+ // its graphic at 16:9 when it has one, the network as a chip, the post's
5
+ // words cut to five lines (Copy and Share carry all of them), the row's
6
+ // link reading "Open" (a screen reader hears "Open on X"), and Copy and Share. About three and a half posts show
7
+ // on a wide screen, so the next is always in view at the edge; a phone
8
+ // shows one and a little of the next. The row snaps to a post's edge, takes
9
+ // the keyboard's arrow keys when it has focus and keeps the browser's own
10
+ // scroll bar. Copy and Share are drawn hidden and shown by the section's
11
+ // island; without script each post is its words and its link. No counts.
12
+ // The section's own links follow the row as its buttons. Nothing is drawn
13
+ // with no post and no heading.
14
+ import type { ComponentProps } from 'astro/types'
15
+ import type Default from './index.astro'
16
+ import Band from '../Band.astro'
17
+ import SectionHead from '../SectionHead.astro'
18
+ import Prose from '../../Prose.astro'
19
+ import Actions from './Actions.astro'
20
+ import Buttons from './Buttons.astro'
21
+ import { labelsOf, postsOf } from './share'
22
+ import { links } from '../../../lib/section'
23
+ import { text } from '../../../lib/format'
24
+
25
+ type Props = ComponentProps<typeof Default>
26
+
27
+ const { section } = Astro.props
28
+ const kicker = text(section.copy.kicker)
29
+ const heading = text(section.copy.heading)
30
+ const posts = postsOf(section)
31
+ const labels = labelsOf(section)
32
+ const ctas = links(section)
33
+ ---
34
+ {(heading || posts.length > 0) && (
35
+ <Band section={section} class="sharekit sharekit-strip">
36
+ <div data-share-kit>
37
+ <SectionHead kicker={kicker} heading={heading} more={[]} />
38
+ <Prose value={section.copy.body} class="lede sharekit-lede" />
39
+ {posts.length > 0 && (
40
+ <ul class="share-strip" role="list" tabindex="0" aria-label={heading ?? 'Posts to share'}>
41
+ {posts.map((post) => (
42
+ <li class="share-tile" data-share-item data-share-text={post.text} data-share-name={post.name}>
43
+ {post.image && (
44
+ <div class="share-tile-frame">
45
+ <img class="share-tile-photo" src={post.image} alt="" loading="lazy" decoding="async" />
46
+ </div>
47
+ )}
48
+ <div class="share-tile-body">
49
+ {post.network && <p class="share-tile-network"><span class="chip">{post.network}</span></p>}
50
+ <p class="share-tile-text">{post.text}</p>
51
+ {post.href && <p class="share-tile-open"><a href={post.href} rel={post.rel}>Open<span class="visually-hidden">{post.openHint}</span><span aria-hidden="true"> →</span></a></p>}
52
+ <Buttons post={post} labels={labels} />
53
+ </div>
54
+ </li>
55
+ ))}
56
+ </ul>
57
+ )}
58
+ {ctas.length > 0 && (
59
+ <p class="actions">
60
+ {ctas.map((link, i) => <a class:list={['button', i > 0 && 'button-quiet']} href={link.href} rel={link.rel}>{link.label}</a>)}
61
+ </p>
62
+ )}
63
+ {posts.length > 0 && <Actions />}
64
+ </div>
65
+ </Band>
66
+ )}
67
+
68
+ <style>
69
+ .sharekit-strip :global(.sharekit-lede) {
70
+ margin: -0.5rem 0 1.75rem;
71
+ }
72
+ /* The padding keeps a focused button's ring inside the scroll box. */
73
+ .share-strip {
74
+ display: flex;
75
+ align-items: stretch;
76
+ gap: 1rem;
77
+ margin: 0 -0.375rem;
78
+ padding: 0.375rem 0.375rem 1rem;
79
+ list-style: none;
80
+ overflow-x: auto;
81
+ scroll-snap-type: x mandatory;
82
+ scroll-padding-inline: 0.375rem;
83
+ overscroll-behavior-x: contain;
84
+ }
85
+ .share-strip:focus-visible {
86
+ outline: 3px solid var(--ink);
87
+ outline-offset: 2px;
88
+ border-radius: var(--radius);
89
+ }
90
+ .share-tile {
91
+ display: flex;
92
+ flex: 0 0 82%;
93
+ flex-direction: column;
94
+ min-width: 0;
95
+ overflow: hidden;
96
+ scroll-snap-align: start;
97
+ border: 1px solid var(--line);
98
+ border-radius: var(--radius-card);
99
+ background: var(--surface);
100
+ color: var(--ink);
101
+ }
102
+ .share-tile-frame {
103
+ aspect-ratio: 16 / 9;
104
+ overflow: hidden;
105
+ border-bottom: 1px solid var(--line);
106
+ background: color-mix(in srgb, var(--ink) 6%, transparent);
107
+ }
108
+ .share-tile-photo {
109
+ display: block;
110
+ width: 100%;
111
+ height: 100%;
112
+ object-fit: cover;
113
+ }
114
+ .share-tile-body {
115
+ display: flex;
116
+ flex: 1 1 auto;
117
+ flex-direction: column;
118
+ align-items: flex-start;
119
+ gap: 0.625rem;
120
+ padding: 0.875rem 1rem 1rem;
121
+ }
122
+ .share-tile-body > p {
123
+ margin: 0;
124
+ }
125
+ /* The network chip sits on the card's surface, so it takes its ground from the ink: the band's own chip ground can match the surface in a dark band. */
126
+ .share-tile-network .chip {
127
+ background: color-mix(in srgb, var(--ink) 8%, transparent);
128
+ color: var(--ink);
129
+ white-space: normal;
130
+ }
131
+ .share-tile-body .share-tile-text {
132
+ display: -webkit-box;
133
+ -webkit-box-orient: vertical;
134
+ -webkit-line-clamp: 5;
135
+ line-clamp: 5;
136
+ overflow: hidden;
137
+ font-size: var(--text-sm);
138
+ line-height: 1.5;
139
+ overflow-wrap: anywhere;
140
+ }
141
+ .share-tile-open {
142
+ font-size: var(--text-sm);
143
+ font-weight: 700;
144
+ }
145
+ .share-tile-open a {
146
+ color: var(--link);
147
+ text-decoration: underline;
148
+ text-decoration-thickness: 1.5px;
149
+ text-underline-offset: 0.25em;
150
+ }
151
+ .share-tile-body :global(.share-buttons) {
152
+ margin-top: auto;
153
+ padding-top: 0.25rem;
154
+ }
155
+ @media (min-width: 40rem) {
156
+ .share-tile {
157
+ flex-basis: 44%;
158
+ }
159
+ }
160
+ @media (min-width: 56rem) {
161
+ .share-strip {
162
+ gap: 1.25rem;
163
+ }
164
+ .share-tile {
165
+ flex-basis: calc((100% - 3 * 1.25rem) / 3.4);
166
+ }
167
+ }
168
+ @media (prefers-reduced-motion: no-preference) {
169
+ .share-strip {
170
+ scroll-behavior: smooth;
171
+ }
172
+ }
173
+ </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="band" />
@@ -0,0 +1,103 @@
1
+ ---
2
+ // SignupCapture (board A12): an email sign-up with its consent, BackGold's
3
+ // frame (ModuleFrame) in one of three layouts. The section's words (its
4
+ // kicker in small capitals, its heading, its lede under the heading) are
5
+ // drawn here, each only when it has words; the frame draws the fields, or
6
+ // says signing up is not available when there is none.
7
+ // card (the default) the words over the sign-up on a raised card,
8
+ // narrow and centred
9
+ // band (A1 and C1, Above the footer) the words at the left and the
10
+ // fields straight on the band at the right: first name and last
11
+ // name, then email and ZIP (email alone when the organization
12
+ // leaves ZIP out), the button under them, the consent line
13
+ // inline the words and a one-line sign-up side by side, for a slim strip
14
+ import type { Section } from '@backgold/content'
15
+ import Band from '../Band.astro'
16
+ import ModuleFrame from '../modules/ModuleFrame.astro'
17
+ import { text } from '../../../lib/format'
18
+
19
+ interface Props {
20
+ section: Section
21
+ variant?: string
22
+ }
23
+
24
+ const { section, variant } = Astro.props
25
+ const layout = variant === 'band' || variant === 'inline' ? variant : 'card'
26
+ const kicker = text(section.copy.kicker)
27
+ const heading = text(section.copy.heading)
28
+ const lede = text(section.copy.lede)
29
+ ---
30
+ <Band section={section} class:list={['signup', `signup-${layout}`]}>
31
+ <div class="signup-grid">
32
+ {(kicker || heading || lede) && (
33
+ <div class="signup-words">
34
+ {kicker && <p class="kicker">{kicker}</p>}
35
+ {heading && <h2>{heading}</h2>}
36
+ {lede && <p class="lede">{lede}</p>}
37
+ </div>
38
+ )}
39
+ <ModuleFrame
40
+ embed={section.embed}
41
+ band={section.band}
42
+ type={section.type}
43
+ layout={layout}
44
+ card={layout === 'card'}
45
+ title={heading ?? 'Sign up'}
46
+ height={layout === 'inline' ? '7rem' : layout === 'band' ? 'var(--signup-band-frame, 17rem)' : '24rem'}
47
+ />
48
+ </div>
49
+ </Band>
50
+
51
+ <style>
52
+ /* A1's .sec.tight: 48px of band above and below (32px on a phone). */
53
+ :global(.bg-section.signup-band),
54
+ :global(.bg-section.signup-inline) {
55
+ --bg-section-padding: clamp(2rem, 1.4rem + 1.6vw, 3rem) var(--gutter);
56
+ }
57
+ .signup-grid {
58
+ display: grid;
59
+ gap: 1.625rem;
60
+ align-items: center;
61
+ }
62
+ /* The band's frame starts as tall as its sign-up stands (on a phone the
63
+ fields two and one to a row, the button, the consent line; wider, two to a
64
+ row), so the whole sign-up shows before the frame reports its own height,
65
+ and still shows when that report never comes. */
66
+ :global(.signup-band) .signup-grid {
67
+ --signup-band-frame: 22rem;
68
+ }
69
+ .signup-words h2 {
70
+ max-width: 16em;
71
+ margin: 0;
72
+ font-size: clamp(1.75rem, 1.4rem + 1vw, 2.125rem);
73
+ line-height: 1.08;
74
+ }
75
+ /* C1's lede: one line under the heading, in the muted ink. */
76
+ .signup-words .lede {
77
+ max-width: 26em;
78
+ margin: clamp(0.625rem, 0.5rem + 0.4vw, 0.875rem) 0 0;
79
+ text-wrap: balance;
80
+ }
81
+ :global(.signup-card) .signup-grid {
82
+ max-width: 38rem;
83
+ margin-inline: auto;
84
+ }
85
+ :global(.signup-card) .signup-words {
86
+ text-align: center;
87
+ }
88
+ :global(.signup-card) .signup-words h2,
89
+ :global(.signup-card) .signup-words .lede {
90
+ margin-inline: auto;
91
+ }
92
+ @media (min-width: 48rem) {
93
+ :global(.signup-band) .signup-grid {
94
+ --signup-band-frame: 17rem;
95
+ grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
96
+ gap: 2.5rem;
97
+ }
98
+ :global(.signup-inline) .signup-grid {
99
+ grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
100
+ gap: 2rem;
101
+ }
102
+ }
103
+ </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="inline" />
@@ -0,0 +1,34 @@
1
+ ---
2
+ // SocialFeed: BackGold's hosted pages load the feed live and the Content API
3
+ // does not carry its posts, so today this section renders nothing. Should
4
+ // rows arrive, it lists each post's text with a link to it. The site's
5
+ // social profiles are in the footer either way.
6
+ import type { Section } from '@backgold/content'
7
+ import Band from '../Band.astro'
8
+ import { linkOf, rows } from '../../../lib/section'
9
+ import { text } from '../../../lib/format'
10
+
11
+ interface Props {
12
+ section: Section
13
+ variant?: string
14
+ }
15
+
16
+ const { section } = Astro.props
17
+ const heading = text(section.copy.heading)
18
+ const posts = rows(section)
19
+ .map((row) => ({ body: text(row.text) ?? text(row.title), link: linkOf('View the post', row.url) }))
20
+ .filter((p) => p.body)
21
+ ---
22
+ {posts.length > 0 && (
23
+ <Band section={section} class="feed">
24
+ {heading && <h2>{heading}</h2>}
25
+ <ul class="grid grid-3" role="list">
26
+ {posts.map((p) => (
27
+ <li class="tile">
28
+ <p>{p.body}</p>
29
+ {p.link && <p class="fine"><a href={p.link.href} rel={p.link.rel}>{p.link.label}</a></p>}
30
+ </li>
31
+ ))}
32
+ </ul>
33
+ </Band>
34
+ )}