diff options
author | Pauline <git@ethanlibs.co> | 2023-11-26 22:55:04 -0500 |
---|---|---|
committer | Pauline <git@ethanlibs.co> | 2023-11-26 22:55:04 -0500 |
commit | 181547a25213bee8a20002e07344b957386c4d0f (patch) | |
tree | 1e1b4815166342406026478c00604cdd65e64660 /apps/website/src/layouts/BlogPost.astro | |
parent | 955e820f1ccb59467a4f27c5c77738a7ebff193e (diff) | |
download | Nexus-181547a25213bee8a20002e07344b957386c4d0f.tar.gz Nexus-181547a25213bee8a20002e07344b957386c4d0f.tar.bz2 Nexus-181547a25213bee8a20002e07344b957386c4d0f.zip |
feat(build): transfer everything to esm/ts
Diffstat (limited to 'apps/website/src/layouts/BlogPost.astro')
-rw-r--r-- | apps/website/src/layouts/BlogPost.astro | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/apps/website/src/layouts/BlogPost.astro b/apps/website/src/layouts/BlogPost.astro new file mode 100644 index 0000000..ed2a3c3 --- /dev/null +++ b/apps/website/src/layouts/BlogPost.astro @@ -0,0 +1,36 @@ +--- +import type { CollectionEntry } from 'astro:content'; +import Layout from './Layout.astro'; + +import '@styles/blog.css'; +import FormattedDate from '@components/base/FormattedDate.astro'; + +type Props = CollectionEntry<'blog'>['data']; + +const { title, description, pubDate, updatedDate, heroImage } = Astro.props; +--- + +<Layout title={title} description={description}> + <article> + <div class='hero-image'> + {heroImage && <img width={1020} height={510} src={heroImage} alt="Hero Image" />} + </div> + <div class="prose"> + <div class="title"> + <div class="date"> + <FormattedDate date={pubDate} /> + { + updatedDate && ( + <div class="last-updated-on"> + Last updated on <FormattedDate date={updatedDate} /> + </div> + ) + } + </div> + <h1>{title}</h1> + <hr /> + </div> + <slot /> + </div> + </article> +</Layout> |