diff options
| author | Joe Carstairs <me@joeac.net> | 2026-04-25 13:07:56 +0100 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2026-04-25 13:07:56 +0100 |
| commit | e50b62afa2406fa422c04345f038a583799610aa (patch) | |
| tree | c014dc5e15a673c8a8371749ab73cf0f31038f94 /website/src/layouts | |
| parent | 6470d7f8bd8220d1067cb404386a5d3055031c3b (diff) | |
create MicrologPost component in website
Diffstat (limited to 'website/src/layouts')
| -rw-r--r-- | website/src/layouts/MicrologPost.astro | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/website/src/layouts/MicrologPost.astro b/website/src/layouts/MicrologPost.astro new file mode 100644 index 0000000..b5572f2 --- /dev/null +++ b/website/src/layouts/MicrologPost.astro @@ -0,0 +1,43 @@ +--- +import BaseHead from '../components/BaseHead.astro'; +import FormattedDate from '../components/FormattedDate.astro'; +import Navbar from '../components/Navbar.astro'; + +type Props = { + pubDate: Date; + title: string; +} + +const { pubDate, title } = Astro.props; + +const canonicalUrl = new URL(Astro.url.pathname, Astro.site); +--- + +<html lang="en"> + <head> + <BaseHead title={`${title} | joeac’s microlog`} description={`${title} | joeac's microlog`} /> + <link rel="stylesheet" href="/css/blog.css"> + </head> + + <body> + <Navbar /> + <article class="h-entry"> + <aside> + <span> + This is a <a href="/microlog">microlog</a> post by + <a class="p-author h-card" href="/">Joe Carstairs</a>. + </span> + <span>Published: <FormattedDate date={pubDate} className="dt-published"/>.</span> + <span hidden><a class="u-url uid" href={canonicalUrl}>Permalink</a></span> + </aside> + + <header> + <h1 class="h-name">{title}</h1> + </header> + + <section class="e-content"> + <slot /> + </section> + </article> + </body> +</html> |
