Skip to content

Commit 3b6f29d

Browse files
added h4 selector
package
1 parent e531a1b commit 3b6f29d

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

others/vuejs-frontend/src/components/UI/TableOfContents.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ export default {
137137
}
138138
139139
// Get all h1-h3 elements from the content
140-
const headings = Array.from(markdownContent.querySelectorAll('h1, h2, h3'))
140+
const headings = Array.from(markdownContent.querySelectorAll('h1, h2, h3, h4'))
141141
if (headings.length === 0) {
142142
console.warn('No headings found in content')
143143
return
@@ -251,7 +251,7 @@ export default {
251251
252252
.toc-wrapper
253253
top: $header-height // Use the header height variable
254-
padding: 1em
254+
padding: 1rem 1rem 1rem 0
255255
width: 20%
256256
z-index: 5
257257
height: calc(100vh - #{$header-height}) // Use the header height variable
@@ -297,6 +297,8 @@ export default {
297297
margin-left: 1rem
298298
&--h3
299299
margin-left: 2rem
300+
&--h4
301+
margin-left: 3rem
300302
301303
&--active
302304
> .toc__link
28 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)