You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
sessioncommunities.online/sites/support/index.php

162 lines
3.8 KiB
PHP

<?php
/**
* \file
* Generate donation page.
*/
require_once '+getenv.php';
/**
* Number of background particles.
* @var int $NUM_PARTICLES
*/
$NUM_PARTICLES = 20;
/**
* @var int[] $DELAYS
* Time delays for background particles to appear.
*/
$DELAYS = range(0, 240 - 1, 240 / $NUM_PARTICLES);
shuffle($DELAYS);
/**
* @var string[] $PARTICLES
* Array of available background particles.
*/
$PARTICLES = explode(" ", "$ 💵 💰 💸 💯");
/**
* Pick random particle.
*
* @return string
*/
function random_particle(): string {
global $PARTICLES;
$r = rand(0, count($PARTICLES) - 1);
return $PARTICLES[$r];
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<?php include "+components/page-head.php" ?>
<link rel="stylesheet" href="/css/common-dark.css">
<style>
h1, h2, h3 {
font-family: sans-serif;
}
.particle {
font-family: sans-serif;
font-weight: bold;
text-shadow: 0.5rem 0.1rem 0.1rem green;
font-size: 120px;
color: greenyellow;
z-index: -10;
position: fixed;
top: -2em;
filter: blur(5px);
transform: scaleX(1.25);
opacity: 0.5;
user-select: none;
animation: 240s infinite particle linear;
}
@keyframes particle {
from {
top: -2em;
}
25% {
top: calc(100vh + 2em);
}
to {
top: calc(100vh + 2em);
}
}
#qr-codes {
width: 100%;
display: flex;
flex-direction: row;
justify-content: space-around;
}
.qr-code {
display: flex;
flex-direction: column;
align-items: center;
}
.qr-code img {
margin: auto;
}
@media (max-width: 800px) {
#qr-codes {
display: none;
}
}
</style>
</head>
<body>
<h1>Support us!</h1>
<h2 id="how-to-donate">Here's how to donate:</h2>
<p>Scroll down to see why it's important, and other ways to help.</p>
<ul>
<li>Have <a target="_blank" href="https://getmonero.org" title="Monero cryptocurrency">Monero</a>, an anonymous digital currency. <a href="https://bitcoin.org" target="_blank" title="Bitcoin cryptocurrency">Bitcoin</a> works too.</li>
<li>Send some to <a target="_blank" href="https://codeberg.org/gravel/gravel#support">@gravel</a>, a pseudonymous digital pile of rocks.</li>
</ul>
<div id="qr-codes">
<div class="qr-code">
<h3>Monero</h3>
<img
src="/assets/qr-codes/monero.png"
alt="QR code of Monero donation address"
>
</div>
<div class="qr-code">
<h3>Bitcoin</h3>
<img
src="/assets/qr-codes/bitcoin.png"
alt="QR code of Bitcoin donation address"
>
</div>
</div>
<h2 id="other-ways">You can help in other ways:</h2>
<p>Show your friends that privacy isn't so bad, and</p>
<ul>
<li>post about the site on social media (write what you think & include a link!), or</li>
<li>share your favorite Community with friends using on-site buttons.</li>
</ul>
<h2 id="why-donate">Why it's important:</h2>
<ul>
<li>
A lot of my time goes into handling abuse and appeasing search engines:
Bing and DuckDuckGo have been ignoring the site for a long time prior to Jan 2024.
</li>
<li>Cryptocurrency donations save us a lot of work, since we can turn around and directly use them to pay for server costs.</li>
<li><em>Pay-if-you-can</em> keeps resources free and private for the people who need it most.</li>
<li>I love what I do. <a href="<?=$REPOSITORY_CANONICAL_URL?>/commits/branch/main" target="_blank">I provide the work</a>. <em>You</em> can make my work worth it.</li>
</ul>
<p>
Convinced? <a target="_blank" href="https://codeberg.org/gravel/gravel#support">Here</a>.
</p>
<?php include "+components/footer.php"; ?>
<?php for ($i=0; $i < $NUM_PARTICLES; $i++): ?>
<div
id="particle-<?=$i?>"
class="particle"
style="left: <?=$i / ($NUM_PARTICLES + 1) * 100?>vw; animation-delay: <?=$DELAYS[$i]?>s"
><?= random_particle() ?></div>
<?php endfor; ?>
</body>
</html>