| 1 | --- |
| 2 | import { getCollection } from "astro:content"; |
| 3 | import PageLayout from "@/layouts/Base"; |
| 4 | import PostPreview from "@/components/blog/PostPreview"; |
| 5 | import SocialList from "@/components/SocialList"; |
| 6 | import { sortMDByDate } from "@/utils"; |
| 7 | |
| 8 | const MAX_POSTS = 10; |
| 9 | const allPosts = await getCollection("post"); |
| 10 | const allPostsByDate = sortMDByDate(allPosts).slice(0, MAX_POSTS); |
| 11 | |
| 12 | --- |
| 13 | |
| 14 | <PageLayout meta={{ title: "Home" }}> |
| 15 | <section> |
| 16 | <h1 class="title mb-6">Hey there!</h1> |
| 17 | <p class="mb-4"> |
| 18 | My name is Steve. I'm a developer, technical writer, and creator with a desire to help |
| 19 | build the future of the web. Stay a while to see what I'm working on! |
| 20 | </p> |
| 21 | <SocialList /> |
| 22 | <p>Or anywhere with my handle <span class="text-accent">@stevedsimkins</span></p> |
| 23 | </section> |
| 24 | <section aria-label="Blog post list" class="mt-16"> |
| 25 | <h2 class="title mb-4 text-xl">Posts</h2> |
| 26 | <ul class="space-y-4 sm:space-y-2"> |
| 27 | { |
| 28 | allPostsByDate.map((p) => ( |
| 29 | <li class="flex flex-col gap-x-2 sm:flex-row"> |
| 30 | <PostPreview post={p} /> |
| 31 | </li> |
| 32 | )) |
| 33 | } |
| 34 | </ul> |
| 35 | </section> |
| 36 | <section class="mt-16"> |
| 37 | <h2 class="title mb-4 text-xl">Extras</h2> |
| 38 | <ul class="space-y-4 sm:space-y-2"> |
| 39 | <li> |
| 40 | <a |
| 41 | href="https://stevedylanphoto.com" |
| 42 | target="_blank" |
| 43 | rel="noopener noreferrer" |
| 44 | class="cactus-link inline-block" |
| 45 | >stevedylanphoto |
| 46 | </a>: |
| 47 | <p class="inline-block sm:mt-2">My personal photography portfolio</p> |
| 48 | </li> |
| 49 | <li> |
| 50 | <a |
| 51 | href="https://pinata.cloud" |
| 52 | target="_blank" |
| 53 | rel="noopener noreferrer" |
| 54 | class="cactus-link inline-block" |
| 55 | >Pinata |
| 56 | </a>: |
| 57 | <p class="inline-block sm:mt-2">Where I'm currently working as Head of Community</p> |
| 58 | </li> |
| 59 | <li> |
| 60 | <a |
| 61 | href="https://medium.com/@stevedsimkins" |
| 62 | target="_blank" |
| 63 | rel="noopener noreferrer" |
| 64 | class="cactus-link inline-block" |
| 65 | >Medium |
| 66 | </a>: |
| 67 | <p class="inline-block sm:mt-2"> |
| 68 | Technical blog posts I've written for |
| 69 | <a |
| 70 | href="https://pinata.cloud" |
| 71 | target="_blank" |
| 72 | rel="noopener noreferrer" |
| 73 | class="cactus-link inline-block" |
| 74 | >Pinata |
| 75 | </a> |
| 76 | </p> |
| 77 | </li> |
| 78 | </ul> |
| 79 | </section> |
| 80 | </PageLayout> |