@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
package/src/template.ts
ADDED
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
// What a template is to the kit: its manifest (template.json), the component
|
|
2
|
+
// that draws each section type and layout, the entry and list layouts, and
|
|
3
|
+
// its own two faces. A template's src/template.ts exports one, built from the
|
|
4
|
+
// kit's registries with its own layouts added:
|
|
5
|
+
//
|
|
6
|
+
// import { siteTemplateManifestSchema } from '@backgold/template-kit/contract/site-templates'
|
|
7
|
+
// import { defineTemplate, kitEntries, kitSections } from '@backgold/template-kit/template'
|
|
8
|
+
// import manifest from '../template.json'
|
|
9
|
+
// import HeroPortrait from './components/sections/Hero/portrait.astro'
|
|
10
|
+
// import './styles/template.css'
|
|
11
|
+
//
|
|
12
|
+
// export default defineTemplate({
|
|
13
|
+
// manifest: siteTemplateManifestSchema.parse(manifest),
|
|
14
|
+
// sections: { ...kitSections, 'Hero:portrait': HeroPortrait },
|
|
15
|
+
// entries: kitEntries,
|
|
16
|
+
// fonts: { heading: 'Oswald:wght@500;700', body: 'Public+Sans:wght@400;700' },
|
|
17
|
+
// })
|
|
18
|
+
//
|
|
19
|
+
// The template's astro.config.mjs names that file to the kit's integration
|
|
20
|
+
// (`templateKit({ template: './src/template.ts' })`), whose routes import it
|
|
21
|
+
// as `virtual:backgold-template` and pass it to the Site layout and to
|
|
22
|
+
// everything that draws a section or an entry.
|
|
23
|
+
|
|
24
|
+
import type { SiteTemplateManifest } from '#contract/site-templates'
|
|
25
|
+
import type { AstroComponentFactory } from 'astro/runtime/server/index.js'
|
|
26
|
+
import { entries } from './components/entries'
|
|
27
|
+
import { sections } from './components/sections'
|
|
28
|
+
import type { FrameColorsAdjust } from './lib/brand'
|
|
29
|
+
|
|
30
|
+
export type AstroComponent = AstroComponentFactory
|
|
31
|
+
|
|
32
|
+
export interface TemplateConfig {
|
|
33
|
+
/** The template's template.json. */
|
|
34
|
+
manifest: SiteTemplateManifest
|
|
35
|
+
/**
|
|
36
|
+
* The component for each section type ('<Type>') and layout
|
|
37
|
+
* ('<Type>:<layout>'), as `<Section components>` looks them up
|
|
38
|
+
* (src/components/sections/index.ts).
|
|
39
|
+
*/
|
|
40
|
+
sections: Record<string, AstroComponent>
|
|
41
|
+
/**
|
|
42
|
+
* The entry and list layouts, as '<type>:<layout>', with the lesson
|
|
43
|
+
* (`course:lesson`) and the volunteer pages (`volunteer:list`,
|
|
44
|
+
* `volunteer:detail`) under those names (src/components/entries/index.ts).
|
|
45
|
+
*/
|
|
46
|
+
entries: Record<string, AstroComponent>
|
|
47
|
+
/**
|
|
48
|
+
* The template's own faces, as Google Fonts family specs
|
|
49
|
+
* (`Family+Name:axes@values`): what the site draws in when its theme in
|
|
50
|
+
* BackGold names none (src/lib/fonts.ts).
|
|
51
|
+
*/
|
|
52
|
+
fonts: { heading: string; body: string }
|
|
53
|
+
/**
|
|
54
|
+
* The set a site whose appearance is `auto` opens in: `light` (the default)
|
|
55
|
+
* follows the visitor's system; `dark` opens dark whatever the system says
|
|
56
|
+
* (src/lib/brand.ts brandCss). Either way the header's switch still
|
|
57
|
+
* changes it, and a site pinned `light` or `dark` in BackGold keeps its pin.
|
|
58
|
+
*/
|
|
59
|
+
defaultAppearance?: 'light' | 'dark'
|
|
60
|
+
/**
|
|
61
|
+
* The face BackGold's module frames draw in (the embed look's `font`, one
|
|
62
|
+
* of `public-sans`, `inter`, `system-sans`, `system-serif`,
|
|
63
|
+
* `ubuntu-sans-mono`, `jetbrains-mono`: the api's EMBED_LOOK_FONTS). Left
|
|
64
|
+
* out, or not one of those, the frames draw in Public Sans
|
|
65
|
+
* (sections/modules/ModuleFrame.astro).
|
|
66
|
+
*/
|
|
67
|
+
frameFont?: string
|
|
68
|
+
/**
|
|
69
|
+
* The corner radius BackGold's module frames draw with, in whole pixels
|
|
70
|
+
* from 0 to 40 (the embed look's `radius`). Left out, or outside that, 12
|
|
71
|
+
* (sections/modules/ModuleFrame.astro).
|
|
72
|
+
*/
|
|
73
|
+
frameRadius?: number
|
|
74
|
+
/**
|
|
75
|
+
* The template's change to the colours BackGold's module frames are sent
|
|
76
|
+
* (the embed look's `look` and `look_dark`), given each band's colours and
|
|
77
|
+
* the scheme: a template whose cards sit on the band's surface makes the
|
|
78
|
+
* frame's field edges its own ink, say. A colour it returns that is not
|
|
79
|
+
* `#rrggbb` keeps the band's. Left out, the frames get the band's colours
|
|
80
|
+
* as brand.ts derives them (sections/modules/ModuleFrame.astro).
|
|
81
|
+
*/
|
|
82
|
+
frameColors?: FrameColorsAdjust
|
|
83
|
+
/**
|
|
84
|
+
* Whether the template serves its own stylesheet for BackGold's module
|
|
85
|
+
* frames at `/_backgold/frame.css` on the site's origin: the frames are
|
|
86
|
+
* then asked to load it (the embed look's `skin`, the site's https
|
|
87
|
+
* origin), and draw in the template's shapes and faces over the look's
|
|
88
|
+
* colours. Left out, the frames draw BackGold's own shapes in the look
|
|
89
|
+
* (sections/modules/ModuleFrame.astro).
|
|
90
|
+
*/
|
|
91
|
+
frameSkin?: boolean
|
|
92
|
+
/**
|
|
93
|
+
* The component that draws one event's page at /events/<slug>, given
|
|
94
|
+
* `{ event }` (an EventDetail, lib/events.ts). Left out, the kit's
|
|
95
|
+
* (components/EventPage.astro).
|
|
96
|
+
*/
|
|
97
|
+
eventPage?: AstroComponent
|
|
98
|
+
/** The component that draws the 404 page's content. Left out, the kit's (components/NotFound.astro). */
|
|
99
|
+
notFound?: AstroComponent
|
|
100
|
+
/**
|
|
101
|
+
* The component that draws the /live page's content (the organization's
|
|
102
|
+
* YouTube stream: live, upcoming, or off the air), given LivePageProps
|
|
103
|
+
* (lib/stream.ts) under the site's header and footer. Left out, the kit's
|
|
104
|
+
* (components/live/LivePage.astro).
|
|
105
|
+
*/
|
|
106
|
+
livePage?: AstroComponent
|
|
107
|
+
/**
|
|
108
|
+
* The component that draws the footer's closing call on its `closing`
|
|
109
|
+
* layout, given `{ call }` (a ClosingCall, lib/chrome.ts): a template's
|
|
110
|
+
* own closing line over the columns. Left out, the kit's
|
|
111
|
+
* (components/chrome/ClosingCall.astro).
|
|
112
|
+
*/
|
|
113
|
+
closingCall?: AstroComponent
|
|
114
|
+
/**
|
|
115
|
+
* The component that draws the brand at the header's left, given
|
|
116
|
+
* `{ name, logoUrl }` as the kit's Brand is (components/chrome/Brand.astro):
|
|
117
|
+
* a template that sets the name in type beside the organization's mark
|
|
118
|
+
* where a wide logo would read too small. The footer keeps the kit's Brand.
|
|
119
|
+
* Left out, the kit's.
|
|
120
|
+
*/
|
|
121
|
+
headerBrand?: AstroComponent
|
|
122
|
+
/**
|
|
123
|
+
* Links a template adds to its menus for routes it draws itself (an
|
|
124
|
+
* archive at `/archive`), which no menu link in BackGold can name
|
|
125
|
+
* (layouts/Site.astro). `menu` 'header' (the default): at the top level,
|
|
126
|
+
* last unless `position` is `first`, and first inside the group `group`
|
|
127
|
+
* names (by its label) too, in the bar and the phone sheet alike. 'footer':
|
|
128
|
+
* first inside that group when the footer has it, else at the top level.
|
|
129
|
+
* Current on `href` and on each address in `also`: exactly (`match`
|
|
130
|
+
* 'exact', the default) or there and under it ('prefix'). Left out,
|
|
131
|
+
* nothing changes.
|
|
132
|
+
*/
|
|
133
|
+
menuLinks?: Array<{
|
|
134
|
+
label: string
|
|
135
|
+
href: string
|
|
136
|
+
menu?: 'header' | 'footer'
|
|
137
|
+
group?: string
|
|
138
|
+
position?: 'first' | 'last'
|
|
139
|
+
match?: 'exact' | 'prefix'
|
|
140
|
+
also?: string[]
|
|
141
|
+
}>
|
|
142
|
+
/**
|
|
143
|
+
* What the phone's menu sheet carries besides the menu, the header button
|
|
144
|
+
* and the legal line: `socials` draws the site's social links, as the
|
|
145
|
+
* footer draws them, after the button (and the account links) and before
|
|
146
|
+
* the legal line (layouts/Site.astro). Left out, the sheet carries none.
|
|
147
|
+
*/
|
|
148
|
+
menuSheet?: { socials?: boolean }
|
|
149
|
+
/**
|
|
150
|
+
* Where the news list draws its search box: at the end of the filter row,
|
|
151
|
+
* beside the chips (`filter`, board A4, the default), or beside the list's
|
|
152
|
+
* head, on its subhead's line (`head`, board C10); on a narrow screen it
|
|
153
|
+
* wraps to the end of its own line (src/components/entries/ListFrame.astro).
|
|
154
|
+
*/
|
|
155
|
+
newsSearch?: 'filter' | 'head'
|
|
156
|
+
/**
|
|
157
|
+
* Whether the header offers visitors Sign in (board D1), on a first-party
|
|
158
|
+
* site: a template whose pages hold what the organization keeps for people
|
|
159
|
+
* it knows (the academy's lessons) sets it. Left out, the header has no
|
|
160
|
+
* Sign in; a visitor already signed in (through a lesson's door) still sees
|
|
161
|
+
* their name and Sign out on every template (src/components/chrome/VisitorAccount.astro).
|
|
162
|
+
*/
|
|
163
|
+
visitorSignIn?: boolean
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/** Every section type and layout the kit draws. */
|
|
167
|
+
export const kitSections: Record<string, AstroComponent> = sections
|
|
168
|
+
|
|
169
|
+
/** Every entry and list layout the kit draws. */
|
|
170
|
+
export const kitEntries: Record<string, AstroComponent> = entries
|
|
171
|
+
|
|
172
|
+
/** A template's configuration, typed. */
|
|
173
|
+
export const defineTemplate = (config: TemplateConfig): TemplateConfig => config
|
|
174
|
+
|
|
175
|
+
declare global {
|
|
176
|
+
namespace App {
|
|
177
|
+
interface Locals {
|
|
178
|
+
/** The template drawing this request; the routes (and PageSections) set it for LeadingHero and ModuleFrame. */
|
|
179
|
+
template?: TemplateConfig
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|