blob: 1d87f76eab713ed9b5d84cda3e23af024c37cb34 [file] [log] [blame]
Samuel Shuert86826b82024-04-27 16:14:20 -04001---
2import type { CollectionEntry } from 'astro:content';
3import BaseHead from '../components/BaseHead.astro';
Samuel Shuert86826b82024-04-27 16:14:20 -04004import Footer from '../components/Footer.astro';
5import FormattedDate from '../components/FormattedDate.astro';
6
Samuel Shuert21af95a2024-04-30 17:49:11 -04007type Props = CollectionEntry<'post'>['data'];
Samuel Shuert86826b82024-04-27 16:14:20 -04008
Samuel Shuert39632832024-04-29 20:54:19 -04009const { title, description, pubDate, updatedDate } = Astro.props;
Samuel Shuert86826b82024-04-27 16:14:20 -040010---
11
12<html lang="en">
13 <head>
14 <BaseHead title={title} description={description} />
Samuel Shuert86826b82024-04-27 16:14:20 -040015 </head>
16
Samuel Shuert39632832024-04-29 20:54:19 -040017 <body class="flex items-center flex-col w-full bg-mantle px-10">
18 <nav class="bg-mantle flex flex-col items-center justify-center py-2 mb-4 group">
19 <a href="/" class="text-text cursor-pointer group-hover:text-text group-hover:bg-surface0 rounded px-4 transition-colors">
20 Home
21 </a>
22 <div class="bg-text h-[2px] w-0 -mt-1 rounded-full group-hover:w-10 transition-all" />
23 </nav>
24 <main class="bg-mantle w-full lg:w-[1024px]">
25 <article class="flex flex-col items-center">
26 <div class="w-11/12 lg:[720px]">
27 <div class="text-left">
28 <h1 class="my-2 text-text">{title}</h1>
29 <div class="text-subtext0 mb-2">
Samuel Shuert86826b82024-04-27 16:14:20 -040030 <FormattedDate date={pubDate} />
31 {
32 updatedDate && (
Samuel Shuert39632832024-04-29 20:54:19 -040033 <div class="italic">
Samuel Shuert86826b82024-04-27 16:14:20 -040034 Last updated on <FormattedDate date={updatedDate} />
35 </div>
36 )
37 }
38 </div>
Samuel Shuert86826b82024-04-27 16:14:20 -040039 <hr />
40 </div>
41 <slot />
42 </div>
43 </article>
44 </main>
45 <Footer />
46 </body>
47</html>