diff options
| author | Volpeon <git@volpeon.ink> | 2026-07-22 22:28:12 +0200 |
|---|---|---|
| committer | Volpeon <git@volpeon.ink> | 2026-07-22 22:28:12 +0200 |
| commit | 7ab5640191ecf9e16e975d909a7cb7aa3468700b (patch) | |
| tree | 7bb52857e89745306fa959d5b04bc00e2fdd58ab /src/ui/components | |
| parent | Init (diff) | |
| download | corvos-website-7ab5640191ecf9e16e975d909a7cb7aa3468700b.tar.gz corvos-website-7ab5640191ecf9e16e975d909a7cb7aa3468700b.tar.bz2 corvos-website-7ab5640191ecf9e16e975d909a7cb7aa3468700b.zip | |
Update
Diffstat (limited to 'src/ui/components')
| -rw-r--r-- | src/ui/components/ReleaseCard.tsx | 28 |
1 files changed, 17 insertions, 11 deletions
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 | ); |
