very simple blog page

This commit is contained in:
2022-08-20 16:21:12 +01:00
parent 217c4f6f81
commit 400cb3203f
2 changed files with 11 additions and 8 deletions

View File

@ -6,14 +6,15 @@ console.log(posts[0].url);
<head> <head>
<title>Blog</title> <title>Blog</title>
</head> </head>
<body class="w-full flex justify-center"> <body class="w-full flex justify-center bg-polar-night-400 p-8">
<div class="w-1/2 flex flex-col"> <div class="w-full max-w-xl flex flex-col gap-4">
{posts.map((post) => { {posts.map((post) => (
console.log(post.frontmatter); <a href={post.url} class="flex flex-col border-frost-400 border-2 text-snow-storm-100 p-4 rounded-lg">
return ( <h1 class="text-2xl">{post.frontmatter.title}</h1>
<h1>{post.frontmatter.title}</h1> <p class="text-sm">{post.frontmatter.description}</p>
<a href={post.url}>Read</a> <p class="text-sm">{post.frontmatter.date}</p>
)})} </a>
))}
</div> </div>
</body> </body>
</html> </html>

View File

@ -1,6 +1,8 @@
--- ---
layout: '../../layouts/lay.astro' layout: '../../layouts/lay.astro'
title: 'Hello World' title: 'Hello World'
description: 'This is a hello world post'
date: '20/08/2022'
--- ---
# Hello World # Hello World