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 | |
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')
-rw-r--r-- | apps/website/src/layouts/BlogPost.astro | 36 | ||||
-rw-r--r-- | apps/website/src/layouts/Layout.astro | 4 |
2 files changed, 39 insertions, 1 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> diff --git a/apps/website/src/layouts/Layout.astro b/apps/website/src/layouts/Layout.astro index c4a2ff4..4acc407 100644 --- a/apps/website/src/layouts/Layout.astro +++ b/apps/website/src/layouts/Layout.astro @@ -6,11 +6,13 @@ import Favicon from '/media/polyfrost/minimal_bg.svg?url'; interface Props { title?: string + description?: string favicon?: string } const { title = 'Polyfrost', + description = 'Official website for Polyfrost.', favicon = Favicon, } = Astro.props; --- @@ -19,7 +21,7 @@ const { <html lang="en"> <head> <meta charset="UTF-8" /> - <meta name="description" content="Official website for Polyfrost." /> + <meta name="description" content={description} /> <meta name="viewport" content="width=device-width" /> <link rel="icon" type="image/svg+xml" href={favicon} /> <meta name="generator" content={Astro.generator} /> |