From 1329075c61378a99a5e37e28c3310c7cc20caee8 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Mon, 27 Jul 2020 12:04:36 +0530 Subject: [PATCH] add scroll to top button --- assets/css/footer.css | 20 ++++++++++++++++++++ layouts/_default/baseof.html | 2 +- layouts/partials/footer.html | 17 +++++++++++++++++ 3 files changed, 38 insertions(+), 1 deletion(-) diff --git a/assets/css/footer.css b/assets/css/footer.css index d440da09..a3700c7d 100644 --- a/assets/css/footer.css +++ b/assets/css/footer.css @@ -23,4 +23,24 @@ .footer a:hover { color: var(--primary); border-bottom: 1px solid var(--primary); +} + +.top-link { + font-size: 12px; + visibility: hidden; + opacity: 0; + position: fixed; + bottom: 60px; + right: 30px; + z-index: 99; + background: var(--tertiary); + width: 42px; + height: 42px; + padding: 12px; + color: var(--primary); + border-radius: 64px; + fill: currentColor; + fill-opacity: 80%; + transition: visibility 0.5s, + opacity 0.8s linear; } \ No newline at end of file diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 710cb92e..1d4ccc67 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -8,7 +8,7 @@ {{- partial "header.html" . }} -
+
{{- block "main" . }} {{end }}
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index efab5bbe..85e72736 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -6,6 +6,13 @@ Theme️ PaperMod + + + + {{ $highlight := resources.Get "js/highlight.min.js" | minify | fingerprint}} \ No newline at end of file