Skip to content

Commit 09066b3

Browse files
feat: put writing years on their own line
1 parent 29b225c commit 09066b3

1 file changed

Lines changed: 7 additions & 19 deletions

File tree

‎src/components/IndexList.astro‎

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -36,33 +36,21 @@ const groups = items.reduce<{ label?: string; items: Item[] }[]>(
3636
{
3737
groups.map((group) => (
3838
<li>
39-
<ul role="list">
40-
{group.items.map((item, index) => (
41-
<li
42-
class:list={[
43-
"after:border-border relative not-last:after:absolute not-last:after:right-0 not-last:after:bottom-0 not-last:after:border-b",
44-
grouped
45-
? "not-last:after:left-12 sm:not-last:after:left-27"
46-
: "not-last:after:left-0",
47-
]}
48-
>
39+
{grouped && group.label && (
40+
<p class="text-faint pt-6 pb-1 tabular-nums">{group.label}</p>
41+
)}
42+
<ul role="list" class="divide-border divide-y">
43+
{group.items.map((item) => (
44+
<li>
4945
<a
5046
href={item.href}
5147
{...(item.external && {
5248
target: "_blank",
5349
rel: "noopener noreferrer",
5450
})}
5551
{...item.attrs}
56-
class:list={[
57-
"group flex items-center justify-between gap-4 py-3 no-underline",
58-
grouped && "pl-12 sm:pl-27",
59-
]}
52+
class="group flex items-center justify-between gap-4 py-3 no-underline"
6053
>
61-
{index === 0 && group.label && (
62-
<span class="text-faint absolute left-0 tabular-nums">
63-
{group.label}
64-
</span>
65-
)}
6654
<span class="inline-flex min-w-0 items-center gap-1.5">
6755
<span class="min-w-0 truncate">{item.title}</span>
6856
{item.external && (

0 commit comments

Comments
 (0)