Skip to content

Commit e1b849b

Browse files
committed
feat: make blog page look good
1 parent 01bb12e commit e1b849b

File tree

4 files changed

+32
-10
lines changed

4 files changed

+32
-10
lines changed

src/components/NewsletterLayout.astro

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,33 @@ const { frontmatter, headings } = Astro.props;
1515
---
1616

1717
<Layout title={frontmatter.title}>
18-
<h1>{frontmatter.title}</h1>
19-
<p>{frontmatter.date}</p>
20-
<p>{frontmatter.description}</p>
21-
<div class="flex">
22-
{headings.map((heading) => <a href={`#${heading.slug}`}>{heading.text}</a>)}
18+
<div class="mx-auto max-w-2xl">
19+
<div class="pb-4">
20+
<h1 class="text-2xl font-bold">{frontmatter.title}</h1>
21+
<p class="text-gray-500">{frontmatter.date}</p>
22+
<p>{frontmatter.description}</p>
23+
<div>
24+
<h2 class="text-lg font-semibold">Table of Contents</h2>
25+
<ol class="list-decimal pl-8">
26+
{
27+
headings
28+
.filter((heading) => heading.depth === 1)
29+
.map((heading) => (
30+
<li>
31+
<a
32+
href={`#${heading.slug}`}
33+
class="text-blue-500 hover:underline"
34+
>
35+
{heading.text}
36+
</a>
37+
</li>
38+
))
39+
}
40+
</ol>
41+
</div>
42+
</div>
43+
<article class="prose-thin prose prose-invert">
44+
<slot />
45+
</article>
2346
</div>
24-
<article class="prose prose-invert">
25-
<slot />
26-
</article>
2747
</Layout>

src/pages/docs.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Layout from '../components/Layout.astro';
33
---
44

55
<Layout title="Docs">
6-
<div class="mx-auto max-w-xl space-y-4 font-thin">
6+
<div class="mx-auto max-w-2xl space-y-4 font-thin">
77
<h2 class="text-3xl font-normal">Overview</h2>
88
<p>
99
Rustular is designed to revolutionize the way web applications are

src/pages/index.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import Testimonial from '../components/Testimonial.astro';
55
---
66

77
<Layout title="Home">
8-
<div class="mx-auto flex max-w-xl flex-col space-y-16 text-center">
8+
<div class="mx-auto flex max-w-2xl flex-col space-y-16 text-center">
99
<div class="text-5xl">Blazingly fast</div>
1010
<div class="font-thin">
1111
Rustular is a revolutionary web development tool that harnesses the

src/pages/newsletter/2023-05.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ description: Welcome to the May 2023 edition of our monthly newsletter! We have
99

1010
We're thrilled to announce our latest feature: **Real-time Collaboration**. Now you can collaborate with your team members in real-time, making project management easier and more efficient.
1111

12+
## A small heading
13+
1214
To use this feature, simply navigate to your project dashboard and click on the "Collaboration" tab. You'll be able to see who's currently viewing or editing the project, and changes will be synced instantly.
1315

1416
# Upcoming Events

0 commit comments

Comments
 (0)