homepage fixes

This commit is contained in:
2023-01-07 15:06:08 -05:00
parent adcafdd951
commit dfb9ee79cb
17 changed files with 228 additions and 66 deletions
+2 -7
View File
@@ -18,12 +18,7 @@ const posts = await response.json();
<Layout title="Home">
{
posts.objects.map((post) => (
<article>
{post.thumbnail ? (
<div style={{ marginBottom: "25px" }}>
<img src={post.thumbnail} alt={`Thumbnail for ${post.title}`} />
</div>
) : null}
<article class="post-preview">
<div>
<BlogHeader title={post.title} date={post.published_at} />
<Markup content={`<p>${post.content.split("</p>")[0]}`} />
@@ -32,7 +27,7 @@ const posts = await response.json();
</article>
))
}
{posts.objects.length < 5 ? null : <a href="/archive">All Posts</a>}
{posts.objects.length < 5 ? null : <a href="/posts">All Posts</a>}
</Layout>
<!-- <style>
-7
View File
@@ -22,13 +22,6 @@ const post = posts.objects[0];
<Layout title={post.title}>
<article>
{
post.thumbnail ? (
<div style={{ marginBottom: "25px" }}>
<img src={post.thumbnail} alt={`Thumbnail for ${post.title}`} />
</div>
) : null
}
<div>
<BlogHeader title={post.title} date={post.published_at} />
<Markup content={post.content} />