Skip to content

Commit dc575d2

Browse files
committed
fix toc; blue link color
1 parent d4048cc commit dc575d2

File tree

1 file changed

+27
-9
lines changed

1 file changed

+27
-9
lines changed

pages/[...slug].vue

+27-9
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,36 @@
1616
<div v-if="page.body.toc?.links">
1717
<ul role="list" class="text-base leading-6 pb-6">
1818
<li
19-
v-for="item in page.body.toc.links"
20-
:key="item.id"
19+
v-for="i2 in page.body.toc.links"
20+
:key="i2.id"
2121
>
2222
<NuxtLink
23-
:to="`#${ item.id }`"
24-
:class="{
25-
'pl-0': item.depth == 2,
26-
'pl-6': item.depth == 3,
27-
}"
23+
:to="`#${ i2.id }`"
2824
class="
2925
text-sky-500
26+
hover:text-sky-600
3027
underline
31-
cursor-pointer
3228
"
33-
>{{ item.text }}</NuxtLink>
29+
>{{ i2.text }}</NuxtLink>
30+
<ul
31+
v-if="i2.children"
32+
role="list"
33+
class="pl-6"
34+
>
35+
<li
36+
v-for="i3 in i2.children"
37+
:key="i3.id"
38+
>
39+
<NuxtLink
40+
:to="`#${ i3.id }`"
41+
class="
42+
text-sky-500
43+
hover:text-sky-600
44+
underline
45+
"
46+
>{{ i3.text }}</NuxtLink>
47+
</li>
48+
</ul>
3449
</li>
3550
</ul>
3651
</div>
@@ -43,6 +58,9 @@
4358
prose-h2:text-gray-900 prose-h2:text-2xl lg:prose-h2:text-3xl
4459
prose-h3:text-gray-500 prose-h3:text-xl lg:prose-h3:text-2xl
4560
prose-pre:leading-6
61+
prose-a:text-sky-500
62+
hover:prose-a:text-sky-600
63+
prose-a:font-normal
4664
"
4765
>
4866
<ContentRendererMarkdown :value="page" />

0 commit comments

Comments
 (0)