Juneland-website/contribuer.php

225 lines
4.2 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
require 'config.php';
$title = 'Contribuer au développement &#8211; Juneland';
include 'templates/header.php';
define('FUNDING_PUBKEY', 'ENA89PPrBHS8wxhxgGMZxUXd53nRw1BaXBDvCVmZ6Tip');
?><article>
<h1>Contribuer au développement de Juneland</h1>
<p>
Il y a deux moyens par lesquels vous pouvez contribuer au développement de Juneland&nbsp;:
</p>
<ul>
<li>
<a href="#dev">
Développer
</a>
des modules et interfaces entre Juneland et l'extérieur (vous serez récompensés en Ğ1 sur le mode du feature bounty)
</li>
<li>
<a href="#donate">
Faire un don
</a>
en monnaie libre Ğ1, pour financer les récompenses
</li>
</ul>
<h2 id="dev">Développer pour Juneland</h2>
<h3>Défis en cours</h3>
<table>
<thead>
<tr>
<th>Récompense</th>
<th>Défi</th>
</tr>
</thead>
<tbody>
<tr>
<td class="nombre">
50 DU<sub>Ğ1</sub>
</td>
<td>
Construire un aérodrome<br />
(quand un mod adéquat sera prêt)
</td>
</tr>
<tr>
<td class="nombre">
100 DU<sub>Ğ1</sub>
</td>
<td>
Importer un mini monde de 100×100
</td>
</tr>
</tbody>
</table>
<h3>Défis relevés</h3>
<table>
<thead>
<tr>
<th>Récompense</th>
<th>Défi</th>
<th>Réalisé</th>
</tr>
</thead>
<tbody>
<tr>
<td class="nombre">
50 DU<sub>Ğ1</sub>
</td>
<td>
Construire un métro
</td>
<td>
par tuxmain
</td>
</tr>
<tr>
<td class="nombre">
100 DU<sub>Ğ1</sub>
</td>
<td>
Exporter ses messages <a href="https://scuttlebutt.nz">Scuttlebutt</a> depuis Juneland
</td>
<td>
par Be1
</td>
</tr>
</tbody>
</table>
<h2 id="donate">Financer les développements</h2>
<h3>Merci aux donateurs&#8239;!</h3>
<?php
require_once('vendor/crowdfunding2/Crowdfunding.class.php');
require_once('vendor/crowdfunding2/Chart.class.php');
require_once('vendor/crowdfunding2/Graph.class.php');
$CF = new Crowdfunding(FUNDING_PUBKEY,
'relative',
'2020-05-01');
$donors = $CF->getDonors();
if (empty($donors)) {
echo _('Pas encore de donateurs');
} else {
echo '<ul class="donorsList">';
foreach ($donors as $donor) {
$donorProfile = $CF->getDonorCesiumPlusProfile($donor);
echo '
<li>';
echo '
<a href="https://demo.cesium.app/#/app/wot/'. $donor .'/">';
$avatar = $donorProfile->getAvatar();
if (!empty($avatar)) {
echo '<img src="data:'. $avatar->getContentType(). ';base64, '. $avatar->getContent() .'" />';
} else {
echo '<img class="default" src="'. DEFAULT_AVATAR .'" />';
}
echo '
<span class="name">
<span>
'. $donorProfile->getName() .'
</span>
</span>
</a>
</li>';
}
echo '</ul>';
}
?>
<h3>Comment donner</h3>
<div class="CTA">
<p>
Copiez la clef de notre compte Ğ1 dans votre presse-papier&nbsp;:
</p>
<p class="pubkey-and-copy-button">
<input id="pubkey" type="text" value="<?php echo FUNDING_PUBKEY; ?>" readonly />
<button id="copy">
Copier la clef
</button>
</p>
<div id="successMsg">
<p>Et maintenant collez-la dans votre client Ğ1 (Cesium par exemple) afin de faire votre don 😉</p>
<p class="politesse">Merci pour votre générosité ❤️</p>
</div>
</div>
<h3>État actuel des finances</h3>
<p>Le projet est actuellement en bonne santé financière.</p>
<figure id="chart"></figure>
</article>
<?php
$CF->setTarget(1000);
$chart = new Chart($CF);
$amountCumulativeGraph = new Graph($chart->getAmountCollectedByDayCumulativePoints(), _('Montant total récolté'));
$amountCumulativeGraph->setStyle('type', 'line');
$amountCumulativeGraph->setStyle('borderColor', '#662b00');
$amountCumulativeGraph->setStyle('backgroundColor', 'green');
$amountCumulativeGraph->setStyle('lineTension', 0);
$amountCumulativeGraph->setStyle('pointRadius', 1);
$amountCumulativeGraph->setStyle('borderWidth', 2);
$amountCumulativeGraph->setStyle('steppedLine', true);
$chart->addGraph($amountCumulativeGraph);
$footerScripts = '';
$footerScripts .= $chart->getScripts('fr', '#chart', ROOT_URL . 'vendor/crowdfunding2/');
$footerScripts .= '<script src="js/copy.js"></script>';
include 'templates/footer.php';