Skip to content

Commit

Permalink
Disable donation badge on mobiles
Browse files Browse the repository at this point in the history
  • Loading branch information
evilaliv3 committed Sep 23, 2024
1 parent 1b4a894 commit 2318c3a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 23 deletions.
46 changes: 23 additions & 23 deletions documentation/_static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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%;
}
}
4 changes: 4 additions & 0 deletions documentation/_static/custom.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
document.addEventListener("DOMContentLoaded", function() {
if (window.innerWidth < 767) {
return;
}

var banner = document.createElement("div");
banner.className = 'donation-banner';
banner.innerHTML = '<img src="https://raw.githubusercontent.com/globaleaks/whistleblowing-software/main/brand/assets/heart.svg" class="donation-icon" alt="Donate" /> Globaleaks is free and open-source whistleblowing software. <a href="https://github.com/sponsors/globaleaks">Donate here to support its development!</a>';
Expand Down

0 comments on commit 2318c3a

Please sign in to comment.