Juneland-website/contribuer.php

228 lines
4.3 KiB
PHP
Raw Permalink Normal View History

2020-12-11 19:52:55 +01:00
<?php
require 'config.php';
$title = 'Contribuer au développement &#8211; Juneland';
2020-12-11 19:52:55 +01:00
include 'templates/header.php';
define('FUNDING_PUBKEY', 'ENA89PPrBHS8wxhxgGMZxUXd53nRw1BaXBDvCVmZ6Tip');
2023-10-20 20:08:33 +02:00
define('CESIUM_PLUS_NODE', 'https://g1.data.e-is.pro'); // for avatars serving
2020-12-11 19:52:55 +01:00
?><article>
<h1>Contribuer au développement de Juneland</h1>
2020-12-11 19:52:55 +01:00
<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>
2020-12-11 19:52:55 +01:00
<h2 id="dev">Développer pour Juneland</h2>
2021-08-28 14:32:35 +02:00
<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>
2021-08-28 14:32:35 +02:00
<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>
2021-08-28 14:32:35 +02:00
<h3>Merci aux donateurs&#8239;!</h3>
2020-12-11 19:52:55 +01:00
<?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">';
2023-10-20 20:08:33 +02:00
$donorsProfiles = $CF->getDonorsCesiumPlusProfiles();
foreach ($donorsProfiles as $donor) {
2020-12-11 19:52:55 +01:00
echo '
<li>';
echo '
2023-10-20 20:08:33 +02:00
<a href="https://demo.cesium.app/#/app/wot/'. $donor->getPubkey() .'/">';
2020-12-11 19:52:55 +01:00
2023-10-20 20:08:33 +02:00
if ($donor->hasAvatar()) {
2020-12-11 19:52:55 +01:00
2023-10-20 20:08:33 +02:00
echo '<img src="'. CESIUM_PLUS_NODE . '/user/profile/'. $donor->getPubkey() .'/_image/avatar.png" />';
2020-12-11 19:52:55 +01:00
} else {
2023-10-20 20:08:33 +02:00
echo '<img class="default" src="'. DEFAULT_AVATAR .'" />';
2020-12-11 19:52:55 +01:00
}
2023-10-20 20:08:33 +02:00
2020-12-11 19:52:55 +01:00
echo '
<span class="name">
<span>
2023-10-20 20:08:33 +02:00
'. $donor->getName() .'
2020-12-11 19:52:55 +01:00
</span>
2023-10-20 20:08:33 +02:00
</span>';
echo '
2020-12-11 19:52:55 +01:00
</a>
2023-10-20 20:08:33 +02:00
';
2020-12-11 19:52:55 +01:00
2023-10-20 20:08:33 +02:00
echo '
2020-12-11 19:52:55 +01:00
</li>';
}
echo '</ul>';
}
?>
2021-08-28 14:32:35 +02:00
<h3>Comment donner</h3>
2020-12-11 19:52:55 +01:00
<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>
2021-08-28 14:32:35 +02:00
<h3>État actuel des finances</h3>
2020-12-11 19:52:55 +01:00
<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/');
2023-10-20 20:08:33 +02:00
$footerScripts .= '<script src="'. ROOT_URL .'js/copy.js"></script>';
2020-12-11 19:52:55 +01:00
include 'templates/footer.php';