diff options
| author | Serghei Iakovlev <egrep@protonmail.ch> | 2022-07-31 01:00:29 +0200 |
|---|---|---|
| committer | Serghei Iakovlev <egrep@protonmail.ch> | 2022-07-31 01:00:29 +0200 |
| commit | 6d47b7f3462562866b1d6004fb94b66c5d6ff038 (patch) | |
| tree | 8f07023f0070fbc68452db7f219c6f360d72f2ee /layouts/partials/sidebar-toc.html | |
| parent | 063148ef3275e46c076bbbec29cc7313179320d4 (diff) | |
| download | gohugo-theme-ed-6d47b7f3462562866b1d6004fb94b66c5d6ff038.tar.gz | |
Core cleanup
Diffstat (limited to 'layouts/partials/sidebar-toc.html')
| -rw-r--r-- | layouts/partials/sidebar-toc.html | 8 |
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 }} |
