diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html
index cc07748..9a769e0 100644
--- a/layouts/partials/sidebar.html
+++ b/layouts/partials/sidebar.html
@@ -74,7 +74,7 @@
{{- template "sidebar-item-link" dict "context" . "active" $active "title" .LinkTitle "link" .RelPermalink -}}
{{- if and $toc $active -}}
- {{- template "sidebar-toc" dict "page" . -}}
+ {{- partial "sidebar/toc" . -}}
{{- end -}}
{{- template "sidebar-tree" dict "context" . "page" $page "pageURL" $pageURL "level" (add $level 1) "toc" $toc -}}
@@ -89,7 +89,7 @@
{{- template "sidebar-item-link" dict "context" . "active" $active "title" $title "link" .RelPermalink -}}
{{- if and $toc $active -}}
- {{ template "sidebar-toc" dict "page" . }}
+ {{ partial "sidebar/toc" . }}
{{- end }}
{{ template "sidebar-tree" dict "context" . "page" $page "pageURL" $pageURL "level" (add $level 1) "toc" $toc }}
@@ -100,41 +100,6 @@
{{- end }}
{{- end -}}
-{{- define "sidebar-toc" -}}
- {{ $page := .page }}
- {{ with $page.Fragments.Headings }}
-
- {{- range . }}
- {{- with .Headings }}
- {{- range . -}}
- -
-
- {{- .Title -}}
-
-
- {{ end -}}
- {{ end -}}
- {{ end -}}
-
- {{ end }}
-{{- end -}}
-
-{{- define "partials/sidebar/footer" -}}
- {{- range site.Menus.sidebar -}}
- {{- $name := or (T .Identifier) .Name -}}
- {{ if eq .Params.type "separator" }}
-
- {{ $name }}
-
- {{ else }}
- {{ template "sidebar-item-link" dict "active" false "title" $name "link" (.URL | relLangURL) }}
- {{ end }}
- {{- end -}}
-{{- end -}}
-
{{- define "sidebar-item-link" -}}
{{- $external := strings.HasPrefix .link "http" -}}
{{- $open := .open | default true -}}
@@ -154,9 +119,3 @@
{{ end -}}
{{- end -}}
-
-{{- define "partials/sidebar/collapsible-button" -}}
-
-{{- end -}}
diff --git a/layouts/partials/sidebar/collapsible-button.html b/layouts/partials/sidebar/collapsible-button.html
new file mode 100644
index 0000000..a96bd2b
--- /dev/null
+++ b/layouts/partials/sidebar/collapsible-button.html
@@ -0,0 +1,3 @@
+
diff --git a/layouts/partials/sidebar/footer.html b/layouts/partials/sidebar/footer.html
new file mode 100644
index 0000000..37291cb
--- /dev/null
+++ b/layouts/partials/sidebar/footer.html
@@ -0,0 +1,10 @@
+{{- range site.Menus.sidebar -}}
+ {{- $name := or (T .Identifier) .Name -}}
+ {{ if eq .Params.type "separator" }}
+
+ {{ $name }}
+
+ {{ else }}
+ {{ template "sidebar-item-link" dict "active" false "title" $name "link" (.URL | relLangURL) }}
+ {{ end }}
+{{- end -}}
diff --git a/layouts/partials/sidebar/toc.html b/layouts/partials/sidebar/toc.html
new file mode 100644
index 0000000..1006013
--- /dev/null
+++ b/layouts/partials/sidebar/toc.html
@@ -0,0 +1,19 @@
+{{ $page := . }}
+{{ with $page.Fragments.Headings }}
+
+ {{- range . }}
+ {{- with .Headings }}
+ {{- range . -}}
+ -
+
+ {{- .Title -}}
+
+
+ {{ end -}}
+ {{ end -}}
+ {{ end -}}
+
+{{ end }}