File tree 1 file changed +20
-2
lines changed
1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change 1
1
<script setup lang="ts">
2
2
const { theToc, currentSection } = useToc ()
3
3
const { reload } = useCarbon ()
4
+
5
+ const route = useRoute ()
6
+
7
+ const pageToc = computed (() => {
8
+ if (route .name === ' changelog' ) {
9
+ const cutIndex = { ... theToc ?.value [13 ] }
10
+
11
+ if (cutIndex ) {
12
+ const shorterToc = [... theToc .value ].slice (0 , 13 )
13
+ cutIndex .header = ' More...'
14
+ shorterToc .push (cutIndex )
15
+ return shorterToc
16
+ }
17
+
18
+ return theToc .value
19
+ }
20
+ return theToc .value
21
+ })
4
22
</script >
5
23
6
24
<template >
@@ -16,7 +34,7 @@ const { reload } = useCarbon()
16
34
</h3 >
17
35
18
36
<ul class =" mt-4 text-sm" >
19
- <li v-for =" item in theToc " :key =" item.id" >
37
+ <li v-for =" item in pageToc " :key =" item.id" >
20
38
<a
21
39
:href =" `#${item.id}`"
22
40
class =" block py-1 font-medium transition duration-200"
@@ -32,6 +50,6 @@ const { reload } = useCarbon()
32
50
</ul >
33
51
</div >
34
52
35
- <carbon-ads v-if =" !reload" class =" mt-4 " />
53
+ <carbon-ads v-if =" !reload" class =" bottom-0 " />
36
54
</nav >
37
55
</template >
You can’t perform that action at this time.
0 commit comments