diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/pages/index.mdx | 2 | ||||
| -rw-r--r-- | src/pages/index.tsx | 50 | ||||
| -rw-r--r-- | src/pages/pkg/corvos.ts (renamed from src/pages/pkg/corvos@[version].ts) | 0 | ||||
| -rw-r--r-- | src/pages/releases/[version].tsx | 13 | ||||
| -rw-r--r-- | src/styles/components/_home-banner.scss | 4 | ||||
| -rw-r--r-- | src/ui/components/ReleaseCard.tsx | 28 |
6 files changed, 60 insertions, 37 deletions
diff --git a/src/pages/index.mdx b/src/pages/index.mdx index 1d35a1d..7d73a54 100644 --- a/src/pages/index.mdx +++ b/src/pages/index.mdx | |||
| @@ -7,4 +7,4 @@ description: "Project website of Corvos, a static site generator for Deno." | |||
| 7 | import { template } from "./index.tsx"; | 7 | import { template } from "./index.tsx"; |
| 8 | export { template }; | 8 | export { template }; |
| 9 | 9 | ||
| 10 | Corvos is a Static Site Generator with the goal to provide a customizeable, type-safe experience. | 10 | It provides an easy-to-customize experience, designed to take full advantage of TypeScript's capabilities. |
diff --git a/src/pages/index.tsx b/src/pages/index.tsx index b1581b7..0cbc3f8 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx | |||
| @@ -3,6 +3,7 @@ import { ReleaseCard } from "$/ui/components/ReleaseCard.tsx"; | |||
| 3 | import { SiteHeader } from "$/ui/components/SiteHeader.tsx"; | 3 | import { SiteHeader } from "$/ui/components/SiteHeader.tsx"; |
| 4 | import { CardList } from "$/ui/layouts/CardList.tsx"; | 4 | import { CardList } from "$/ui/layouts/CardList.tsx"; |
| 5 | import { Container } from "$/ui/layouts/Container.tsx"; | 5 | import { Container } from "$/ui/layouts/Container.tsx"; |
| 6 | import { HList } from "$/ui/layouts/HList.tsx"; | ||
| 6 | import { Button } from "$/ui/objects/Button.tsx"; | 7 | import { Button } from "$/ui/objects/Button.tsx"; |
| 7 | import { Divider } from "$/ui/objects/Divider.tsx"; | 8 | import { Divider } from "$/ui/objects/Divider.tsx"; |
| 8 | import { Heading } from "$/ui/objects/Heading.tsx"; | 9 | import { Heading } from "$/ui/objects/Heading.tsx"; |
| @@ -37,27 +38,42 @@ export const template = site.$.template({ type: "home" }, (page, pages) => { | |||
| 37 | 38 | ||
| 38 | <div class="u-mbs-400 c-subtitle">{{ __html: page.content }}</div> | 39 | <div class="u-mbs-400 c-subtitle">{{ __html: page.content }}</div> |
| 39 | 40 | ||
| 40 | <div class="u-mbs-700"> | 41 | <HList class="u-mbs-700"> |
| 41 | <Button | 42 | <li> |
| 42 | href={releasesIndex.url} | 43 | <Button |
| 43 | post={<Icon icon="arrow-right" variant="bold" />} | 44 | href={releasesIndex.url} |
| 44 | size="xl" | 45 | post={<Icon icon="arrow-right" variant="bold" />} |
| 45 | variant="primary" | 46 | size="lg" |
| 46 | wide | 47 | variant="primary" |
| 47 | > | 48 | wide |
| 48 | Releases | 49 | > |
| 49 | </Button> | 50 | Releases |
| 50 | </div> | 51 | </Button> |
| 52 | </li> | ||
| 53 | |||
| 54 | <li> | ||
| 55 | <Button | ||
| 56 | href="https://git.wyvern.rip/corvos-website/" | ||
| 57 | post={<Icon icon="arrow-up-right" variant="bold" />} | ||
| 58 | size="lg" | ||
| 59 | wide | ||
| 60 | > | ||
| 61 | Example project | ||
| 62 | </Button> | ||
| 63 | </li> | ||
| 64 | </HList> | ||
| 51 | </Container> | 65 | </Container> |
| 52 | 66 | ||
| 53 | <Divider level="faint" /> | 67 | <Divider level="faint" /> |
| 54 | 68 | ||
| 55 | <Container class="u-mbs-neutralize" fixed="150" pad-block pad-inline> | 69 | <Container fixed="150" pad-block pad-inline> |
| 56 | <CardList keyboard-nav> | 70 | <Container class="u-mbs-neutralize u-mis-0" fixed> |
| 57 | {releases.map((page) => ( | 71 | <CardList keyboard-nav> |
| 58 | <ReleaseCard page={page} heading-level="h3" list /> | 72 | {releases.map((page) => ( |
| 59 | ))} | 73 | <ReleaseCard page={page} heading-level="h3" list /> |
| 60 | </CardList> | 74 | ))} |
| 75 | </CardList> | ||
| 76 | </Container> | ||
| 61 | </Container> | 77 | </Container> |
| 62 | </BaseLayout> | 78 | </BaseLayout> |
| 63 | ); | 79 | ); |
diff --git a/src/pages/pkg/corvos@[version].ts b/src/pages/pkg/corvos.ts index 6dcb65a..6dcb65a 100644 --- a/src/pages/pkg/corvos@[version].ts +++ b/src/pages/pkg/corvos.ts | |||
diff --git a/src/pages/releases/[version].tsx b/src/pages/releases/[version].tsx index 84d807a..262dac1 100644 --- a/src/pages/releases/[version].tsx +++ b/src/pages/releases/[version].tsx | |||
| @@ -23,13 +23,14 @@ export const pages = site.$.pageGenerator(async function* () { | |||
| 23 | })) { | 23 | })) { |
| 24 | if (item instanceof PipelineStageError) { | 24 | if (item instanceof PipelineStageError) { |
| 25 | yield item; | 25 | yield item; |
| 26 | } else { | 26 | continue; |
| 27 | yield new Page(".strapi", item.notes ?? [], { | ||
| 28 | ...item, | ||
| 29 | title: `Corvos ${item.version}`, | ||
| 30 | type: "release" as const, | ||
| 31 | }); | ||
| 32 | } | 27 | } |
| 28 | |||
| 29 | yield new Page(".strapi", item.notes ?? [], { | ||
| 30 | ...item, | ||
| 31 | title: `Corvos ${item.version}`, | ||
| 32 | type: "release" as const, | ||
| 33 | }); | ||
| 33 | } | 34 | } |
| 34 | }); | 35 | }); |
| 35 | 36 | ||
diff --git a/src/styles/components/_home-banner.scss b/src/styles/components/_home-banner.scss index 660cd9b..59dd255 100644 --- a/src/styles/components/_home-banner.scss +++ b/src/styles/components/_home-banner.scss | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | @include bem.component("home-banner") { | 12 | @include bem.component("home-banner") { |
| 13 | @include bem.elem("intro") { | 13 | @include bem.elem("intro") { |
| 14 | margin-block-start: 0; | 14 | margin-block-start: 0; |
| 15 | font-size: clamp(props.get(iro.$core--font-size--500), 5.3vw, 5rem); | 15 | font-size: clamp(props.get(iro.$core--font-size--800), 4.4vw, 4.2rem); |
| 16 | font-weight: 300; | 16 | font-weight: 300; |
| 17 | color: props.get(iro.$core--theme, --text); | 17 | color: props.get(iro.$core--theme, --text); |
| 18 | line-height: 1.2; | 18 | line-height: 1.2; |
| @@ -28,7 +28,7 @@ | |||
| 28 | 28 | ||
| 29 | @include iro.media--media("<=md") { | 29 | @include iro.media--media("<=md") { |
| 30 | @include bem.elem("intro") { | 30 | @include bem.elem("intro") { |
| 31 | font-size: props.get(iro.$core--font-size--500); | 31 | font-size: props.get(iro.$core--font-size--800); |
| 32 | } | 32 | } |
| 33 | 33 | ||
| 34 | @include bem.elem("buttons") { | 34 | @include bem.elem("buttons") { |
diff --git a/src/ui/components/ReleaseCard.tsx b/src/ui/components/ReleaseCard.tsx index bffe256..5b7b346 100644 --- a/src/ui/components/ReleaseCard.tsx +++ b/src/ui/components/ReleaseCard.tsx | |||
| @@ -13,6 +13,18 @@ export type Props = CardProps<"a"> & { | |||
| 13 | }; | 13 | }; |
| 14 | 14 | ||
| 15 | export const ReleaseCard = ({ "heading-level": headingLevel, page, ...props }: Props) => { | 15 | export const ReleaseCard = ({ "heading-level": headingLevel, page, ...props }: Props) => { |
| 16 | const time = ( | ||
| 17 | <li class="l-hlist__item"> | ||
| 18 | <time class="dt-published" datetime={page.data.date.toISOString()}> | ||
| 19 | {page.data.date.toLocaleDateString(undefined, { | ||
| 20 | day: "numeric", | ||
| 21 | month: "short", | ||
| 22 | year: "numeric", | ||
| 23 | })} | ||
| 24 | </time> | ||
| 25 | </li> | ||
| 26 | ); | ||
| 27 | |||
| 16 | return ( | 28 | return ( |
| 17 | <Card | 29 | <Card |
| 18 | as="a" | 30 | as="a" |
| @@ -27,20 +39,14 @@ export const ReleaseCard = ({ "heading-level": headingLevel, page, ...props }: P | |||
| 27 | <Heading as={headingLevel} class="p-name"> | 39 | <Heading as={headingLevel} class="p-name"> |
| 28 | <span class="u-mie-100">{page.data.title}</span> | 40 | <span class="u-mie-100">{page.data.title}</span> |
| 29 | </Heading> | 41 | </Heading> |
| 42 | |||
| 43 | <small class="u-c-mute u-d-none@sm-hi"> | ||
| 44 | <ul class="l-hlist l-hlist--separated">{time}</ul> | ||
| 45 | </small> | ||
| 30 | </CardBody> | 46 | </CardBody> |
| 31 | 47 | ||
| 32 | <CardBody as="small" class="u-c-mute u-d-none@sm-lo"> | 48 | <CardBody as="small" class="u-c-mute u-d-none@sm-lo"> |
| 33 | <ul class="l-hlist l-hlist--separated"> | 49 | <ul class="l-hlist l-hlist--separated">{time}</ul> |
| 34 | <li class="l-hlist__item"> | ||
| 35 | <time class="dt-published" datetime={page.data.date.toISOString()}> | ||
| 36 | {page.data.date.toLocaleDateString(undefined, { | ||
| 37 | day: "numeric", | ||
| 38 | month: "short", | ||
| 39 | year: "numeric", | ||
| 40 | })} | ||
| 41 | </time> | ||
| 42 | </li> | ||
| 43 | </ul> | ||
| 44 | </CardBody> | 50 | </CardBody> |
| 45 | </Card> | 51 | </Card> |
| 46 | ); | 52 | ); |
