From 3cdd4b29a58402e844716614c6014110d4b20aed Mon Sep 17 00:00:00 2001 From: Alex Ling Date: Mon, 10 Aug 2020 11:42:23 +0000 Subject: [PATCH] Add back to top button to all pages (#95) --- public/css/mango.css | 17 +++++++++++++++++ src/views/layout.html.ecr | 5 ++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/public/css/mango.css b/public/css/mango.css index d0cb6fe..d7e6a65 100644 --- a/public/css/mango.css +++ b/public/css/mango.css @@ -135,3 +135,20 @@ td>.uk-dropdown { #select-bar-controls a:hover { color: orange; } + +#main-section { + position: relative; +} + +#totop-wrapper { + position: absolute; + top: 100vh; + right: 2em; + bottom: 0; +} + +#totop-wrapper a { + position: fixed; + position: sticky; + top: calc(100vh - 5em); +} diff --git a/src/views/layout.html.ecr b/src/views/layout.html.ecr index edfc599..0646534 100644 --- a/src/views/layout.html.ecr +++ b/src/views/layout.html.ecr @@ -67,10 +67,13 @@
-
+
<%= content %> +
+ +