From b578b717d7b7ea498ecd1dc386242d5e87e6b08e Mon Sep 17 00:00:00 2001 From: Butter Cat Date: Sat, 6 Jan 2024 03:49:38 +0000 Subject: [PATCH 1/2] Less buggy solution to solving the floating footer problem --- static/style.css | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/static/style.css b/static/style.css index fc466fe..c94714c 100644 --- a/static/style.css +++ b/static/style.css @@ -26,6 +26,8 @@ --popup-goback-background: var(--popup-red); --popup-goback-text: #222; --popup-border: 1px solid var(--popup-red); + + --footer-height: 30px; } @font-face { @@ -115,12 +117,16 @@ body { font-size: 15px; } -body.fixed_navbar { - padding-top: 60px; +body.card, body.fixed_navbar { + padding-bottom: var(--footer-height); min-height: calc(100vh - 60px); position: relative; } +body.fixed_navbar { + padding-top: 60px; +} + nav { display: grid; grid-template-areas: "logo searchbox links"; @@ -314,6 +320,7 @@ body > footer { align-items: center; width: 100%; background: var(--post); + position: absolute; bottom: 0; } From a445759a699bbdc4254641c7eed12b8378c6b68b Mon Sep 17 00:00:00 2001 From: Butter Cat Date: Sat, 6 Jan 2024 16:53:58 -0500 Subject: [PATCH 2/2] Be slightly smarter with options, fix footer being 30px above or below bottom on short posts --- static/style.css | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/static/style.css b/static/style.css index c94714c..a9d8d3c 100644 --- a/static/style.css +++ b/static/style.css @@ -114,16 +114,17 @@ pre, form, fieldset, table, th, td, select, input { body { background: var(--background); - font-size: 15px; -} - -body.card, body.fixed_navbar { padding-bottom: var(--footer-height); - min-height: calc(100vh - 60px); + font-size: 15px; position: relative; } +body.card { + min-height: calc(100vh - 30px); +} + body.fixed_navbar { + min-height: calc(100vh - 90px); padding-top: 60px; }