Skip to content

Commit 067c467

Browse files
committed
add a link sections on home page
1 parent 6fb5c7b commit 067c467

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

src/pages/index.astro

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,16 @@ const postsSorted = posts.sort((a, b) =>
1212
);
1313
1414
const year = new Date().getFullYear() - 2002;
15+
16+
const links = [
17+
[
18+
{ href: '/now', title: '/now' },
19+
{ href: '/changelog', title: '/changelog' },
20+
{ href: '/bookmarks', title: '/bookmarks' },
21+
{ href: '/tags', title: '/tags' },
22+
],
23+
];
24+
1525
---
1626

1727
<Layout>
@@ -31,6 +41,18 @@ const year = new Date().getFullYear() - 2002;
3141
and <Link href={`${GITHUB_REPO_URL}/blob/main/LICENSE-posts`} isExternal>CC BY-SA 4.0</Link> licenses.
3242
</p>
3343
</section>
44+
<section class="links">
45+
<h2>Links</h2>
46+
{links.map((section) => (
47+
<ul>
48+
{section.map((link) => (
49+
<li>
50+
<Link href={link.href}>{link.title}</Link>
51+
</li>
52+
))}
53+
</ul>
54+
))}
55+
</section>
3456
<section class="posts">
3557
<h2>Archive</h2>
3658
<ul>
@@ -79,5 +101,9 @@ const year = new Date().getFullYear() - 2002;
79101
flex-direction: column;
80102
}
81103
}
82-
</style>
83104

105+
.links ul li {
106+
margin-left: var(--spacing-2x);
107+
list-style-type: disc;
108+
}
109+
</style>

0 commit comments

Comments
 (0)