@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,271 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Collection · Library (board 01, A, "Pathway-filtered grid"): the heading
|
|
3
|
+
// with the "See all" link to the type's index at the right, then a card per
|
|
4
|
+
// entry on the band's surface, three across on a wide screen, two on a
|
|
5
|
+
// tablet and one on a phone. Each card opens with the entry's picture at
|
|
6
|
+
// 16:9 and its first term laid over the corner as a small tag; an entry with
|
|
7
|
+
// no picture opens with a soft panel naming its term (or the type, when it
|
|
8
|
+
// has no term) in the display face instead. Then the title, the link to the
|
|
9
|
+
// entry's page (the whole card is the link), and the summary in the muted
|
|
10
|
+
// ink. Nothing here knows who is reading: no progress, no "complete".
|
|
11
|
+
//
|
|
12
|
+
// When the entries' first terms would narrow the cards (two or more terms,
|
|
13
|
+
// or one term that some entries lack), a chip per term ("All" first, then
|
|
14
|
+
// each term in the order it first appears) shows only that term's entries,
|
|
15
|
+
// with "Showing N of M." for a screen reader. The chips are drawn hidden and
|
|
16
|
+
// shown by the section's script, so with scripts off every card shows and
|
|
17
|
+
// nothing is offered that cannot work. With no entries the heading stands
|
|
18
|
+
// over "Nothing here yet.", as the Cards layout says it; with neither,
|
|
19
|
+
// nothing is drawn.
|
|
20
|
+
import type { ComponentProps } from 'astro/types'
|
|
21
|
+
import type Default from './index.astro'
|
|
22
|
+
import Band from '../Band.astro'
|
|
23
|
+
import SectionHead from '../SectionHead.astro'
|
|
24
|
+
import { idFor } from '../SampleBallot/ballot'
|
|
25
|
+
import { entriesOf, pluralOf, seeAllOf, termsOf } from './entries'
|
|
26
|
+
import { text } from '../../../lib/format'
|
|
27
|
+
|
|
28
|
+
type Props = ComponentProps<typeof Default>
|
|
29
|
+
|
|
30
|
+
const { section } = Astro.props
|
|
31
|
+
const heading = text(section.copy.heading)
|
|
32
|
+
const entries = entriesOf(section)
|
|
33
|
+
const terms = termsOf(entries)
|
|
34
|
+
const plural = pluralOf(section)
|
|
35
|
+
const filter = terms.length > 1 || (terms.length === 1 && entries.some((e) => e.term === null))
|
|
36
|
+
const cardsId = idFor(section, 'library')
|
|
37
|
+
const Title = heading ? 'h3' : 'h2'
|
|
38
|
+
---
|
|
39
|
+
{(heading || entries.length > 0) && (
|
|
40
|
+
<Band section={section} class="entries entries-library">
|
|
41
|
+
<SectionHead kicker={null} heading={heading} more={seeAllOf(section, entries)} />
|
|
42
|
+
{entries.length > 0 ? (
|
|
43
|
+
<div class="lib" data-library>
|
|
44
|
+
{filter && (
|
|
45
|
+
<div class="lib-terms" role="group" aria-label="Filter by topic" data-library-terms hidden>
|
|
46
|
+
<button type="button" aria-pressed="true" aria-controls={cardsId} data-term="">All</button>
|
|
47
|
+
{terms.map((term) => (
|
|
48
|
+
<button type="button" aria-pressed="false" aria-controls={cardsId} data-term={term}>{term}</button>
|
|
49
|
+
))}
|
|
50
|
+
</div>
|
|
51
|
+
)}
|
|
52
|
+
<ul class="lib-cards" id={cardsId} role="list">
|
|
53
|
+
{entries.map((entry) => {
|
|
54
|
+
const label = entry.term ?? plural
|
|
55
|
+
return (
|
|
56
|
+
<li class:list={['lib-card', entry.href && 'lib-card-linked']} data-term={entry.term ?? ''}>
|
|
57
|
+
{entry.image ? (
|
|
58
|
+
<div class="lib-frame">
|
|
59
|
+
<img class="lib-photo" src={entry.image} alt="" loading="lazy" decoding="async" />
|
|
60
|
+
{entry.term && <p class="lib-tag">{entry.term}</p>}
|
|
61
|
+
</div>
|
|
62
|
+
) : label && (
|
|
63
|
+
<div class="lib-frame lib-frame-label">
|
|
64
|
+
<p class="lib-big-label">{label}</p>
|
|
65
|
+
</div>
|
|
66
|
+
)}
|
|
67
|
+
<div class="lib-body">
|
|
68
|
+
<Title class="lib-title">{entry.href ? <a href={entry.href}>{entry.title}</a> : entry.title}</Title>
|
|
69
|
+
{entry.summary && <p class="lib-summary">{entry.summary}</p>}
|
|
70
|
+
</div>
|
|
71
|
+
</li>
|
|
72
|
+
)
|
|
73
|
+
})}
|
|
74
|
+
</ul>
|
|
75
|
+
{filter && <p class="visually-hidden" role="status" data-library-showing></p>}
|
|
76
|
+
{filter && (
|
|
77
|
+
<script is:inline>
|
|
78
|
+
;(function (root) {
|
|
79
|
+
if (!root) return
|
|
80
|
+
var group = root.querySelector('[data-library-terms]')
|
|
81
|
+
var chips = group.querySelectorAll('[data-term]')
|
|
82
|
+
var cards = root.querySelectorAll('.lib-cards > [data-term]')
|
|
83
|
+
var showing = root.querySelector('[data-library-showing]')
|
|
84
|
+
var choose = function (chip) {
|
|
85
|
+
var term = chip.getAttribute('data-term')
|
|
86
|
+
var shown = 0
|
|
87
|
+
for (var c = 0; c < chips.length; c++) chips[c].setAttribute('aria-pressed', chips[c] === chip ? 'true' : 'false')
|
|
88
|
+
for (var i = 0; i < cards.length; i++) {
|
|
89
|
+
var match = !term || cards[i].getAttribute('data-term') === term
|
|
90
|
+
cards[i].hidden = !match
|
|
91
|
+
if (match) shown++
|
|
92
|
+
}
|
|
93
|
+
showing.textContent = shown === cards.length ? 'Showing all ' + cards.length + '.' : 'Showing ' + shown + ' of ' + cards.length + '.'
|
|
94
|
+
}
|
|
95
|
+
for (var c = 0; c < chips.length; c++) {
|
|
96
|
+
chips[c].addEventListener('click', function (event) {
|
|
97
|
+
choose(event.currentTarget)
|
|
98
|
+
})
|
|
99
|
+
}
|
|
100
|
+
group.hidden = false
|
|
101
|
+
})(document.currentScript.closest('[data-library]'))
|
|
102
|
+
</script>
|
|
103
|
+
)}
|
|
104
|
+
</div>
|
|
105
|
+
) : (
|
|
106
|
+
<p class="empty">Nothing here yet.</p>
|
|
107
|
+
)}
|
|
108
|
+
</Band>
|
|
109
|
+
)}
|
|
110
|
+
|
|
111
|
+
<style>
|
|
112
|
+
.lib-terms {
|
|
113
|
+
display: flex;
|
|
114
|
+
flex-wrap: wrap;
|
|
115
|
+
gap: 0.5rem;
|
|
116
|
+
margin-bottom: 1.25rem;
|
|
117
|
+
}
|
|
118
|
+
.lib-terms[hidden],
|
|
119
|
+
.lib-card[hidden] {
|
|
120
|
+
display: none;
|
|
121
|
+
}
|
|
122
|
+
.lib-terms button {
|
|
123
|
+
min-height: 2.75rem;
|
|
124
|
+
padding: 0.375rem 1rem;
|
|
125
|
+
border: 1.5px solid color-mix(in srgb, var(--ink) 25%, transparent);
|
|
126
|
+
border-radius: var(--pill);
|
|
127
|
+
background: transparent;
|
|
128
|
+
color: var(--ink);
|
|
129
|
+
font: inherit;
|
|
130
|
+
font-size: var(--text-sm);
|
|
131
|
+
font-weight: 600;
|
|
132
|
+
cursor: pointer;
|
|
133
|
+
}
|
|
134
|
+
.lib-terms button:hover {
|
|
135
|
+
border-color: var(--ink);
|
|
136
|
+
}
|
|
137
|
+
.lib-terms button[aria-pressed='true'] {
|
|
138
|
+
border-color: var(--button);
|
|
139
|
+
background: var(--button);
|
|
140
|
+
color: var(--button-ink);
|
|
141
|
+
}
|
|
142
|
+
.lib-cards {
|
|
143
|
+
display: grid;
|
|
144
|
+
grid-template-columns: minmax(0, 1fr);
|
|
145
|
+
gap: 1rem;
|
|
146
|
+
margin: 0;
|
|
147
|
+
padding: 0;
|
|
148
|
+
list-style: none;
|
|
149
|
+
}
|
|
150
|
+
.lib-card {
|
|
151
|
+
position: relative;
|
|
152
|
+
display: flex;
|
|
153
|
+
flex-direction: column;
|
|
154
|
+
min-width: 0;
|
|
155
|
+
overflow: hidden;
|
|
156
|
+
border: 1px solid var(--line);
|
|
157
|
+
border-radius: var(--radius-card);
|
|
158
|
+
background: var(--surface);
|
|
159
|
+
}
|
|
160
|
+
.lib-frame {
|
|
161
|
+
position: relative;
|
|
162
|
+
aspect-ratio: 16 / 9;
|
|
163
|
+
overflow: hidden;
|
|
164
|
+
}
|
|
165
|
+
.lib-photo {
|
|
166
|
+
display: block;
|
|
167
|
+
width: 100%;
|
|
168
|
+
height: 100%;
|
|
169
|
+
object-fit: cover;
|
|
170
|
+
}
|
|
171
|
+
.lib-tag {
|
|
172
|
+
position: absolute;
|
|
173
|
+
left: 0.875rem;
|
|
174
|
+
bottom: 0.875rem;
|
|
175
|
+
max-width: calc(100% - 1.75rem);
|
|
176
|
+
margin: 0;
|
|
177
|
+
padding: 0.25rem 0.625rem;
|
|
178
|
+
border-radius: var(--pill);
|
|
179
|
+
background: var(--surface);
|
|
180
|
+
color: var(--ink);
|
|
181
|
+
font-size: var(--text-xs);
|
|
182
|
+
font-weight: 700;
|
|
183
|
+
letter-spacing: 0.08em;
|
|
184
|
+
line-height: 1.3;
|
|
185
|
+
text-transform: uppercase;
|
|
186
|
+
overflow-wrap: anywhere;
|
|
187
|
+
}
|
|
188
|
+
.lib-frame-label {
|
|
189
|
+
display: grid;
|
|
190
|
+
place-items: center;
|
|
191
|
+
padding: 1.25rem;
|
|
192
|
+
border-bottom: 1px solid var(--line);
|
|
193
|
+
background: color-mix(in srgb, var(--ink) 6%, transparent);
|
|
194
|
+
box-shadow: inset 0 -3px 0 var(--accent);
|
|
195
|
+
}
|
|
196
|
+
.lib-big-label {
|
|
197
|
+
margin: 0;
|
|
198
|
+
font-family: var(--font-display);
|
|
199
|
+
font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.375rem);
|
|
200
|
+
font-weight: 800;
|
|
201
|
+
line-height: 1.05;
|
|
202
|
+
letter-spacing: -0.02em;
|
|
203
|
+
text-align: center;
|
|
204
|
+
overflow-wrap: anywhere;
|
|
205
|
+
}
|
|
206
|
+
.lib-body {
|
|
207
|
+
display: flex;
|
|
208
|
+
flex-direction: column;
|
|
209
|
+
gap: 0.5rem;
|
|
210
|
+
padding: 1.125rem 1.25rem 1.375rem;
|
|
211
|
+
}
|
|
212
|
+
.lib-body > * {
|
|
213
|
+
margin: 0;
|
|
214
|
+
}
|
|
215
|
+
.lib-body .lib-title {
|
|
216
|
+
font-size: calc(var(--h3) * 0.85);
|
|
217
|
+
font-weight: 700;
|
|
218
|
+
line-height: 1.2;
|
|
219
|
+
}
|
|
220
|
+
.lib-title a {
|
|
221
|
+
color: var(--ink);
|
|
222
|
+
text-decoration: none;
|
|
223
|
+
}
|
|
224
|
+
/* The title's link covers the card. */
|
|
225
|
+
.lib-title a::after {
|
|
226
|
+
content: '';
|
|
227
|
+
position: absolute;
|
|
228
|
+
inset: 0;
|
|
229
|
+
}
|
|
230
|
+
.lib-title a:focus-visible {
|
|
231
|
+
outline: none;
|
|
232
|
+
}
|
|
233
|
+
.lib-card-linked:hover .lib-title a {
|
|
234
|
+
text-decoration: underline;
|
|
235
|
+
}
|
|
236
|
+
.lib-card-linked:focus-within {
|
|
237
|
+
outline: 3px solid var(--ink);
|
|
238
|
+
outline-offset: 3px;
|
|
239
|
+
}
|
|
240
|
+
.lib-summary {
|
|
241
|
+
color: var(--muted);
|
|
242
|
+
font-size: var(--text-sm);
|
|
243
|
+
line-height: 1.5;
|
|
244
|
+
}
|
|
245
|
+
@media (min-width: 40rem) {
|
|
246
|
+
.lib-cards {
|
|
247
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
248
|
+
gap: 1.25rem;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
@media (min-width: 60rem) {
|
|
252
|
+
.lib-cards {
|
|
253
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
254
|
+
gap: 1.5rem;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
258
|
+
.lib-photo {
|
|
259
|
+
transition: transform 0.3s ease;
|
|
260
|
+
}
|
|
261
|
+
.lib-card-linked:hover .lib-photo {
|
|
262
|
+
transform: scale(1.02);
|
|
263
|
+
}
|
|
264
|
+
.lib-terms button {
|
|
265
|
+
transition:
|
|
266
|
+
background-color 0.15s ease,
|
|
267
|
+
border-color 0.15s ease,
|
|
268
|
+
color 0.15s ease;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
</style>
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Collection · Outline (board 01, C, "Learning-path list"): the heading
|
|
3
|
+
// with the "See all" link to the type's index at the right, then the
|
|
4
|
+
// entries in the order the bake listed them as a numbered list held to the
|
|
5
|
+
// reading column, meant to sit beside a lesson as its syllabus. Each row is
|
|
6
|
+
// its number in the display face, the title (the whole row is the link to
|
|
7
|
+
// the entry's page) and the summary in the muted ink under it. Nothing here
|
|
8
|
+
// knows who is reading: no ticks, no locks, no "now playing". With no
|
|
9
|
+
// entries the heading stands over "Nothing here yet.", as the Cards layout
|
|
10
|
+
// says it; with neither, nothing is drawn.
|
|
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 { entriesOf, seeAllOf } from './entries'
|
|
16
|
+
import { text } from '../../../lib/format'
|
|
17
|
+
|
|
18
|
+
type Props = ComponentProps<typeof Default>
|
|
19
|
+
|
|
20
|
+
const { section } = Astro.props
|
|
21
|
+
const heading = text(section.copy.heading)
|
|
22
|
+
const entries = entriesOf(section)
|
|
23
|
+
const Title = heading ? 'h3' : 'h2'
|
|
24
|
+
---
|
|
25
|
+
{(heading || entries.length > 0) && (
|
|
26
|
+
<Band section={section} class="entries entries-outline">
|
|
27
|
+
<div class="outline">
|
|
28
|
+
<SectionHead kicker={null} heading={heading} more={seeAllOf(section, entries)} />
|
|
29
|
+
{entries.length > 0 ? (
|
|
30
|
+
<ol class="outline-list" role="list">
|
|
31
|
+
{entries.map((entry, i) => (
|
|
32
|
+
<li class:list={['outline-row', entry.href && 'outline-row-linked']}>
|
|
33
|
+
<span class="outline-num" aria-hidden="true">{i + 1}</span>
|
|
34
|
+
<div class="outline-words">
|
|
35
|
+
<Title class="outline-title">{entry.href ? <a href={entry.href}>{entry.title}</a> : entry.title}</Title>
|
|
36
|
+
{entry.summary && <p class="outline-summary">{entry.summary}</p>}
|
|
37
|
+
</div>
|
|
38
|
+
</li>
|
|
39
|
+
))}
|
|
40
|
+
</ol>
|
|
41
|
+
) : (
|
|
42
|
+
<p class="empty">Nothing here yet.</p>
|
|
43
|
+
)}
|
|
44
|
+
</div>
|
|
45
|
+
</Band>
|
|
46
|
+
)}
|
|
47
|
+
|
|
48
|
+
<style>
|
|
49
|
+
.outline {
|
|
50
|
+
max-width: var(--measure);
|
|
51
|
+
}
|
|
52
|
+
.outline-list {
|
|
53
|
+
display: grid;
|
|
54
|
+
gap: 0.5rem;
|
|
55
|
+
margin: 0;
|
|
56
|
+
padding: 0;
|
|
57
|
+
list-style: none;
|
|
58
|
+
}
|
|
59
|
+
.outline-row {
|
|
60
|
+
position: relative;
|
|
61
|
+
display: grid;
|
|
62
|
+
grid-template-columns: 2.25rem minmax(0, 1fr);
|
|
63
|
+
gap: 0 0.875rem;
|
|
64
|
+
align-items: baseline;
|
|
65
|
+
padding: 0.875rem 1rem;
|
|
66
|
+
border: 1px solid var(--line);
|
|
67
|
+
border-radius: var(--radius);
|
|
68
|
+
background: var(--surface);
|
|
69
|
+
}
|
|
70
|
+
.outline-num {
|
|
71
|
+
color: var(--accent);
|
|
72
|
+
font-family: var(--font-display);
|
|
73
|
+
font-size: 1.5rem;
|
|
74
|
+
font-weight: 800;
|
|
75
|
+
line-height: 1;
|
|
76
|
+
letter-spacing: -0.02em;
|
|
77
|
+
font-variant-numeric: tabular-nums;
|
|
78
|
+
text-align: center;
|
|
79
|
+
}
|
|
80
|
+
.outline-words {
|
|
81
|
+
display: grid;
|
|
82
|
+
gap: 0.25rem;
|
|
83
|
+
min-width: 0;
|
|
84
|
+
}
|
|
85
|
+
.outline-words > * {
|
|
86
|
+
margin: 0;
|
|
87
|
+
}
|
|
88
|
+
.outline-row .outline-title {
|
|
89
|
+
font-family: var(--font);
|
|
90
|
+
font-size: var(--text);
|
|
91
|
+
font-weight: 700;
|
|
92
|
+
letter-spacing: 0;
|
|
93
|
+
line-height: 1.35;
|
|
94
|
+
}
|
|
95
|
+
.outline-title a {
|
|
96
|
+
color: var(--ink);
|
|
97
|
+
text-decoration: none;
|
|
98
|
+
}
|
|
99
|
+
/* The title's link covers the row. */
|
|
100
|
+
.outline-title a::after {
|
|
101
|
+
content: '';
|
|
102
|
+
position: absolute;
|
|
103
|
+
inset: 0;
|
|
104
|
+
border-radius: var(--radius);
|
|
105
|
+
}
|
|
106
|
+
.outline-title a:focus-visible {
|
|
107
|
+
outline: none;
|
|
108
|
+
}
|
|
109
|
+
.outline-row-linked:hover {
|
|
110
|
+
border-color: var(--line-strong);
|
|
111
|
+
}
|
|
112
|
+
.outline-row-linked:hover .outline-title a {
|
|
113
|
+
text-decoration: underline;
|
|
114
|
+
}
|
|
115
|
+
.outline-row-linked:focus-within {
|
|
116
|
+
outline: 3px solid var(--ink);
|
|
117
|
+
outline-offset: 2px;
|
|
118
|
+
}
|
|
119
|
+
.outline-summary {
|
|
120
|
+
color: var(--muted);
|
|
121
|
+
font-size: var(--text-sm);
|
|
122
|
+
line-height: 1.5;
|
|
123
|
+
}
|
|
124
|
+
@media (min-width: 40rem) {
|
|
125
|
+
.outline-row {
|
|
126
|
+
grid-template-columns: 2.75rem minmax(0, 1fr);
|
|
127
|
+
gap: 0 1rem;
|
|
128
|
+
padding: 1rem 1.25rem;
|
|
129
|
+
}
|
|
130
|
+
.outline-num {
|
|
131
|
+
font-size: 1.75rem;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
</style>
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Collection · Shelves (board 01, B, "shelves"): the heading with the "See
|
|
3
|
+
// all" link to the type's index at the right, then the entries grouped by
|
|
4
|
+
// their first term, a shelf per term in the order the terms first appear.
|
|
5
|
+
// Each shelf is its term as a heading over a single row of compact cards
|
|
6
|
+
// that scrolls sideways and snaps to a card: the picture at 16:9 (a soft
|
|
7
|
+
// panel with the title's first letter when the entry has none), the title
|
|
8
|
+
// (the whole card is the link to the entry's page) and the summary, cut at
|
|
9
|
+
// its first line break and held to two lines. On a tablet two and a half
|
|
10
|
+
// cards show, inviting the scroll. Entries with no term sit on the last shelf, named by the type
|
|
11
|
+
// ("Courses") or "More" when the bake gave no name. There is no "continue
|
|
12
|
+
// where you left off": nothing here knows who is reading.
|
|
13
|
+
//
|
|
14
|
+
// On a wide screen four cards show across and the rest scroll; on a phone a
|
|
15
|
+
// card and the edge of the next. With no entries the heading stands over
|
|
16
|
+
// "Nothing here yet.", as the Cards layout says it; with neither, nothing is
|
|
17
|
+
// drawn.
|
|
18
|
+
import type { ComponentProps } from 'astro/types'
|
|
19
|
+
import type Default from './index.astro'
|
|
20
|
+
import Band from '../Band.astro'
|
|
21
|
+
import SectionHead from '../SectionHead.astro'
|
|
22
|
+
import { idFor } from '../SampleBallot/ballot'
|
|
23
|
+
import { entriesOf, pluralOf, seeAllOf, termsOf, type CollectionEntry } from './entries'
|
|
24
|
+
import { text } from '../../../lib/format'
|
|
25
|
+
|
|
26
|
+
type Props = ComponentProps<typeof Default>
|
|
27
|
+
|
|
28
|
+
const { section } = Astro.props
|
|
29
|
+
const heading = text(section.copy.heading)
|
|
30
|
+
const entries = entriesOf(section)
|
|
31
|
+
const loose = entries.filter((e) => e.term === null)
|
|
32
|
+
const shelves: { name: string; entries: CollectionEntry[] }[] = [
|
|
33
|
+
...termsOf(entries).map((term) => ({ name: term, entries: entries.filter((e) => e.term === term) })),
|
|
34
|
+
...(loose.length > 0 ? [{ name: pluralOf(section) ?? 'More', entries: loose }] : []),
|
|
35
|
+
]
|
|
36
|
+
const Shelf = heading ? 'h3' : 'h2'
|
|
37
|
+
const Title = heading ? 'h4' : 'h3'
|
|
38
|
+
const firstLine = (summary: string | null) => summary?.split(/\r?\n/)[0]?.trim() || null
|
|
39
|
+
---
|
|
40
|
+
{(heading || entries.length > 0) && (
|
|
41
|
+
<Band section={section} class="entries entries-shelves">
|
|
42
|
+
<SectionHead kicker={null} heading={heading} more={seeAllOf(section, entries)} />
|
|
43
|
+
{entries.length > 0 ? (
|
|
44
|
+
<div class="shelves">
|
|
45
|
+
{shelves.map((shelf, i) => {
|
|
46
|
+
const id = idFor(section, `shelf-${i}`)
|
|
47
|
+
return (
|
|
48
|
+
<div class="shelf">
|
|
49
|
+
<Shelf class="shelf-name" id={id}>{shelf.name}</Shelf>
|
|
50
|
+
<ul class="shelf-row" role="list" aria-labelledby={id}>
|
|
51
|
+
{shelf.entries.map((entry) => (
|
|
52
|
+
<li class:list={['shelf-card', entry.href && 'shelf-card-linked']}>
|
|
53
|
+
{entry.image ? (
|
|
54
|
+
<img class="shelf-photo" src={entry.image} alt="" loading="lazy" decoding="async" />
|
|
55
|
+
) : (
|
|
56
|
+
<span class="shelf-photo shelf-photo-none" aria-hidden="true">{Array.from(entry.title)[0]}</span>
|
|
57
|
+
)}
|
|
58
|
+
<Title class="shelf-title">{entry.href ? <a href={entry.href}>{entry.title}</a> : entry.title}</Title>
|
|
59
|
+
{firstLine(entry.summary) && <p class="shelf-summary">{firstLine(entry.summary)}</p>}
|
|
60
|
+
</li>
|
|
61
|
+
))}
|
|
62
|
+
</ul>
|
|
63
|
+
</div>
|
|
64
|
+
)
|
|
65
|
+
})}
|
|
66
|
+
</div>
|
|
67
|
+
) : (
|
|
68
|
+
<p class="empty">Nothing here yet.</p>
|
|
69
|
+
)}
|
|
70
|
+
</Band>
|
|
71
|
+
)}
|
|
72
|
+
|
|
73
|
+
<style>
|
|
74
|
+
.shelves {
|
|
75
|
+
display: grid;
|
|
76
|
+
gap: clamp(1.75rem, 1.4rem + 1vw, 2.5rem);
|
|
77
|
+
}
|
|
78
|
+
.shelf {
|
|
79
|
+
min-width: 0;
|
|
80
|
+
}
|
|
81
|
+
.shelf .shelf-name {
|
|
82
|
+
margin: 0 0 0.875rem;
|
|
83
|
+
font-size: var(--h3);
|
|
84
|
+
font-weight: 700;
|
|
85
|
+
line-height: 1.2;
|
|
86
|
+
}
|
|
87
|
+
/* One row that scrolls sideways and snaps to a card; on a phone the next card's edge shows. */
|
|
88
|
+
.shelf-row {
|
|
89
|
+
display: grid;
|
|
90
|
+
grid-auto-flow: column;
|
|
91
|
+
grid-auto-columns: 78%;
|
|
92
|
+
gap: 0.875rem;
|
|
93
|
+
margin: 0;
|
|
94
|
+
padding: 0.25rem 0.25rem 0.875rem;
|
|
95
|
+
list-style: none;
|
|
96
|
+
overflow-x: auto;
|
|
97
|
+
overscroll-behavior-x: contain;
|
|
98
|
+
scroll-snap-type: x mandatory;
|
|
99
|
+
scroll-padding-inline: 0.25rem;
|
|
100
|
+
scrollbar-width: thin;
|
|
101
|
+
scrollbar-color: var(--line-strong) transparent;
|
|
102
|
+
}
|
|
103
|
+
.shelf-card {
|
|
104
|
+
position: relative;
|
|
105
|
+
display: flex;
|
|
106
|
+
flex-direction: column;
|
|
107
|
+
gap: 0.375rem;
|
|
108
|
+
min-width: 0;
|
|
109
|
+
padding: 0.75rem 0.75rem 1rem;
|
|
110
|
+
border: 1px solid var(--line);
|
|
111
|
+
border-radius: var(--radius-card);
|
|
112
|
+
background: var(--surface);
|
|
113
|
+
scroll-snap-align: start;
|
|
114
|
+
}
|
|
115
|
+
.shelf-card > * {
|
|
116
|
+
margin: 0;
|
|
117
|
+
}
|
|
118
|
+
.shelf-photo {
|
|
119
|
+
display: block;
|
|
120
|
+
width: 100%;
|
|
121
|
+
aspect-ratio: 16 / 9;
|
|
122
|
+
margin-bottom: 0.375rem;
|
|
123
|
+
border-radius: var(--radius);
|
|
124
|
+
object-fit: cover;
|
|
125
|
+
}
|
|
126
|
+
.shelf-photo-none {
|
|
127
|
+
display: grid;
|
|
128
|
+
place-items: center;
|
|
129
|
+
background: color-mix(in srgb, var(--ink) 6%, transparent);
|
|
130
|
+
box-shadow: inset 0 -3px 0 var(--accent);
|
|
131
|
+
color: var(--muted);
|
|
132
|
+
font-family: var(--font-display);
|
|
133
|
+
font-size: 2.5rem;
|
|
134
|
+
font-weight: 800;
|
|
135
|
+
line-height: 1;
|
|
136
|
+
}
|
|
137
|
+
.shelf-card .shelf-title {
|
|
138
|
+
font-family: var(--font);
|
|
139
|
+
font-size: var(--text);
|
|
140
|
+
font-weight: 700;
|
|
141
|
+
letter-spacing: 0;
|
|
142
|
+
line-height: 1.3;
|
|
143
|
+
}
|
|
144
|
+
.shelf-title a {
|
|
145
|
+
color: var(--ink);
|
|
146
|
+
text-decoration: none;
|
|
147
|
+
}
|
|
148
|
+
/* The title's link covers the card. */
|
|
149
|
+
.shelf-title a::after {
|
|
150
|
+
content: '';
|
|
151
|
+
position: absolute;
|
|
152
|
+
inset: 0;
|
|
153
|
+
border-radius: var(--radius-card);
|
|
154
|
+
}
|
|
155
|
+
.shelf-title a:focus-visible {
|
|
156
|
+
outline: none;
|
|
157
|
+
}
|
|
158
|
+
.shelf-card-linked:hover .shelf-title a {
|
|
159
|
+
text-decoration: underline;
|
|
160
|
+
}
|
|
161
|
+
.shelf-card-linked:focus-within {
|
|
162
|
+
outline: 3px solid var(--ink);
|
|
163
|
+
outline-offset: 2px;
|
|
164
|
+
}
|
|
165
|
+
.shelf-summary {
|
|
166
|
+
display: -webkit-box;
|
|
167
|
+
overflow: hidden;
|
|
168
|
+
-webkit-box-orient: vertical;
|
|
169
|
+
-webkit-line-clamp: 2;
|
|
170
|
+
line-clamp: 2;
|
|
171
|
+
color: var(--muted);
|
|
172
|
+
font-size: var(--text-sm);
|
|
173
|
+
line-height: 1.45;
|
|
174
|
+
}
|
|
175
|
+
@media (min-width: 40rem) {
|
|
176
|
+
.shelf-row {
|
|
177
|
+
grid-auto-columns: calc((100% - 2rem) / 2.5);
|
|
178
|
+
gap: 1rem;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
@media (min-width: 60rem) {
|
|
182
|
+
.shelf-row {
|
|
183
|
+
grid-auto-columns: calc((100% - 3 * 1rem) / 4);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
187
|
+
.shelf-row {
|
|
188
|
+
scroll-behavior: smooth;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
</style>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
// A side's place on an issue it has no position for, in the Table and Cards
|
|
3
|
+
// layouts: a dash, read as "No position listed". It takes the ink of what it
|
|
4
|
+
// sits in.
|
|
5
|
+
---
|
|
6
|
+
<span class="unlisted"><span aria-hidden="true">—</span><span class="visually-hidden">No position listed</span></span>
|