From 2318c3a551570b38e120c01c4c80d052ef488105 Mon Sep 17 00:00:00 2001 From: Giovanni Pellerano Date: Mon, 23 Sep 2024 10:30:40 +0200 Subject: [PATCH] Disable donation badge on mobiles --- documentation/_static/custom.css | 46 ++++++++++++++++---------------- documentation/_static/custom.js | 4 +++ 2 files changed, 27 insertions(+), 23 deletions(-) diff --git a/documentation/_static/custom.css b/documentation/_static/custom.css index 394d6f4ad5..effb74f2ec 100644 --- a/documentation/_static/custom.css +++ b/documentation/_static/custom.css @@ -84,29 +84,13 @@ vertical li.current > a { list-style: disc; } -@media screen and (min-width: 767px) { - .wy-nav-content { - max-width: 100% !important; - } - - .wy-table-responsive table td, - .wy-table-responsive table th { - white-space: normal !important; - } - - .wy-table-responsive { - overflow: visible !important; - max-width: 100%; - } -} - .donation-banner { + position: fixed; + top: 0; background-color: #fff; padding: 10px; text-align: center; width: 100%; - position: fixed; - top: 0; z-index: 1000; } @@ -115,12 +99,28 @@ vertical li.current > a { } .donation-icon { - width: 30px; - height: 30px; - vertical-align: middle; - margin-right: 10px; + width: 30px; + height: 30px; + vertical-align: middle; + margin-right: 10px; } body { - padding-top: 50px; /* To avoid content overlap */ + padding-top: 50px; /* To avoid content overlap */ +} + +@media screen and (min-width: 767px) { + .wy-nav-content { + max-width: 100% !important; + } + + .wy-table-responsive table td, + .wy-table-responsive table th { + white-space: normal !important; + } + + .wy-table-responsive { + overflow: visible !important; + max-width: 100%; + } } diff --git a/documentation/_static/custom.js b/documentation/_static/custom.js index 4f0c17391e..b9b07f05d1 100644 --- a/documentation/_static/custom.js +++ b/documentation/_static/custom.js @@ -1,4 +1,8 @@ document.addEventListener("DOMContentLoaded", function() { + if (window.innerWidth < 767) { + return; + } + var banner = document.createElement("div"); banner.className = 'donation-banner'; banner.innerHTML = 'Donate Globaleaks is free and open-source whistleblowing software. Donate here to support its development!';