From 311fb94705916832dc4b402c07155c8db7f0cc2f Mon Sep 17 00:00:00 2001 From: Ainali Date: Fri, 3 May 2024 15:50:11 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20Add=20back-to-top=20link?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Based on https://codepen.io/chriscoyier/pen/NWmzZXo Fixes #377 --- static/main.css | 12 ++++++++++++ templates/country-page.html | 1 + 2 files changed, 13 insertions(+) diff --git a/static/main.css b/static/main.css index 99e5cd9699..197b75814e 100644 --- a/static/main.css +++ b/static/main.css @@ -135,6 +135,18 @@ input { object-fit: contain; } +.to-top-link { + margin-block-start: calc(100vh + 200px); + position: sticky; + bottom: 1rem; + left: 1rem; + + background: #00264d; + color: #FFF; + padding: 7px 21px; + border-radius: 3px; + text-decoration: none; +} /* SECTIONS FOR CONTENT */ diff --git a/templates/country-page.html b/templates/country-page.html index cbc27b19a7..71226d81d9 100644 --- a/templates/country-page.html +++ b/templates/country-page.html @@ -75,6 +75,7 @@

Agencies

{{- $country_orgs := query (join "" "generators/" .safeName.String ".rq") -}} {{- include "org-table.html" $country_orgs -}} + Back to top {{ end }}