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 e1cda34
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 25 deletions.
50 changes: 25 additions & 25 deletions documentation/_static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,31 @@ vertical li.current > a {
}

@media screen and (min-width: 767px) {
body {
padding-top: 50px; /* To avoid content overlap */
}

.donation-banner {
position: fixed;
top: 0;
background-color: #fff;
padding: 10px;
text-align: center;
width: 100%;
z-index: 1000;
}

.donation-banner a {
font-weight: bold;
}

.donation-icon {
width: 30px;
height: 30px;
vertical-align: middle;
margin-right: 10px;
}

.wy-nav-content {
max-width: 100% !important;
}
Expand All @@ -99,28 +124,3 @@ vertical li.current > a {
max-width: 100%;
}
}

.donation-banner {
background-color: #fff;
padding: 10px;
text-align: center;
width: 100%;
position: fixed;
top: 0;
z-index: 1000;
}

.donation-banner a {
font-weight: bold;
}

.donation-icon {
width: 30px;
height: 30px;
vertical-align: middle;
margin-right: 10px;
}

body {
padding-top: 50px; /* To avoid content overlap */
}
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 e1cda34

Please sign in to comment.