create layout and pages

This commit is contained in:
2022-12-06 23:01:38 -05:00
commit 2ea432eca4
13 changed files with 9653 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
---
layout: '../layouts/Layout.astro'
title: 'About'
---
## Hello World!
My name is Graham Hall, a web developer from Rhode Island.
When I'm not writing code, I'm usually enjoying one of my other hobbies; video games, music, hiking, photography, art, the list goes on...
I write about web development on [my other blog](https://ghall.dev/blog), but I wanted an outlet to write about some of my other interests. So, I put together this site to share whatever's on my mind about the world of tech, gaming, life, whatever strikes my fancy.
If you want to get in touch, I'm on [Mastodon](https://home.social/@ghalldev).
+23
View File
@@ -0,0 +1,23 @@
---
import { format } from 'date-fns';
import { Markup } from 'astro-remote';
import Layout from '../layouts/Layout.astro';
const response = await fetch(`https://api.cosmicjs.com/v2/buckets/${import.meta.env.BUCKET_SLUG}/objects?pretty=true&query=%7B%22type%22%3A%22blog-posts%22%7D&read_key=${import.meta.env.BUCKET_READ_KEY}&limit=20&props=slug,title,content`)
const posts = await response.json();
---
<Layout title="Blog">
<div>
{posts.objects.map(post => (
<article >
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
<h4>{post.title}</h4>
</div>
<Markup content={post.content} />
</article>
))}
</div>
</Layout>