Skip to content

Commit 841d90b

Browse files
clean up styles
1 parent 28515a8 commit 841d90b

File tree

3 files changed

+18
-11
lines changed

3 files changed

+18
-11
lines changed

src/layouts/BlogPost.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const buildOGURL = (slug: string | undefined) => {
2121
<img
2222
src={heroImage || buildOGURL(slug)}
2323
alt=""
24-
class="mb-6 w-full rounded-xl shadow-lg md:max-w-4xl"
24+
class="mb-6 w-full rounded-xl border border-slate-3 shadow-lg md:max-w-4xl"
2525
/>
2626
{pubDate && <FormattedDate date={pubDate} />}
2727
{

src/pages/blog/index.astro

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ import FormattedDate from "../../components/FormattedDate.astro";
77
const posts = (await getCollection("blog")).sort(
88
(a, b) => a.data.pubDate.valueOf() - b.data.pubDate.valueOf()
99
);
10+
11+
const BASE_CARD_STYLES =
12+
"prose prose-slate border-slate-8 bg-slate-2 flex flex-col justify-between rounded-lg border p-6 shadow-md";
1013
---
1114

1215
<Layout title={SITE_TITLE} description={SITE_DESCRIPTION}>
@@ -25,20 +28,20 @@ const posts = (await getCollection("blog")).sort(
2528
<!-- Blog post cards -->
2629
{
2730
posts.map((post) => (
28-
<div class="prose prose-slate border-slate-8 bg-slate-2 flex flex-col justify-between rounded-lg border p-6 shadow-md">
29-
<h2 class="mb-4 text-xl">
30-
<a href={`/blog/${post.slug}/`} class="no-underline">
31-
{post.data.title}
32-
</a>
31+
<a
32+
href={`/blog/${post.slug}/`}
33+
class:list={[BASE_CARD_STYLES]}
34+
class="h-96 w-96"
35+
>
36+
<h2 class="text-2xl">
37+
<p>{post.data.title}</p>
3338
</h2>
3439
<FormattedDate date={post.data.pubDate} />
3540
<div class="">
3641
<p class="">{post.data.description}</p>
3742
</div>
38-
<a href={`/blog/${post.slug}/`} class="decoration-wavy">
39-
Read more &rarr;
40-
</a>
41-
</div>
43+
<p class="decoration-wavy">Read more &rarr;</p>
44+
</a>
4245
))
4346
}
4447
</div>

src/pages/index.astro

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ const data = await response.json();
1616
>
1717
<h1>Welcome! 👋</h1>
1818
<div class="w-full md:max-w-4xl">
19-
<img src={"/placeholder-about.png"} alt="" class="rounded-xl shadow-lg" />
19+
<img
20+
src={"/placeholder-about.png"}
21+
alt=""
22+
class="rounded-xl border border-slate-3 shadow-lg"
23+
/>
2024
<div class="rounded-lg border-2 border-slate-4 bg-slate-3 px-3">
2125
<p>
2226
{data.summary}

0 commit comments

Comments
 (0)