summaryrefslogtreecommitdiff
path: root/website/src/layouts/MicrologPost.astro
blob: fa93011764ce8bea64ba017197990ac49f82a324 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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/post.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>