aboutsummaryrefslogtreecommitdiffstats
path: root/code/frontpage/layouts/partials/sidebar/docs-toc.html
diff options
context:
space:
mode:
authorivarlovlie <git@ivarlovlie.no>2023-02-25 13:15:44 +0100
committerivarlovlie <git@ivarlovlie.no>2023-02-25 13:15:44 +0100
commit900bb5e845c3ad44defbd427cae3d44a4a43321f (patch)
treedf3d96a93771884add571e82336c29fc3d9c7a1c /code/frontpage/layouts/partials/sidebar/docs-toc.html
downloadgreatoffice-900bb5e845c3ad44defbd427cae3d44a4a43321f.tar.xz
greatoffice-900bb5e845c3ad44defbd427cae3d44a4a43321f.zip
feat: Initial commit
Diffstat (limited to 'code/frontpage/layouts/partials/sidebar/docs-toc.html')
-rw-r--r--code/frontpage/layouts/partials/sidebar/docs-toc.html26
1 files changed, 26 insertions, 0 deletions
diff --git a/code/frontpage/layouts/partials/sidebar/docs-toc.html b/code/frontpage/layouts/partials/sidebar/docs-toc.html
new file mode 100644
index 0000000..c71a7b8
--- /dev/null
+++ b/code/frontpage/layouts/partials/sidebar/docs-toc.html
@@ -0,0 +1,26 @@
+{{ if and (ne .Params.toc false) (ne .TableOfContents "<nav id=\"TableOfContents\"></nav>") -}}
+<div class="d-xl-none">
+ <button class="btn btn-outline-primary btn-sm doks-toc-toggle collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#onThisPage" aria-controls="doks-docs-nav" aria-expanded="false" aria-label="Toggle On this page navigation">
+ <span>{{ i18n "on-this-page" }}</span>
+ <span>
+ <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" class="doks doks-expand" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><title>Expand</title><polyline points="7 13 12 18 17 13"></polyline><polyline points="7 6 12 11 17 6"></polyline></svg>
+ <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" class="doks doks-collapse" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><title>Collapse</title><polyline points="17 11 12 6 7 11"></polyline><polyline points="17 18 12 13 7 18"></polyline></svg>
+ </span>
+ </button>
+ <div class="collapse" id="onThisPage">
+ <div class="card card-body mt-3 py-1">
+ <div class="page-links">
+ {{ .TableOfContents }}
+ </div>
+ </div>
+ </div>
+</div>
+<div class="page-links d-none d-xl-block">
+ <h3>{{ i18n "on-this-page" }}</h3>
+ {{ if eq .Site.Params.options.scrollSpy true -}}
+ {{ .TableOfContents | replaceRE "<nav id=\"TableOfContents\">" "<nav id=\"toc\">" | safeHTML }}
+ {{ else -}}
+ {{ .TableOfContents }}
+ {{ end -}}
+</div>
+{{ end -}}