summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerghei Iakovlev <egrep@protonmail.ch>2022-05-15 14:35:35 +0200
committerSerghei Iakovlev <egrep@protonmail.ch>2022-05-15 14:35:35 +0200
commit96f4778b558c29207b766e88ae9c62c038e7e2e3 (patch)
treed2d2cd0e1e2a3057d1aaa112e6e94ce64052f452
parent0bde219bfe062ee6018196c385b42613489862dc (diff)
downloadgohugo-theme-ed-96f4778b558c29207b766e88ae9c62c038e7e2e3.tar.gz
Move footer to common place
-rw-r--r--layouts/partials/footer.html11
-rw-r--r--layouts/partials/sidebar-toc.html7
-rw-r--r--layouts/partials/sidebar.html11
3 files changed, 13 insertions, 16 deletions
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
new file mode 100644
index 0000000..c0a6d49
--- /dev/null
+++ b/layouts/partials/footer.html
@@ -0,0 +1,11 @@
+<div class="sidebar-item">
+ <p>
+ {{- with site.Params.footer }}
+ {{ . | safeHTML }}
+ {{- else }}
+ {{- with .Params.editor }}<p>Edited by {{ . }}, {{ now.Format "2006" }}.</p>{{ end }}
+ Built with <a href="https://github.com/sergeyklay/gohugo-theme-ed" target="_blank" rel="noopener noreferrer">Ed.</a>
+ Distributed under an MIT license.
+ {{- end }}
+ </p>
+</div>
diff --git a/layouts/partials/sidebar-toc.html b/layouts/partials/sidebar-toc.html
index ee3a6f9..da7fd93 100644
--- a/layouts/partials/sidebar-toc.html
+++ b/layouts/partials/sidebar-toc.html
@@ -18,10 +18,5 @@
{{ end }}
</nav>
- <div class="sidebar-item">
- <p>Edited by {{ .Params.editor }}, {{ now.Format "2006" }}.</p>
- <p>
- Built with <a href="https://minicomp.github.io/ed/" target="_blank" rel="noopener noreferrer">Ed.</a> Distributed under an MIT license.
- </p>
- </div>
+ {{ partial "footer" . }}
</aside>
diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html
index 57bca9d..e6e4bd3 100644
--- a/layouts/partials/sidebar.html
+++ b/layouts/partials/sidebar.html
@@ -21,14 +21,5 @@
{{/* TODO: Add hypothesis support */}}
</nav>
- <div class="sidebar-item">
- <p>
- {{- with site.Params.footer }}
- {{ . | safeHTML }}
- {{- else }}
- Built with <a href="https://github.com/sergeyklay/gohugo-theme-ed" target="_blank" rel="noopener noreferrer">Ed.</a>
- Distributed under an MIT license.
- {{- end }}
- </p>
- </div>
+ {{ partial "footer" . }}
</aside>