Skip to content

Commit

Permalink
fix(toc): tweak TOC
Browse files Browse the repository at this point in the history
  • Loading branch information
ntk148v committed Jul 28, 2023
1 parent d3ec721 commit 0c65d1d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions assets/css/site.css
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ code > pre {
}

pre {
@apply overflow-auto p-4 my-5 rounded-lg drop-shadow-lg;;
@apply overflow-auto p-4 my-5 rounded-lg drop-shadow-lg;
}

pre > code {
Expand All @@ -121,10 +121,14 @@ pre > code {
/* ################################# */
@media screen and (min-width: 1080px) {
#toc {
@apply fixed top-0 left-0 z-40 w-1/4 px-page-gutter py-sidebar-top;
@apply fixed top-sidebar-top left-page-gutter z-40 w-1/4 px-page-gutter py-sidebar-top;
}
}

#toc summary {
@apply font-bold;
}

#toc-list ol {
@apply pl-3 m-1 border-l-2 text-sm text-muted;
counter-reset: tocitem;
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/toc.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{{ if gt (.TableOfContents | countwords)
0
}}
<details>
<details open>
<summary>Table of contents</summary>
<div id="toc-list">{{ .TableOfContents }}</div>
</details>
Expand Down

0 comments on commit 0c65d1d

Please sign in to comment.