@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.
- package/LICENSE +21 -0
- package/README.md +12 -2
- package/dist/chunk-KOB36GSF.js +62 -0
- package/dist/constants-DvTNj4JI.d-Batjcj3Z.d.ts +38 -0
- package/dist/content-api-CYeY0vU8.d.ts +849 -0
- package/dist/contract/content-api-examples.d.ts +58 -0
- package/dist/contract/content-api-examples.js +783 -0
- package/dist/contract/content-api.d.ts +2 -0
- package/dist/contract/content-api.js +1 -0
- package/dist/contract/site-templates.d.ts +252 -0
- package/dist/contract/site-templates.js +185 -0
- package/package.json +70 -3
- package/src/components/EntryCard.astro +35 -0
- package/src/components/EventMap.astro +118 -0
- package/src/components/EventPage.astro +194 -0
- package/src/components/FieldValue.astro +41 -0
- package/src/components/LeadingHero.astro +21 -0
- package/src/components/NotFound.astro +20 -0
- package/src/components/PageSections.astro +47 -0
- package/src/components/Prose.astro +18 -0
- package/src/components/chrome/Brand.astro +54 -0
- package/src/components/chrome/ClosingCall.astro +94 -0
- package/src/components/chrome/DonateStrip.astro +61 -0
- package/src/components/chrome/FooterColumns.astro +32 -0
- package/src/components/chrome/FooterContact.astro +28 -0
- package/src/components/chrome/MenuList.astro +45 -0
- package/src/components/chrome/ModeToggle.astro +125 -0
- package/src/components/chrome/SignedInNotice.astro +53 -0
- package/src/components/chrome/SignupBand.astro +12 -0
- package/src/components/chrome/TakeoverBanner.astro +56 -0
- package/src/components/chrome/VisitorAccount.astro +82 -0
- package/src/components/entries/AuthorBox.astro +47 -0
- package/src/components/entries/EntryFields.astro +29 -0
- package/src/components/entries/EntryHeader.astro +77 -0
- package/src/components/entries/ListFrame.astro +126 -0
- package/src/components/entries/ListSearch.astro +24 -0
- package/src/components/entries/Share.astro +24 -0
- package/src/components/entries/course/classroom.astro +26 -0
- package/src/components/entries/course/lesson.astro +18 -0
- package/src/components/entries/course/section.ts +20 -0
- package/src/components/entries/course/syllabus.astro +15 -0
- package/src/components/entries/index.ts +77 -0
- package/src/components/entries/newsletter/issue.astro +41 -0
- package/src/components/entries/newsletter/list.astro +26 -0
- package/src/components/entries/podcast/episode.astro +42 -0
- package/src/components/entries/podcast/list.astro +36 -0
- package/src/components/entries/post/article.astro +31 -0
- package/src/components/entries/post/list.astro +85 -0
- package/src/components/entries/props.ts +61 -0
- package/src/components/entries/video/cards.astro +39 -0
- package/src/components/entries/video/grid.astro +15 -0
- package/src/components/entries/video/watch.astro +41 -0
- package/src/components/live/LivePage.astro +215 -0
- package/src/components/live/LocalTime.astro +29 -0
- package/src/components/sections/About/books.astro +188 -0
- package/src/components/sections/About/credentials.ts +90 -0
- package/src/components/sections/About/index.astro +57 -0
- package/src/components/sections/About/left.astro +54 -0
- package/src/components/sections/About/letter.astro +108 -0
- package/src/components/sections/About/portrait.astro +308 -0
- package/src/components/sections/Advocacy/compact.astro +14 -0
- package/src/components/sections/Advocacy/index.astro +14 -0
- package/src/components/sections/Band.astro +39 -0
- package/src/components/sections/Blog/feature.astro +176 -0
- package/src/components/sections/Blog/index.astro +37 -0
- package/src/components/sections/Blog/latest.ts +80 -0
- package/src/components/sections/Blog/list.astro +186 -0
- package/src/components/sections/Booking/index.astro +139 -0
- package/src/components/sections/Booking/list.astro +144 -0
- package/src/components/sections/Booking/types.ts +60 -0
- package/src/components/sections/Calendar/agenda.astro +14 -0
- package/src/components/sections/Calendar/index.astro +14 -0
- package/src/components/sections/CandidateRoster/ballot.astro +394 -0
- package/src/components/sections/CandidateRoster/candidates.ts +69 -0
- package/src/components/sections/CandidateRoster/compact.astro +115 -0
- package/src/components/sections/CandidateRoster/index.astro +57 -0
- package/src/components/sections/CaseStudies/beforeafter.astro +222 -0
- package/src/components/sections/CaseStudies/cases.ts +111 -0
- package/src/components/sections/CaseStudies/grid.astro +261 -0
- package/src/components/sections/CaseStudies/index.astro +333 -0
- package/src/components/sections/Classroom/CourseCard.astro +181 -0
- package/src/components/sections/Classroom/Courses.astro +88 -0
- package/src/components/sections/Classroom/classroom.ts +141 -0
- package/src/components/sections/Classroom/index.astro +20 -0
- package/src/components/sections/Classroom/list.astro +15 -0
- package/src/components/sections/Collection/compact.astro +7 -0
- package/src/components/sections/Collection/entries.ts +62 -0
- package/src/components/sections/Collection/feature.astro +180 -0
- package/src/components/sections/Collection/index.astro +46 -0
- package/src/components/sections/Collection/library.astro +271 -0
- package/src/components/sections/Collection/list.astro +7 -0
- package/src/components/sections/Collection/outline.astro +134 -0
- package/src/components/sections/Collection/shelves.astro +191 -0
- package/src/components/sections/Comparison/Unlisted.astro +6 -0
- package/src/components/sections/Comparison/cards.astro +171 -0
- package/src/components/sections/Comparison/index.astro +191 -0
- package/src/components/sections/Comparison/sides.ts +98 -0
- package/src/components/sections/Comparison/spectrum.astro +261 -0
- package/src/components/sections/ContentPost/banner.astro +152 -0
- package/src/components/sections/ContentPost/index.astro +35 -0
- package/src/components/sections/ContentPost/lesson.ts +119 -0
- package/src/components/sections/ContentPost/player.astro +254 -0
- package/src/components/sections/ContentPost/theater.astro +329 -0
- package/src/components/sections/Countdown/index.astro +53 -0
- package/src/components/sections/Course/Bar.astro +46 -0
- package/src/components/sections/Course/CourseHead.astro +123 -0
- package/src/components/sections/Course/Crumbs.astro +44 -0
- package/src/components/sections/Course/Icon.astro +29 -0
- package/src/components/sections/Course/Ring.astro +62 -0
- package/src/components/sections/Course/Syllabus.astro +146 -0
- package/src/components/sections/Course/course.ts +146 -0
- package/src/components/sections/Course/index.astro +143 -0
- package/src/components/sections/Course/outline.astro +39 -0
- package/src/components/sections/Cta/banner.astro +64 -0
- package/src/components/sections/Cta/card.astro +88 -0
- package/src/components/sections/Cta/index.astro +31 -0
- package/src/components/sections/Cta/photo.astro +114 -0
- package/src/components/sections/Cta/strip.astro +91 -0
- package/src/components/sections/Donate/index.astro +136 -0
- package/src/components/sections/Donate/story.astro +7 -0
- package/src/components/sections/Event/card.astro +14 -0
- package/src/components/sections/Event/index.astro +14 -0
- package/src/components/sections/EventsList/AgendaMonths.astro +105 -0
- package/src/components/sections/EventsList/CalendarLine.astro +23 -0
- package/src/components/sections/EventsList/EventRows.astro +196 -0
- package/src/components/sections/EventsList/LiveCounts.astro +75 -0
- package/src/components/sections/EventsList/TypeTabs.astro +53 -0
- package/src/components/sections/EventsList/agenda.astro +55 -0
- package/src/components/sections/EventsList/calendar.astro +392 -0
- package/src/components/sections/EventsList/cards.astro +186 -0
- package/src/components/sections/EventsList/cohorts.astro +205 -0
- package/src/components/sections/EventsList/compact.astro +163 -0
- package/src/components/sections/EventsList/events.ts +168 -0
- package/src/components/sections/EventsList/index.astro +46 -0
- package/src/components/sections/EventsList/map.astro +436 -0
- package/src/components/sections/EventsList/shifts.astro +355 -0
- package/src/components/sections/EventsList/week.astro +361 -0
- package/src/components/sections/Faq/Contact.astro +63 -0
- package/src/components/sections/Faq/Questions.astro +98 -0
- package/src/components/sections/Faq/cards.astro +74 -0
- package/src/components/sections/Faq/faq.ts +101 -0
- package/src/components/sections/Faq/index.astro +49 -0
- package/src/components/sections/Faq/topics.astro +178 -0
- package/src/components/sections/Financials/Foot.astro +38 -0
- package/src/components/sections/Financials/Head.astro +47 -0
- package/src/components/sections/Financials/donut.astro +197 -0
- package/src/components/sections/Financials/financials.ts +52 -0
- package/src/components/sections/Financials/index.astro +148 -0
- package/src/components/sections/Financials/table.astro +157 -0
- package/src/components/sections/FormBlock/index.astro +33 -0
- package/src/components/sections/FormBlock/wide.astro +7 -0
- package/src/components/sections/Hero/cover.astro +170 -0
- package/src/components/sections/Hero/donate.astro +209 -0
- package/src/components/sections/Hero/field.astro +390 -0
- package/src/components/sections/Hero/index.astro +52 -0
- package/src/components/sections/Hero/overlap.astro +151 -0
- package/src/components/sections/Hero/rotating.astro +30 -0
- package/src/components/sections/Hero/split.astro +96 -0
- package/src/components/sections/Hero/statement.astro +55 -0
- package/src/components/sections/Hero/video.astro +399 -0
- package/src/components/sections/Issues/checklist.astro +204 -0
- package/src/components/sections/Issues/drawer.astro +237 -0
- package/src/components/sections/Issues/index.astro +115 -0
- package/src/components/sections/Issues/issues.ts +37 -0
- package/src/components/sections/Issues/numbered.astro +79 -0
- package/src/components/sections/Issues/rows.astro +137 -0
- package/src/components/sections/Issues/steps.astro +81 -0
- package/src/components/sections/Issues/tabs.astro +322 -0
- package/src/components/sections/Leaderboard/index.astro +29 -0
- package/src/components/sections/Lesson/Door.astro +121 -0
- package/src/components/sections/Lesson/LessonBody.astro +416 -0
- package/src/components/sections/Lesson/Rail.astro +182 -0
- package/src/components/sections/Lesson/Tracker.astro +137 -0
- package/src/components/sections/Lesson/index.astro +27 -0
- package/src/components/sections/Lesson/lesson.ts +233 -0
- package/src/components/sections/Lesson/reading.astro +21 -0
- package/src/components/sections/Map/CoverageLine.astro +19 -0
- package/src/components/sections/Map/RegionMap.astro +109 -0
- package/src/components/sections/Map/bar.astro +160 -0
- package/src/components/sections/Map/index.astro +192 -0
- package/src/components/sections/Map/map.astro +275 -0
- package/src/components/sections/MediaKit/BioCard.astro +108 -0
- package/src/components/sections/MediaKit/Downloads.astro +88 -0
- package/src/components/sections/MediaKit/index.astro +183 -0
- package/src/components/sections/MediaKit/kit.ts +140 -0
- package/src/components/sections/MediaKit/press.astro +189 -0
- package/src/components/sections/MediaKit/speaker.astro +205 -0
- package/src/components/sections/Membership/Benefits.astro +42 -0
- package/src/components/sections/Membership/Check.astro +12 -0
- package/src/components/sections/Membership/Price.astro +61 -0
- package/src/components/sections/Membership/compare.astro +312 -0
- package/src/components/sections/Membership/index.astro +281 -0
- package/src/components/sections/Membership/offers.ts +169 -0
- package/src/components/sections/Membership/tiers.astro +217 -0
- package/src/components/sections/MovementMap/index.astro +50 -0
- package/src/components/sections/MovementTicker/index.astro +43 -0
- package/src/components/sections/Pathways/Doors.astro +147 -0
- package/src/components/sections/Pathways/Head.astro +37 -0
- package/src/components/sections/Pathways/index.astro +27 -0
- package/src/components/sections/Pathways/pathways.ts +100 -0
- package/src/components/sections/Pathways/quiz.astro +286 -0
- package/src/components/sections/Pathways/tabs.astro +271 -0
- package/src/components/sections/PdfEmbed/card.astro +99 -0
- package/src/components/sections/PdfEmbed/index.astro +26 -0
- package/src/components/sections/PdfEmbed/medium.astro +7 -0
- package/src/components/sections/PdfEmbed/tall.astro +7 -0
- package/src/components/sections/Petition/coverage.astro +14 -0
- package/src/components/sections/Petition/image.astro +14 -0
- package/src/components/sections/Petition/index.astro +14 -0
- package/src/components/sections/Petition/map.astro +14 -0
- package/src/components/sections/PlatformPlanks/anchors.ts +66 -0
- package/src/components/sections/PlatformPlanks/columns.astro +171 -0
- package/src/components/sections/PlatformPlanks/index.astro +56 -0
- package/src/components/sections/PlatformPlanks/longread.astro +250 -0
- package/src/components/sections/PollBlock/index.astro +30 -0
- package/src/components/sections/Portfolio/featured.astro +343 -0
- package/src/components/sections/Portfolio/index.astro +571 -0
- package/src/components/sections/Portfolio/strip.astro +173 -0
- package/src/components/sections/Portfolio/work.ts +100 -0
- package/src/components/sections/Progress/MatchClock.astro +166 -0
- package/src/components/sections/Progress/compact.astro +150 -0
- package/src/components/sections/Progress/index.astro +32 -0
- package/src/components/sections/Progress/match.astro +126 -0
- package/src/components/sections/Progress/ring.astro +179 -0
- package/src/components/sections/QuickDonate/DonateCard.astro +149 -0
- package/src/components/sections/QuickDonate/Picker.astro +95 -0
- package/src/components/sections/QuickDonate/band.astro +164 -0
- package/src/components/sections/QuickDonate/bar.astro +208 -0
- package/src/components/sections/QuickDonate/donate.ts +126 -0
- package/src/components/sections/QuickDonate/hero.astro +143 -0
- package/src/components/sections/QuickDonate/index.astro +73 -0
- package/src/components/sections/QuickDonate/jar.astro +225 -0
- package/src/components/sections/QuickDonate/ladder.astro +248 -0
- package/src/components/sections/QuoteStrip/carousel.astro +340 -0
- package/src/components/sections/QuoteStrip/index.astro +58 -0
- package/src/components/sections/QuoteStrip/logos.astro +226 -0
- package/src/components/sections/QuoteStrip/quotes.ts +61 -0
- package/src/components/sections/QuoteStrip/single.astro +92 -0
- package/src/components/sections/QuoteStrip/ticker.astro +319 -0
- package/src/components/sections/QuoteStrip/wall.astro +113 -0
- package/src/components/sections/Resources/band.astro +93 -0
- package/src/components/sections/Resources/featured.astro +239 -0
- package/src/components/sections/Resources/index.astro +225 -0
- package/src/components/sections/Resources/resources.ts +92 -0
- package/src/components/sections/SampleBallot/Position.astro +39 -0
- package/src/components/sections/SampleBallot/ballot.ts +92 -0
- package/src/components/sections/SampleBallot/cards.astro +299 -0
- package/src/components/sections/SampleBallot/index.astro +326 -0
- package/src/components/sections/SampleBallot/measures.astro +172 -0
- package/src/components/sections/Scorecard/grades.astro +141 -0
- package/src/components/sections/Scorecard/index.astro +294 -0
- package/src/components/sections/Scorecard/promise.astro +167 -0
- package/src/components/sections/Scorecard/votes.ts +83 -0
- package/src/components/sections/SectionHead.astro +31 -0
- package/src/components/sections/Services/Button.astro +24 -0
- package/src/components/sections/Services/Check.astro +12 -0
- package/src/components/sections/Services/Includes.astro +42 -0
- package/src/components/sections/Services/compare.astro +328 -0
- package/src/components/sections/Services/index.astro +187 -0
- package/src/components/sections/Services/list.astro +181 -0
- package/src/components/sections/Services/services.ts +80 -0
- package/src/components/sections/ShareKit/Actions.astro +71 -0
- package/src/components/sections/ShareKit/Buttons.astro +62 -0
- package/src/components/sections/ShareKit/compact.astro +123 -0
- package/src/components/sections/ShareKit/index.astro +160 -0
- package/src/components/sections/ShareKit/share.ts +60 -0
- package/src/components/sections/ShareKit/strip.astro +173 -0
- package/src/components/sections/SignupCapture/band.astro +7 -0
- package/src/components/sections/SignupCapture/index.astro +103 -0
- package/src/components/sections/SignupCapture/inline.astro +7 -0
- package/src/components/sections/SocialFeed/index.astro +34 -0
- package/src/components/sections/StatCards/feature.astro +143 -0
- package/src/components/sections/StatCards/index.astro +51 -0
- package/src/components/sections/StatCards/ribbon.astro +113 -0
- package/src/components/sections/StatCards/wall.astro +177 -0
- package/src/components/sections/Store/featured.astro +14 -0
- package/src/components/sections/Store/index.astro +14 -0
- package/src/components/sections/Stories/Status.astro +42 -0
- package/src/components/sections/Stories/StoryCards.astro +171 -0
- package/src/components/sections/Stories/cards.astro +42 -0
- package/src/components/sections/Stories/index.astro +238 -0
- package/src/components/sections/Stories/stories.ts +97 -0
- package/src/components/sections/Stories/timeline.astro +135 -0
- package/src/components/sections/TeamGrid/board.astro +280 -0
- package/src/components/sections/TeamGrid/index.astro +71 -0
- package/src/components/sections/TeamGrid/list.astro +306 -0
- package/src/components/sections/TeamGrid/people.ts +178 -0
- package/src/components/sections/VideoEmbed/index.astro +52 -0
- package/src/components/sections/VideoEmbed/landscape.astro +7 -0
- package/src/components/sections/VideoEmbed/portrait.astro +7 -0
- package/src/components/sections/VideoEmbed/square.astro +7 -0
- package/src/components/sections/VoterTools/DaysLeft.astro +33 -0
- package/src/components/sections/VoterTools/dates.astro +149 -0
- package/src/components/sections/VoterTools/index.astro +228 -0
- package/src/components/sections/VoterTools/polling.astro +141 -0
- package/src/components/sections/VoterTools/voter-tools.ts +70 -0
- package/src/components/sections/index.ts +370 -0
- package/src/components/sections/modules/Headed.astro +39 -0
- package/src/components/sections/modules/ModuleFrame.astro +179 -0
- package/src/components/volunteer/ShiftLive.astro +90 -0
- package/src/components/volunteer/detail.astro +247 -0
- package/src/components/volunteer/list.astro +298 -0
- package/src/components/volunteer/props.ts +21 -0
- package/src/env.d.ts +22 -0
- package/src/index.d.ts +10 -0
- package/src/index.js +64 -0
- package/src/layouts/Site.astro +371 -0
- package/src/lib/academy.ts +146 -0
- package/src/lib/brand.ts +534 -0
- package/src/lib/chrome.ts +119 -0
- package/src/lib/donate-frame.ts +64 -0
- package/src/lib/entries.ts +190 -0
- package/src/lib/env.ts +34 -0
- package/src/lib/event-map-draw.ts +91 -0
- package/src/lib/events.ts +476 -0
- package/src/lib/fonts.ts +116 -0
- package/src/lib/footer.ts +24 -0
- package/src/lib/format.ts +160 -0
- package/src/lib/geo.ts +131 -0
- package/src/lib/live.ts +54 -0
- package/src/lib/menu.ts +48 -0
- package/src/lib/petition-text.ts +29 -0
- package/src/lib/reading.ts +17 -0
- package/src/lib/regions.ts +215 -0
- package/src/lib/section.ts +94 -0
- package/src/lib/shifts.ts +186 -0
- package/src/lib/stream-time.ts +20 -0
- package/src/lib/stream.ts +141 -0
- package/src/lib/visitor.ts +54 -0
- package/src/routes/catch-all.astro +286 -0
- package/src/routes/form.astro +30 -0
- package/src/routes/live.astro +49 -0
- package/src/routes/not-found.astro +18 -0
- package/src/routes/preview.astro +60 -0
- package/src/routes/setup.astro +62 -0
- package/src/routes/volunteer-shift.astro +61 -0
- package/src/routes/volunteer.astro +37 -0
- package/src/styles/entries.css +784 -0
- package/src/styles/site.css +1839 -0
- package/src/template.ts +182 -0
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
---
|
|
2
|
+
// TeamGrid · Board (board A3, "Team & open roles · Board"; A12 shows it beside
|
|
3
|
+
// Grid): the party's board as seats, each with the photo (the holder's
|
|
4
|
+
// initials when there is none), its role over the holder's name, and a line
|
|
5
|
+
// under it. Four seats across on a wide screen, two on a phone. With no rows
|
|
6
|
+
// it draws nothing.
|
|
7
|
+
//
|
|
8
|
+
// When the rows are the party's seats (people.ts), each body is a group under
|
|
9
|
+
// its name with its seat count, in BackGold's order (the officers' body
|
|
10
|
+
// first, Staff last); a term every seat in the body shares is written beside
|
|
11
|
+
// the count ("term ends April 2027"), otherwise on each seat. A held seat's
|
|
12
|
+
// line is "since 2023", then the holder's bio. A vacant seat is drawn as an
|
|
13
|
+
// invitation, not a blank: "This seat is open" with the section's open-roles
|
|
14
|
+
// line (else "Any member in good standing can stand for it at convention.")
|
|
15
|
+
// and "Ask about running" to its open role's page (else the section's
|
|
16
|
+
// "interested?" link). Open roles that arrive without a seat follow, under
|
|
17
|
+
// "Open roles".
|
|
18
|
+
//
|
|
19
|
+
// When the rows are the older groups, officers come first (the leadership
|
|
20
|
+
// rows: role over the name, the short bio under it), then the at-large
|
|
21
|
+
// members (the staff rows, with their department), then each open role as an
|
|
22
|
+
// open seat in the same group.
|
|
23
|
+
import type { ComponentProps } from 'astro/types'
|
|
24
|
+
import type Default from './index.astro'
|
|
25
|
+
import Band from '../Band.astro'
|
|
26
|
+
import { text } from '../../../lib/format'
|
|
27
|
+
import { bodiesOf, initials, sharedTerm, teamOf } from './people'
|
|
28
|
+
|
|
29
|
+
type Props = ComponentProps<typeof Default>
|
|
30
|
+
|
|
31
|
+
const OPEN_LINE = 'Any member in good standing can stand for it at convention.'
|
|
32
|
+
|
|
33
|
+
const { section } = Astro.props
|
|
34
|
+
const heading = text(section.copy.heading)
|
|
35
|
+
const intro = text(section.copy.teamOpenRolesIntro)
|
|
36
|
+
const team = teamOf(section)
|
|
37
|
+
const { interest } = team
|
|
38
|
+
const bodies = bodiesOf(section)
|
|
39
|
+
const bySeat = bodies.length > 0
|
|
40
|
+
// By seat, the open roles that came without a seat; by group, every row.
|
|
41
|
+
const { leaders, staff } = bySeat ? { leaders: [], staff: [] } : team
|
|
42
|
+
const open = bySeat ? team.openRoles : team.open
|
|
43
|
+
const seats = staff.length + open.length
|
|
44
|
+
const count = (n: number) => (n === 1 ? '1 seat' : `${n} seats`)
|
|
45
|
+
const ask = (link: { href: string; rel: 'noopener' | undefined } | null) => (link ? { ...link, label: 'Ask about running' } : interest)
|
|
46
|
+
---
|
|
47
|
+
{(bySeat || leaders.length > 0 || seats > 0) && (
|
|
48
|
+
<Band section={section} class="team team-board">
|
|
49
|
+
{heading && <h2>{heading}</h2>}
|
|
50
|
+
{bodies.map((body) => {
|
|
51
|
+
const term = sharedTerm(body)
|
|
52
|
+
return (
|
|
53
|
+
<div class="seat-group">
|
|
54
|
+
<h3 class="seat-group-name">
|
|
55
|
+
{body.name} <span class="seat-group-count">{[count(body.seats.length), term && `term ends ${term}`].filter(Boolean).join(' · ')}</span>
|
|
56
|
+
</h3>
|
|
57
|
+
<ul class="seats" role="list">
|
|
58
|
+
{body.seats.map((s) => {
|
|
59
|
+
if (!s.name) {
|
|
60
|
+
const button = ask(s.link)
|
|
61
|
+
return (
|
|
62
|
+
<li class="seat seat-open">
|
|
63
|
+
<span class="seat-photo seat-empty" aria-hidden="true">?</span>
|
|
64
|
+
<p class="seat-role">{[s.seat, 'open seat'].filter(Boolean).join(' · ')}</p>
|
|
65
|
+
<h4 class="seat-name">This seat is open</h4>
|
|
66
|
+
<p class="seat-line">{intro ?? OPEN_LINE}</p>
|
|
67
|
+
{!term && s.termEnds && <p class="seat-line">term ends {s.termEnds}</p>}
|
|
68
|
+
{button && (
|
|
69
|
+
<p class="seat-ask">
|
|
70
|
+
<a class="button" href={button.href} rel={button.rel}>
|
|
71
|
+
{button.label}<span class="visually-hidden">: {s.seat ?? body.name}</span>
|
|
72
|
+
</a>
|
|
73
|
+
</p>
|
|
74
|
+
)}
|
|
75
|
+
</li>
|
|
76
|
+
)
|
|
77
|
+
}
|
|
78
|
+
const line = [s.since && `since ${s.since}`, !term && s.termEnds && `term ends ${s.termEnds}`].filter(Boolean).join(' · ')
|
|
79
|
+
return (
|
|
80
|
+
<li class="seat">
|
|
81
|
+
{s.photo ? (
|
|
82
|
+
<img class="seat-photo" src={s.photo} alt="" loading="lazy" decoding="async" />
|
|
83
|
+
) : (
|
|
84
|
+
<span class="seat-photo seat-initials" aria-hidden="true">{initials(s.name)}</span>
|
|
85
|
+
)}
|
|
86
|
+
{s.seat && <p class="seat-role">{s.seat}</p>}
|
|
87
|
+
<h4 class="seat-name">{s.link ? <a href={s.link.href} rel={s.link.rel}>{s.name}</a> : s.name}</h4>
|
|
88
|
+
{line && <p class="seat-line">{line}</p>}
|
|
89
|
+
{s.bio && <p class="seat-line">{s.bio}</p>}
|
|
90
|
+
</li>
|
|
91
|
+
)
|
|
92
|
+
})}
|
|
93
|
+
</ul>
|
|
94
|
+
</div>
|
|
95
|
+
)
|
|
96
|
+
})}
|
|
97
|
+
{leaders.length > 0 && (
|
|
98
|
+
<div class="seat-group">
|
|
99
|
+
<h3 class="seat-group-name">Officers</h3>
|
|
100
|
+
<ul class="seats" role="list">
|
|
101
|
+
{leaders.map((p) => (
|
|
102
|
+
<li class="seat">
|
|
103
|
+
{p.photo ? (
|
|
104
|
+
<img class="seat-photo" src={p.photo} alt="" loading="lazy" decoding="async" />
|
|
105
|
+
) : (
|
|
106
|
+
<span class="seat-photo seat-initials" aria-hidden="true">{initials(p.name)}</span>
|
|
107
|
+
)}
|
|
108
|
+
{p.role && <p class="seat-role">{p.role}</p>}
|
|
109
|
+
<h4 class="seat-name">{p.link ? <a href={p.link.href} rel={p.link.rel}>{p.name}</a> : p.name}</h4>
|
|
110
|
+
{p.bio && <p class="seat-line">{p.bio}</p>}
|
|
111
|
+
</li>
|
|
112
|
+
))}
|
|
113
|
+
</ul>
|
|
114
|
+
</div>
|
|
115
|
+
)}
|
|
116
|
+
{seats > 0 && (
|
|
117
|
+
<div class="seat-group">
|
|
118
|
+
<h3 class="seat-group-name">
|
|
119
|
+
{bySeat ? 'Open roles' : 'At-large members'} <span class="seat-group-count">{count(seats)}</span>
|
|
120
|
+
</h3>
|
|
121
|
+
<ul class="seats" role="list">
|
|
122
|
+
{staff.map((p) => (
|
|
123
|
+
<li class="seat">
|
|
124
|
+
{p.photo ? (
|
|
125
|
+
<img class="seat-photo" src={p.photo} alt="" loading="lazy" decoding="async" />
|
|
126
|
+
) : (
|
|
127
|
+
<span class="seat-photo seat-initials" aria-hidden="true">{initials(p.name)}</span>
|
|
128
|
+
)}
|
|
129
|
+
{p.role && <p class="seat-role">{p.role}</p>}
|
|
130
|
+
<h4 class="seat-name">{p.link ? <a href={p.link.href} rel={p.link.rel}>{p.name}</a> : p.name}</h4>
|
|
131
|
+
{p.dept && <p class="seat-line">{p.dept}</p>}
|
|
132
|
+
</li>
|
|
133
|
+
))}
|
|
134
|
+
{open.map((p) => {
|
|
135
|
+
const button = ask(p.link)
|
|
136
|
+
return (
|
|
137
|
+
<li class="seat seat-open">
|
|
138
|
+
<span class="seat-photo seat-empty" aria-hidden="true">?</span>
|
|
139
|
+
<p class="seat-role">{[p.role, p.dept].filter(Boolean).join(' · ')} · open seat</p>
|
|
140
|
+
<h4 class="seat-name">This seat is open</h4>
|
|
141
|
+
{(p.blurb ?? intro) && <p class="seat-line">{p.blurb ?? intro}</p>}
|
|
142
|
+
{button && (
|
|
143
|
+
<p class="seat-ask">
|
|
144
|
+
<a class="button" href={button.href} rel={button.rel}>
|
|
145
|
+
{button.label}<span class="visually-hidden">: {p.role}</span>
|
|
146
|
+
</a>
|
|
147
|
+
</p>
|
|
148
|
+
)}
|
|
149
|
+
</li>
|
|
150
|
+
)
|
|
151
|
+
})}
|
|
152
|
+
</ul>
|
|
153
|
+
</div>
|
|
154
|
+
)}
|
|
155
|
+
</Band>
|
|
156
|
+
)}
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
<style>
|
|
160
|
+
.seat-group + .seat-group {
|
|
161
|
+
margin-top: 2.25rem;
|
|
162
|
+
}
|
|
163
|
+
.seat-group-name {
|
|
164
|
+
display: flex;
|
|
165
|
+
flex-wrap: wrap;
|
|
166
|
+
align-items: baseline;
|
|
167
|
+
gap: 0.25rem 0.75rem;
|
|
168
|
+
margin: 0 0 1rem;
|
|
169
|
+
font-size: calc(var(--h3) * 1.05);
|
|
170
|
+
font-weight: 800;
|
|
171
|
+
}
|
|
172
|
+
.seat-group-count {
|
|
173
|
+
color: var(--muted);
|
|
174
|
+
font-family: var(--font);
|
|
175
|
+
font-size: var(--text-sm);
|
|
176
|
+
font-weight: 600;
|
|
177
|
+
letter-spacing: 0;
|
|
178
|
+
}
|
|
179
|
+
.seats {
|
|
180
|
+
display: grid;
|
|
181
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
182
|
+
gap: 0.75rem;
|
|
183
|
+
margin: 0;
|
|
184
|
+
padding: 0;
|
|
185
|
+
list-style: none;
|
|
186
|
+
}
|
|
187
|
+
.seat {
|
|
188
|
+
display: flex;
|
|
189
|
+
flex-direction: column;
|
|
190
|
+
min-width: 0;
|
|
191
|
+
padding: 0.875rem;
|
|
192
|
+
border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
|
|
193
|
+
border-radius: calc(var(--radius) * 1.5);
|
|
194
|
+
background: color-mix(in srgb, var(--page) 70%, transparent);
|
|
195
|
+
}
|
|
196
|
+
:global(.bg-band-contrast) .seat {
|
|
197
|
+
background: color-mix(in srgb, var(--ink) 7%, transparent);
|
|
198
|
+
}
|
|
199
|
+
.seat > * {
|
|
200
|
+
margin: 0;
|
|
201
|
+
}
|
|
202
|
+
.seat-photo {
|
|
203
|
+
display: block;
|
|
204
|
+
width: 100%;
|
|
205
|
+
aspect-ratio: 1;
|
|
206
|
+
object-fit: cover;
|
|
207
|
+
border-radius: var(--radius);
|
|
208
|
+
}
|
|
209
|
+
.seat-initials,
|
|
210
|
+
.seat-empty {
|
|
211
|
+
display: grid;
|
|
212
|
+
place-items: center;
|
|
213
|
+
background: color-mix(in srgb, var(--ink) 8%, transparent);
|
|
214
|
+
color: var(--muted);
|
|
215
|
+
font-family: var(--font-display);
|
|
216
|
+
font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem);
|
|
217
|
+
font-weight: 700;
|
|
218
|
+
letter-spacing: 0.04em;
|
|
219
|
+
}
|
|
220
|
+
.seat .seat-role {
|
|
221
|
+
margin-top: 0.875rem;
|
|
222
|
+
color: var(--link);
|
|
223
|
+
font-size: var(--text-xs);
|
|
224
|
+
font-weight: 700;
|
|
225
|
+
letter-spacing: 0.12em;
|
|
226
|
+
text-transform: uppercase;
|
|
227
|
+
}
|
|
228
|
+
.seat .seat-name {
|
|
229
|
+
margin-top: 0.25rem;
|
|
230
|
+
font-family: var(--font-display);
|
|
231
|
+
font-size: var(--text-lg);
|
|
232
|
+
font-weight: 700;
|
|
233
|
+
line-height: 1.2;
|
|
234
|
+
}
|
|
235
|
+
.seat-name a {
|
|
236
|
+
color: var(--ink);
|
|
237
|
+
}
|
|
238
|
+
.seat .seat-line {
|
|
239
|
+
margin-top: 0.25rem;
|
|
240
|
+
color: var(--muted);
|
|
241
|
+
font-size: var(--text-sm);
|
|
242
|
+
}
|
|
243
|
+
.seat-open {
|
|
244
|
+
border: 2px dashed color-mix(in srgb, var(--ink) 25%, transparent);
|
|
245
|
+
background: transparent;
|
|
246
|
+
}
|
|
247
|
+
:global(.bg-band-contrast) .seat-open {
|
|
248
|
+
background: transparent;
|
|
249
|
+
}
|
|
250
|
+
.seat .seat-ask {
|
|
251
|
+
margin-top: auto;
|
|
252
|
+
padding-top: 0.75rem;
|
|
253
|
+
}
|
|
254
|
+
.seat-ask .button {
|
|
255
|
+
padding: 0.5rem 1rem;
|
|
256
|
+
font-size: var(--text-sm);
|
|
257
|
+
line-height: 1.2;
|
|
258
|
+
text-align: center;
|
|
259
|
+
}
|
|
260
|
+
@media (min-width: 48rem) {
|
|
261
|
+
.seats {
|
|
262
|
+
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
263
|
+
gap: 1.25rem;
|
|
264
|
+
}
|
|
265
|
+
.seat {
|
|
266
|
+
padding: 1.125rem;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
270
|
+
.seat:not(.seat-open) {
|
|
271
|
+
transition:
|
|
272
|
+
transform 0.15s ease,
|
|
273
|
+
box-shadow 0.15s ease;
|
|
274
|
+
}
|
|
275
|
+
.seat:not(.seat-open):hover {
|
|
276
|
+
transform: translateY(-2px);
|
|
277
|
+
box-shadow: 0 10px 24px rgb(0 0 0 / 0.1);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
</style>
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
// TeamGrid: the people behind the organization in three groups: leadership
|
|
3
|
+
// (photo, role, a short bio), staff (name, role, department) and open roles,
|
|
4
|
+
// with the section's "interested?" link under the open roles. Rows that are
|
|
5
|
+
// the party's seats are read into the same groups (people.ts): a held seat is
|
|
6
|
+
// a leader (Staff's seats, staff) with the seat as the role, a vacant seat an
|
|
7
|
+
// open role.
|
|
8
|
+
import type { Section } from '@backgold/content'
|
|
9
|
+
import Band from '../Band.astro'
|
|
10
|
+
import { text } from '../../../lib/format'
|
|
11
|
+
import { initials, teamOf } from './people'
|
|
12
|
+
|
|
13
|
+
interface Props {
|
|
14
|
+
section: Section
|
|
15
|
+
variant?: string
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const { section } = Astro.props
|
|
19
|
+
const heading = text(section.copy.heading)
|
|
20
|
+
const intro = text(section.copy.teamOpenRolesIntro)
|
|
21
|
+
const { leaders, staff, open, interest } = teamOf(section)
|
|
22
|
+
// When some leaders have a photo, the others get their initials in its place so the row lines up.
|
|
23
|
+
const anyPhoto = leaders.some((p) => p.photo)
|
|
24
|
+
---
|
|
25
|
+
{(leaders.length > 0 || staff.length > 0 || open.length > 0) && (
|
|
26
|
+
<Band section={section} class="team">
|
|
27
|
+
{heading && <h2>{heading}</h2>}
|
|
28
|
+
{leaders.length > 0 && (
|
|
29
|
+
<ul class="grid grid-3" role="list">
|
|
30
|
+
{leaders.map((p) => (
|
|
31
|
+
<li class="person">
|
|
32
|
+
{p.photo ? (
|
|
33
|
+
<img class="person-photo" src={p.photo} alt="" loading="lazy" decoding="async" />
|
|
34
|
+
) : (
|
|
35
|
+
anyPhoto && <div class="person-photo person-initials" aria-hidden="true">{initials(p.name)}</div>
|
|
36
|
+
)}
|
|
37
|
+
<h3>{p.link ? <a href={p.link.href} rel={p.link.rel}>{p.name}</a> : p.name}</h3>
|
|
38
|
+
{p.role && <p class="muted">{p.role}</p>}
|
|
39
|
+
{p.bio && <p class="fine">{p.bio}</p>}
|
|
40
|
+
</li>
|
|
41
|
+
))}
|
|
42
|
+
</ul>
|
|
43
|
+
)}
|
|
44
|
+
{staff.length > 0 && (
|
|
45
|
+
<ul class="staff-list" role="list">
|
|
46
|
+
{staff.map((p) => (
|
|
47
|
+
<li>
|
|
48
|
+
<strong>{p.link ? <a href={p.link.href} rel={p.link.rel}>{p.name}</a> : p.name}</strong>
|
|
49
|
+
{[p.role, p.dept].filter(Boolean).length > 0 && <span class="muted"> · {[p.role, p.dept].filter(Boolean).join(', ')}</span>}
|
|
50
|
+
</li>
|
|
51
|
+
))}
|
|
52
|
+
</ul>
|
|
53
|
+
)}
|
|
54
|
+
{open.length > 0 && (
|
|
55
|
+
<div class="open-roles">
|
|
56
|
+
<h3>Open roles</h3>
|
|
57
|
+
{intro && <p class="lede">{intro}</p>}
|
|
58
|
+
<ul class="staff-list" role="list">
|
|
59
|
+
{open.map((p) => (
|
|
60
|
+
<li>
|
|
61
|
+
<strong>{p.link ? <a href={p.link.href} rel={p.link.rel}>{p.role}</a> : p.role}</strong>
|
|
62
|
+
{p.dept && <span class="muted"> · {p.dept}</span>}
|
|
63
|
+
{p.blurb && <p class="fine">{p.blurb}</p>}
|
|
64
|
+
</li>
|
|
65
|
+
))}
|
|
66
|
+
</ul>
|
|
67
|
+
{interest && <p class="actions"><a class="button button-quiet" href={interest.href} rel={interest.rel}>{interest.label}</a></p>}
|
|
68
|
+
</div>
|
|
69
|
+
)}
|
|
70
|
+
</Band>
|
|
71
|
+
)}
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
---
|
|
2
|
+
// TeamGrid · List (A12, "Team & open roles · List": the people as rows): one
|
|
3
|
+
// row per person, the headshot as a small round avatar (the holder's
|
|
4
|
+
// initials when there is none, so the rows line up), then the name, a muted
|
|
5
|
+
// role line, a chip and a short line under it, with a hairline between rows.
|
|
6
|
+
// On a phone the avatar stays at the left, the words stack, the chips wrap
|
|
7
|
+
// under the role line and a row's button goes under its words. With no rows
|
|
8
|
+
// it draws nothing.
|
|
9
|
+
//
|
|
10
|
+
// When the rows are the party's seats (people.ts), each body is a group
|
|
11
|
+
// under its name with its seat count, in BackGold's order (the officers'
|
|
12
|
+
// body first, Staff last); a term every seat in the body shares is written
|
|
13
|
+
// beside the count ("term ends April 2027"), otherwise on the seat's role
|
|
14
|
+
// line after "since 2023". The holder's name links to their page, their bio
|
|
15
|
+
// is the line under it, and when the section has more than one body each
|
|
16
|
+
// row carries its body as a chip. A vacant seat is an open row in its place:
|
|
17
|
+
// a "?" avatar, "This seat is open", the role line "Chair · open seat", the
|
|
18
|
+
// section's open-roles line (else "Any member in good standing can stand for
|
|
19
|
+
// it at convention.") and a small quiet "Ask about running" to its open
|
|
20
|
+
// role's page (else the section's "interested?" link). Open roles that
|
|
21
|
+
// arrive without a seat follow under "Open roles".
|
|
22
|
+
//
|
|
23
|
+
// When the rows are the older groups, the leadership rows come first (role,
|
|
24
|
+
// short bio), then the staff (role, the department as a chip), then "Open
|
|
25
|
+
// roles" with the section's intro, each open role a row: the role, its
|
|
26
|
+
// department as a chip, the line about it and a small quiet "Apply" to its
|
|
27
|
+
// own page (else the section's "interested?" link). When every open role has
|
|
28
|
+
// its own page, the section's "interested?" link follows the list.
|
|
29
|
+
import type { ComponentProps } from 'astro/types'
|
|
30
|
+
import type Default from './index.astro'
|
|
31
|
+
import Band from '../Band.astro'
|
|
32
|
+
import type { Link } from '../../../lib/section'
|
|
33
|
+
import { text } from '../../../lib/format'
|
|
34
|
+
import { bodiesOf, initials, sharedTerm, teamOf } from './people'
|
|
35
|
+
|
|
36
|
+
type Props = ComponentProps<typeof Default>
|
|
37
|
+
|
|
38
|
+
interface Line {
|
|
39
|
+
open: boolean
|
|
40
|
+
photo: string | null
|
|
41
|
+
initials: string
|
|
42
|
+
/** The bold words: the holder's name, or for an open row the role or "This seat is open". */
|
|
43
|
+
name: string
|
|
44
|
+
link: Link | null
|
|
45
|
+
role: string | null
|
|
46
|
+
chip: string | null
|
|
47
|
+
line: string | null
|
|
48
|
+
/** An open row's button, with the seat or role it is about for a screen reader. */
|
|
49
|
+
ask: Link | null
|
|
50
|
+
about: string
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
interface Group {
|
|
54
|
+
name: string | null
|
|
55
|
+
meta: string | null
|
|
56
|
+
intro: string | null
|
|
57
|
+
lines: Line[]
|
|
58
|
+
/** The section's "interested?" link after the rows, when no row carries it. */
|
|
59
|
+
after: Link | null
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const OPEN_LINE = 'Any member in good standing can stand for it at convention.'
|
|
63
|
+
|
|
64
|
+
const { section } = Astro.props
|
|
65
|
+
const heading = text(section.copy.heading)
|
|
66
|
+
const intro = text(section.copy.teamOpenRolesIntro)
|
|
67
|
+
const team = teamOf(section)
|
|
68
|
+
const { interest } = team
|
|
69
|
+
const bodies = bodiesOf(section)
|
|
70
|
+
const bySeat = bodies.length > 0
|
|
71
|
+
// By seat, the open roles that came without a seat; by group, every row.
|
|
72
|
+
const { leaders, staff } = bySeat ? { leaders: [], staff: [] } : team
|
|
73
|
+
const open = bySeat ? team.openRoles : team.open
|
|
74
|
+
const manyBodies = bodies.length > 1
|
|
75
|
+
const count = (n: number) => (n === 1 ? '1 seat' : `${n} seats`)
|
|
76
|
+
const joined = (parts: (string | null | false)[]) => parts.filter(Boolean).join(' · ') || null
|
|
77
|
+
const relabel = (label: string) => (link: Link | null) => (link ? { ...link, label } : interest)
|
|
78
|
+
const ask = relabel('Ask about running')
|
|
79
|
+
const apply = relabel('Apply')
|
|
80
|
+
|
|
81
|
+
const groups: Group[] = bodies.map((body) => {
|
|
82
|
+
const term = sharedTerm(body)
|
|
83
|
+
return {
|
|
84
|
+
name: body.name,
|
|
85
|
+
meta: joined([count(body.seats.length), term && `term ends ${term}`]),
|
|
86
|
+
intro: null,
|
|
87
|
+
after: null,
|
|
88
|
+
lines: body.seats.map((s): Line => {
|
|
89
|
+
const termLine = !term && s.termEnds && `term ends ${s.termEnds}`
|
|
90
|
+
const base = { photo: s.photo, chip: manyBodies ? body.name : null, about: s.seat ?? body.name }
|
|
91
|
+
return s.name
|
|
92
|
+
? { ...base, open: false, initials: initials(s.name), name: s.name, link: s.link, role: joined([s.seat, s.since && `since ${s.since}`, termLine]), line: s.bio, ask: null }
|
|
93
|
+
: { ...base, open: true, initials: '?', name: 'This seat is open', link: null, role: joined([s.seat, 'open seat', termLine]), line: intro ?? OPEN_LINE, ask: ask(s.link) }
|
|
94
|
+
}),
|
|
95
|
+
}
|
|
96
|
+
})
|
|
97
|
+
|
|
98
|
+
const people: Line[] = [...leaders.map((p) => ({ p, chip: null })), ...staff.map((p) => ({ p, chip: p.dept }))].map(({ p, chip }) => ({
|
|
99
|
+
open: false,
|
|
100
|
+
photo: p.photo,
|
|
101
|
+
initials: initials(p.name),
|
|
102
|
+
name: p.name ?? '',
|
|
103
|
+
link: p.link,
|
|
104
|
+
role: p.role,
|
|
105
|
+
chip,
|
|
106
|
+
line: p.bio,
|
|
107
|
+
ask: null,
|
|
108
|
+
about: p.name ?? '',
|
|
109
|
+
}))
|
|
110
|
+
if (people.length > 0) groups.push({ name: null, meta: null, intro: null, after: null, lines: people })
|
|
111
|
+
|
|
112
|
+
if (open.length > 0) {
|
|
113
|
+
groups.push({
|
|
114
|
+
name: 'Open roles',
|
|
115
|
+
meta: null,
|
|
116
|
+
intro,
|
|
117
|
+
after: open.every((p) => p.link) ? interest : null,
|
|
118
|
+
lines: open.map((p) => ({
|
|
119
|
+
open: true,
|
|
120
|
+
photo: null,
|
|
121
|
+
initials: '?',
|
|
122
|
+
name: p.role ?? 'Open role',
|
|
123
|
+
link: null,
|
|
124
|
+
role: 'Open role',
|
|
125
|
+
chip: p.dept,
|
|
126
|
+
line: p.blurb,
|
|
127
|
+
ask: apply(p.link),
|
|
128
|
+
about: p.role ?? 'Open role',
|
|
129
|
+
})),
|
|
130
|
+
})
|
|
131
|
+
}
|
|
132
|
+
---
|
|
133
|
+
{groups.length > 0 && (
|
|
134
|
+
<Band section={section} class="team team-list">
|
|
135
|
+
{heading && <h2>{heading}</h2>}
|
|
136
|
+
{groups.map((group) => (
|
|
137
|
+
<div class="list-group">
|
|
138
|
+
{group.name && (
|
|
139
|
+
<h3 class="list-group-name">
|
|
140
|
+
{group.name} {group.meta && <span class="list-group-meta">{group.meta}</span>}
|
|
141
|
+
</h3>
|
|
142
|
+
)}
|
|
143
|
+
{group.intro && <p class="list-intro">{group.intro}</p>}
|
|
144
|
+
<ul class="rows" role="list">
|
|
145
|
+
{group.lines.map((l) => (
|
|
146
|
+
<li class:list={['row', { 'row-open': l.open }]}>
|
|
147
|
+
{l.photo ? (
|
|
148
|
+
<img class="row-photo" src={l.photo} alt="" loading="lazy" decoding="async" />
|
|
149
|
+
) : (
|
|
150
|
+
<span class:list={['row-photo', l.open ? 'row-empty' : 'row-initials']} aria-hidden="true">{l.initials}</span>
|
|
151
|
+
)}
|
|
152
|
+
<div class="row-words">
|
|
153
|
+
<p class="row-name">{l.link ? <a href={l.link.href} rel={l.link.rel}>{l.name}</a> : l.name}</p>
|
|
154
|
+
{(l.role || l.chip) && (
|
|
155
|
+
<p class="row-meta">
|
|
156
|
+
{l.role && <span class="row-role">{l.role}</span>}
|
|
157
|
+
{l.chip && <span class="chip">{l.chip}</span>}
|
|
158
|
+
</p>
|
|
159
|
+
)}
|
|
160
|
+
{l.line && <p class="fine row-line">{l.line}</p>}
|
|
161
|
+
</div>
|
|
162
|
+
{l.ask && (
|
|
163
|
+
<p class="row-ask">
|
|
164
|
+
<a class="button button-quiet button-small" href={l.ask.href} rel={l.ask.rel}>
|
|
165
|
+
{l.ask.label}<span class="visually-hidden">: {l.about}</span>
|
|
166
|
+
</a>
|
|
167
|
+
</p>
|
|
168
|
+
)}
|
|
169
|
+
</li>
|
|
170
|
+
))}
|
|
171
|
+
</ul>
|
|
172
|
+
{group.after && (
|
|
173
|
+
<p class="list-after">
|
|
174
|
+
<a class="button button-quiet button-small" href={group.after.href} rel={group.after.rel}>{group.after.label}</a>
|
|
175
|
+
</p>
|
|
176
|
+
)}
|
|
177
|
+
</div>
|
|
178
|
+
))}
|
|
179
|
+
</Band>
|
|
180
|
+
)}
|
|
181
|
+
|
|
182
|
+
<style>
|
|
183
|
+
.list-group {
|
|
184
|
+
max-width: 56rem;
|
|
185
|
+
}
|
|
186
|
+
.list-group + .list-group {
|
|
187
|
+
margin-top: 2.25rem;
|
|
188
|
+
}
|
|
189
|
+
h2 + .list-group {
|
|
190
|
+
margin-top: 1.5rem;
|
|
191
|
+
}
|
|
192
|
+
.list-group-name {
|
|
193
|
+
display: flex;
|
|
194
|
+
flex-wrap: wrap;
|
|
195
|
+
align-items: baseline;
|
|
196
|
+
gap: 0.25rem 0.75rem;
|
|
197
|
+
margin: 0 0 0.5rem;
|
|
198
|
+
font-size: calc(var(--h3) * 1.05);
|
|
199
|
+
font-weight: 800;
|
|
200
|
+
}
|
|
201
|
+
.list-group-meta {
|
|
202
|
+
color: var(--muted);
|
|
203
|
+
font-family: var(--font);
|
|
204
|
+
font-size: var(--text-sm);
|
|
205
|
+
font-weight: 600;
|
|
206
|
+
letter-spacing: 0;
|
|
207
|
+
}
|
|
208
|
+
.list-intro {
|
|
209
|
+
margin: 0 0 0.5rem;
|
|
210
|
+
color: var(--muted);
|
|
211
|
+
max-width: var(--measure);
|
|
212
|
+
}
|
|
213
|
+
.rows {
|
|
214
|
+
margin: 0;
|
|
215
|
+
padding: 0;
|
|
216
|
+
list-style: none;
|
|
217
|
+
}
|
|
218
|
+
.row {
|
|
219
|
+
display: grid;
|
|
220
|
+
grid-template-columns: 2.75rem minmax(0, 1fr);
|
|
221
|
+
gap: 0.75rem 1rem;
|
|
222
|
+
align-items: start;
|
|
223
|
+
padding: 0.875rem 0;
|
|
224
|
+
}
|
|
225
|
+
.row + .row {
|
|
226
|
+
border-top: 1px solid var(--line);
|
|
227
|
+
}
|
|
228
|
+
.row-photo {
|
|
229
|
+
display: block;
|
|
230
|
+
width: 2.75rem;
|
|
231
|
+
height: 2.75rem;
|
|
232
|
+
object-fit: cover;
|
|
233
|
+
border-radius: 50%;
|
|
234
|
+
background: color-mix(in srgb, var(--ink) 8%, transparent);
|
|
235
|
+
}
|
|
236
|
+
.row-initials,
|
|
237
|
+
.row-empty {
|
|
238
|
+
display: grid;
|
|
239
|
+
place-items: center;
|
|
240
|
+
font-family: var(--font-display);
|
|
241
|
+
font-size: 1rem;
|
|
242
|
+
font-weight: 700;
|
|
243
|
+
letter-spacing: 0.04em;
|
|
244
|
+
line-height: 1;
|
|
245
|
+
}
|
|
246
|
+
.row-initials {
|
|
247
|
+
color: var(--ink);
|
|
248
|
+
}
|
|
249
|
+
.row-empty {
|
|
250
|
+
border: 2px dashed var(--line-strong);
|
|
251
|
+
background: none;
|
|
252
|
+
color: var(--muted);
|
|
253
|
+
}
|
|
254
|
+
.row-words {
|
|
255
|
+
min-width: 0;
|
|
256
|
+
}
|
|
257
|
+
.row-words > * {
|
|
258
|
+
margin: 0;
|
|
259
|
+
}
|
|
260
|
+
.row-name {
|
|
261
|
+
font-weight: 700;
|
|
262
|
+
line-height: 1.3;
|
|
263
|
+
}
|
|
264
|
+
.row-name a {
|
|
265
|
+
color: var(--ink);
|
|
266
|
+
}
|
|
267
|
+
.row-words .row-meta {
|
|
268
|
+
display: flex;
|
|
269
|
+
flex-wrap: wrap;
|
|
270
|
+
align-items: center;
|
|
271
|
+
gap: 0.375rem 0.625rem;
|
|
272
|
+
margin-top: 0.125rem;
|
|
273
|
+
}
|
|
274
|
+
.row-role {
|
|
275
|
+
color: var(--muted);
|
|
276
|
+
font-size: var(--text-sm);
|
|
277
|
+
}
|
|
278
|
+
.row-meta .chip {
|
|
279
|
+
white-space: normal;
|
|
280
|
+
}
|
|
281
|
+
.row-words .row-line {
|
|
282
|
+
margin-top: 0.375rem;
|
|
283
|
+
max-width: var(--measure);
|
|
284
|
+
}
|
|
285
|
+
.row-ask {
|
|
286
|
+
grid-column: 2;
|
|
287
|
+
margin: 0;
|
|
288
|
+
}
|
|
289
|
+
.list-after {
|
|
290
|
+
margin: 1rem 0 0;
|
|
291
|
+
}
|
|
292
|
+
/* A small button still a full tap target. */
|
|
293
|
+
.row-ask .button,
|
|
294
|
+
.list-after .button {
|
|
295
|
+
min-height: 2.75rem;
|
|
296
|
+
}
|
|
297
|
+
@media (min-width: 40rem) {
|
|
298
|
+
.row {
|
|
299
|
+
grid-template-columns: 2.75rem minmax(0, 1fr) auto;
|
|
300
|
+
align-items: center;
|
|
301
|
+
}
|
|
302
|
+
.row-ask {
|
|
303
|
+
grid-column: 3;
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
</style>
|