diff options
| author | Volpeon <git@volpeon.ink> | 2026-07-22 19:40:59 +0200 |
|---|---|---|
| committer | Volpeon <git@volpeon.ink> | 2026-07-22 19:40:59 +0200 |
| commit | c1e28224aa2e1450031669d9a7e359b63e04687d (patch) | |
| tree | 68f3d8905c763a91f68001d868197effa92adafa /src/pages/releases/index.tsx | |
| download | corvos-website-c1e28224aa2e1450031669d9a7e359b63e04687d.tar.gz corvos-website-c1e28224aa2e1450031669d9a7e359b63e04687d.tar.bz2 corvos-website-c1e28224aa2e1450031669d9a7e359b63e04687d.zip | |
Init
Diffstat (limited to 'src/pages/releases/index.tsx')
| -rw-r--r-- | src/pages/releases/index.tsx | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/src/pages/releases/index.tsx b/src/pages/releases/index.tsx new file mode 100644 index 0000000..132eee7 --- /dev/null +++ b/src/pages/releases/index.tsx | |||
| @@ -0,0 +1,51 @@ | |||
| 1 | import { BaseLayout } from "$/ui/base/BaseLayout.tsx"; | ||
| 2 | import { ReleaseCard } from "$/ui/components/ReleaseCard.tsx"; | ||
| 3 | import { SiteHeader } from "$/ui/components/SiteHeader.tsx"; | ||
| 4 | import { CardList } from "$/ui/layouts/CardList.tsx"; | ||
| 5 | import { Container } from "$/ui/layouts/Container.tsx"; | ||
| 6 | import { ActionButton } from "$/ui/objects/ActionButton.tsx"; | ||
| 7 | import { Heading } from "$/ui/objects/Heading.tsx"; | ||
| 8 | import { Icon } from "$/ui/objects/Icon.tsx"; | ||
| 9 | import { PlaceholderBox } from "$/ui/objects/PlaceholderBox.tsx"; | ||
| 10 | import site from "@/corvos.config.ts"; | ||
| 11 | |||
| 12 | export const template = site.$.template({ type: "releases-index" }, (page, pages) => { | ||
| 13 | const query = site.$.query(pages); | ||
| 14 | const items = query.type(".html").match({ type: "release" }).many().toArray(); | ||
| 15 | const feed = query.type(".rss").match({ type: "releases" }).one(); | ||
| 16 | |||
| 17 | return ( | ||
| 18 | <BaseLayout page={page}> | ||
| 19 | <SiteHeader | ||
| 20 | url={page.url} | ||
| 21 | end={ | ||
| 22 | <div class="l-media__block"> | ||
| 23 | <ActionButton | ||
| 24 | align-block | ||
| 25 | class="u-mbs-0" | ||
| 26 | href={feed.url} | ||
| 27 | icon={<Icon icon="rss-simple" variant="bold" />} | ||
| 28 | level="quiet" | ||
| 29 | pill | ||
| 30 | title="RSS Feed" | ||
| 31 | /> | ||
| 32 | </div> | ||
| 33 | } | ||
| 34 | sm={ | ||
| 35 | <div class="l-media__block l-media__block--main"> | ||
| 36 | <Heading class="u-mbs-0 u-elp">{page.data.title}</Heading> | ||
| 37 | </div> | ||
| 38 | } | ||
| 39 | ></SiteHeader> | ||
| 40 | |||
| 41 | <Container as="main" fixed pad-block pad-inline> | ||
| 42 | <CardList keyboard-nav> | ||
| 43 | {items.map((item) => ( | ||
| 44 | <ReleaseCard page={item} heading-level="h2" list /> | ||
| 45 | ))} | ||
| 46 | {!items.length && <PlaceholderBox as="em">Nothing there yet</PlaceholderBox>} | ||
| 47 | </CardList> | ||
| 48 | </Container> | ||
| 49 | </BaseLayout> | ||
| 50 | ); | ||
| 51 | }); | ||
