From 1460aefdd6e705bcba0ad2f0943be87c3a36eb03 Mon Sep 17 00:00:00 2001 From: Mircea-Pavel ANTON Date: Sat, 7 Jan 2023 03:44:09 +0200 Subject: [PATCH] Extract the "scroll to top" section as a partial --- layouts/_default/baseof.html | 8 +------- layouts/partials/scroll-to-top.html | 7 +++++++ 2 files changed, 8 insertions(+), 7 deletions(-) create mode 100644 layouts/partials/scroll-to-top.html diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index ce87099c..dc02c58d 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -26,13 +26,7 @@
{{ block "main" . }}{{ end }} {{ if and (.Site.Params.footer.showScrollToTop | default true) (gt .WordCount 1) }} - + {{- partial "scroll-to-top.html" . -}} {{ end }}
{{- partial "footer.html" . -}} diff --git a/layouts/partials/scroll-to-top.html b/layouts/partials/scroll-to-top.html new file mode 100644 index 00000000..50a7e793 --- /dev/null +++ b/layouts/partials/scroll-to-top.html @@ -0,0 +1,7 @@ +
+ + ↑ + +
\ No newline at end of file