From 8546859c9d6cbf5347091a36680f7c07440a441a Mon Sep 17 00:00:00 2001 From: Jieiku Date: Sat, 11 Jun 2022 20:44:13 -0700 Subject: Hide Back-to-Top on Short Pages --- sass/include/_top.scss | 4 +++- templates/page.html | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/sass/include/_top.scss b/sass/include/_top.scss index 98b2a61..b9fd406 100644 --- a/sass/include/_top.scss +++ b/sass/include/_top.scss @@ -1,10 +1,12 @@ .top { position: sticky; bottom: 9px; - padding: 9px; + right: 9px; + place-self: end; margin-top: 109vh; + padding: 9px; font-weight:700; border-radius: 9px; color: var(--a1); diff --git a/templates/page.html b/templates/page.html index c653018..eb06ac3 100644 --- a/templates/page.html +++ b/templates/page.html @@ -66,5 +66,11 @@ {%- endblock content %} {%- block gotop %} + +{%- if page.reading_time %} +{%- if page.reading_time > 1 %} ⋏ +{%- endif %} +{%- endif %} + {%- endblock gotop %} \ No newline at end of file -- cgit v1.3.1