summaryrefslogtreecommitdiffstats
path: root/layouts/partials
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials')
-rw-r--r--layouts/partials/sidebar-toc.html8
1 files changed, 2 insertions, 6 deletions
diff --git a/layouts/partials/sidebar-toc.html b/layouts/partials/sidebar-toc.html
index a6ac8d3..1a39494 100644
--- a/layouts/partials/sidebar-toc.html
+++ b/layouts/partials/sidebar-toc.html
@@ -8,21 +8,17 @@
</div>
{{ $toc := .Page.TableOfContents }}
- {{ $home := printf `<a class="sidebar-nav-item" href="%s">%s</a>` site.Home.RelPermalink (i18n "home") | safeHTML }}
- {{ $annotation := "" }}
-
- {{ if ne .Params.annotations false }}
- {{ $annotation = (partial "hypothesis.html" .) }}
- {{ end }}
{{ $toc = $toc | replaceRE `id="TableOfContents"` `class="sidebar-nav"` | safeHTML }}
{{ $toc = $toc | replaceRE "(<[/]?ul>|<[/]?ol>|<[/]?li>)" "" | safeHTML }}
{{ $toc = $toc | replaceRE `<a href="(.*)">(.*)</a>` `<a class="sidebar-nav-item sidebar-nav-item-toc" href="$1">$2</a>` | safeHTML }}
{{ if ne .Params.annotations false }}
+ {{ $annotation = (partial "hypothesis.html" .) }}
{{ $toc = $toc | replaceRE `<nav class="sidebar-nav">` (printf `<nav class="sidebar-nav">%s` $annotation) | safeHTML }}
{{ end }}
+ {{ $home := printf `<a class="sidebar-nav-item" href="%s">%s</a>` site.Home.RelPermalink (i18n "home") | safeHTML }}
{{ $toc = $toc | replaceRE `<nav class="sidebar-nav">` (printf `<nav class="sidebar-nav">%s` $home) | safeHTML }}
{{ $toc }}