Samuel Shuert | 86826b8 | 2024-04-27 16:14:20 -0400 | [diff] [blame] | 1 | --- |
| 2 | import type { CollectionEntry } from 'astro:content'; |
| 3 | import BaseHead from '../components/BaseHead.astro'; |
Samuel Shuert | 86826b8 | 2024-04-27 16:14:20 -0400 | [diff] [blame] | 4 | import Footer from '../components/Footer.astro'; |
| 5 | import FormattedDate from '../components/FormattedDate.astro'; |
| 6 | |
Samuel Shuert | 21af95a | 2024-04-30 17:49:11 -0400 | [diff] [blame^] | 7 | type Props = CollectionEntry<'post'>['data']; |
Samuel Shuert | 86826b8 | 2024-04-27 16:14:20 -0400 | [diff] [blame] | 8 | |
Samuel Shuert | 3963283 | 2024-04-29 20:54:19 -0400 | [diff] [blame] | 9 | const { title, description, pubDate, updatedDate } = Astro.props; |
Samuel Shuert | 86826b8 | 2024-04-27 16:14:20 -0400 | [diff] [blame] | 10 | --- |
| 11 | |
| 12 | <html lang="en"> |
| 13 | <head> |
| 14 | <BaseHead title={title} description={description} /> |
Samuel Shuert | 86826b8 | 2024-04-27 16:14:20 -0400 | [diff] [blame] | 15 | </head> |
| 16 | |
Samuel Shuert | 3963283 | 2024-04-29 20:54:19 -0400 | [diff] [blame] | 17 | <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 Shuert | 86826b8 | 2024-04-27 16:14:20 -0400 | [diff] [blame] | 30 | <FormattedDate date={pubDate} /> |
| 31 | { |
| 32 | updatedDate && ( |
Samuel Shuert | 3963283 | 2024-04-29 20:54:19 -0400 | [diff] [blame] | 33 | <div class="italic"> |
Samuel Shuert | 86826b8 | 2024-04-27 16:14:20 -0400 | [diff] [blame] | 34 | Last updated on <FormattedDate date={updatedDate} /> |
| 35 | </div> |
| 36 | ) |
| 37 | } |
| 38 | </div> |
Samuel Shuert | 86826b8 | 2024-04-27 16:14:20 -0400 | [diff] [blame] | 39 | <hr /> |
| 40 | </div> |
| 41 | <slot /> |
| 42 | </div> |
| 43 | </article> |
| 44 | </main> |
| 45 | <Footer /> |
| 46 | </body> |
| 47 | </html> |