huge upgrade to theme and pagefind search bar.
This commit is contained in:
32
themes/hugo-book.backup/assets/plugins/_numbered.scss
Normal file
32
themes/hugo-book.backup/assets/plugins/_numbered.scss
Normal file
@@ -0,0 +1,32 @@
|
||||
$startLevel: 1;
|
||||
$endLevel: 6;
|
||||
|
||||
.book-page .markdown.book-article {
|
||||
@for $currentLevel from $startLevel through $endLevel {
|
||||
h#{$currentLevel} {
|
||||
counter-increment: h#{$currentLevel};
|
||||
counter-reset: h#{$currentLevel + 1};
|
||||
|
||||
$content: "";
|
||||
@for $n from $startLevel through $currentLevel {
|
||||
$content: $content + 'counter(h#{$n})"."';
|
||||
}
|
||||
|
||||
&::before {
|
||||
content: unquote($content) " ";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.book-toc nav#TableOfContents ul {
|
||||
counter-reset: item;
|
||||
|
||||
li {
|
||||
counter-increment: item;
|
||||
|
||||
> a:before {
|
||||
content: counters(item, ".") ". ";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user