File tree Expand file tree Collapse file tree 2 files changed +41
-0
lines changed
Expand file tree Collapse file tree 2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change @@ -412,6 +412,36 @@ blockquote > :last-child {
412412 margin-bottom : 0 ;
413413}
414414
415+ /* Table of Contents */
416+ .toc {
417+ margin : var (--spacing-base ) 0 ;
418+ padding : var (--spacing-sm );
419+ border : 1px solid var (--color-border );
420+ background : var (--color-bg-secondary );
421+ border-radius : var (--border-radius );
422+ }
423+
424+ .toc h2 {
425+ margin : 0 0 var (--spacing-sm ) 0 ;
426+ font-weight : bold;
427+ font-size : 0.95em ;
428+ }
429+
430+ .toc .toc-content ul {
431+ list-style : none;
432+ margin : 0 ;
433+ padding-left : 1em ;
434+ }
435+
436+ .toc .toc-content a {
437+ text-decoration : none;
438+ color : var (--color-text-primary );
439+ }
440+
441+ .toc .toc-content a : hover {
442+ text-decoration : underline;
443+ }
444+
415445@media (max-width : 600px ) {
416446 .path-nav li {
417447 max-width : 100px ; /* More aggressive truncation on mobile */
Original file line number Diff line number Diff line change 11{{ define "main" }}
22 < h1 > {{ .Title }}</ h1 >
33 {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
4+
5+ {{/* Table of Contents: render only when the page has one */}}
6+ {{ if .TableOfContents }}
7+ < nav class ="toc ">
8+ < h2 > Table of contents</ h2 >
9+ < div class ="toc-content ">
10+ {{ .TableOfContents }}
11+ </ div >
12+ </ nav >
13+ {{ end }}
14+
415 {{ .Content }}
516 {{ partial "date.html" .Date}}
617
You can’t perform that action at this time.
0 commit comments