Mise à jour de GitLab prévue ce samedi 8 mai 2021 à partir de 9h00 CET | GitLab upgrade planned this Saturday May 4th of 2021 from 9:00 AM CET

Commit 8b46861c authored by Boris Paing's avatar Boris Paing

STY: thank-you page

parent 726f5b8b
......@@ -1207,51 +1207,79 @@ article#funding .crowdfunding-widget .progress-bar {
-webkit-animation: progress-bar-stripes 1s linear infinite;
animation: progress-bar-stripes 1s linear infinite;
}
article#funding .donorsList {
list-style-type: none;
margin: 0 auto;
padding: 0;
max-width: 500px;
text-align: center;
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: center;
}
article#funding .donorsList > li {
padding: 0.10rem 0.5rem;
flex-shrink: 1;
box-sizing: border-box;
}
article#funding .donorsList > li span {
border-radius: 1em;
padding: 0 0.25em;
color: white;
}
article#funding .donorsList > li:nth-child(5n) span {
background: #66dbff;
color: black;
}
article#funding .donorsList > li:nth-child(5n+1) span {
background: #3dc5d1;
}
article#funding .donorsList > li:nth-child(5n+2) span {
background: #004080;
}
article#funding .donorsList > li:nth-child(5n+3) span {
background: #99e7ff;
color: #03072b;
}
article#funding .donorsList > li:nth-child(5n+4) span {
background: #33cfff;
color: #03072b;
}
article#funding .donorsList > :nth-child(1) {
width: 100%;
}
article#funding .donorsList > :nth-child(2),
article#funding .donorsList > :nth-child(3) {
width: 50%;
:root {
--base-width: 150px;
}
.donorsList {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-wrap: wrap;
justify-content: center;
font-family: sans-serif;
}
.donorsList li {
flex-basis: var(--base-width);
flex-grow: 0;
overflow: hidden;
border: 2px solid hsl(0, 0%, 90%);
box-shadow: -1px 1px 10px hsla(0, 0%, 0%, 0.20);
margin: 1% 1em;
text-align: center;
border-radius: 1em;
display: flex;
align-items: center;
}
.donorsList li a {
width: 100%;
color: hsl(0, 0%, 10%);
text-decoration: none;
font-size: 0.9em;
}
.donorsList li a img {
background-color: #1a237e;
width: var(--base-width);
}
.donorsList li a img,
.donorsList li a .name {
width: 100%;
}
.donorsList li a .name {
display: block;
height: 1rem;
padding: 1rem 0;
font-weight: bold;
width: 100vw;
text-align: center;
position: relative;
left: calc(-50vw + 50%);
}
.donorsList li a .name span {
display: inline-block;
padding: 0 1em;
text-align: left;
}
/* ======= Tutorial page ======= */
#tuto {
......
......@@ -235,10 +235,17 @@ section.text-box
{
margin-left: 2rem;
margin-right: 2rem;
text-align: justify;
width: auto;
}
p,
ul,
ol,
dl,
table {
text-align: justify;
}
td
{
background: white;
......@@ -1597,7 +1604,210 @@ article#features {
article#funding {
text-align: justify;
overflow: auto;
background-color: hsl(39.1, 85.2%, 94.7%);
h1 {
color: black;
}
p {
text-align: justify;
}
p, h1, h2, h3, h4, h5, h6 {
margin-left: 1em;
margin-right: 1em;
}
.donorsList {
list-style: none;
font-family: sans-serif;
margin: 0;
padding: 0;
/*
display: flex;
flex-wrap: wrap;
*/
justify-content: center;
display: grid;
grid-row-gap: 1rem;
@media screen and (min-width: 448px) {
grid-template-columns: repeat(2, 204px);
grid-column-gap: 20px;
&>li:nth-of-type(2n+1) {
grid-column: 1;
}
&>li:nth-of-type(2n+2) {
grid-column: 2;
}
}
@media screen and (min-width: 672px) {
grid-template-columns: repeat(3, 204px);
grid-column-gap: 20px;
&>li:nth-of-type(3n+1) {
grid-column: 1;
}
&>li:nth-of-type(3n+2) {
grid-column: 2;
}
&>li:nth-of-type(3n+3) {
grid-column: 3;
}
}
@media screen and (min-width: 896px) {
grid-template-columns: repeat(4, 204px);
grid-column-gap: 20px;
&>li:nth-of-type(4n+1) {
grid-column: 1;
}
&>li:nth-of-type(4n+2) {
grid-column: 2;
}
&>li:nth-of-type(4n+3) {
grid-column: 3;
}
&>li:nth-of-type(4n+4) {
grid-column: 4;
}
}
@media screen and (min-width: 1120px) {
grid-template-columns: repeat(5, 204px);
grid-column-gap: 20px;
&>li:nth-of-type(5n+1) {
grid-column: 1;
}
&>li:nth-of-type(5n+2) {
grid-column: 2;
}
&>li:nth-of-type(5n+3) {
grid-column: 3;
}
&>li:nth-of-type(5n+4) {
grid-column: 4;
}
&>li:nth-of-type(5n+5) {
grid-column: 5;
}
}
@media screen and (min-width: 1344px) {
grid-template-columns: repeat(6, 204px);
grid-column-gap: 20px;
&>li:nth-of-type(6n+1) {
grid-column: 1;
}
&>li:nth-of-type(6n+2) {
grid-column: 2;
}
&>li:nth-of-type(6n+3) {
grid-column: 3;
}
&>li:nth-of-type(6n+4) {
grid-column: 4;
}
&>li:nth-of-type(6n+5) {
grid-column: 5;
}
&>li:nth-of-type(6n) {
grid-column: 6;
}
}
li {
/*
flex-basis: var(--base-width);
flex-grow: 0;
display: flex;
align-items: center;
*/
background-color: white;
overflow: hidden;
border: 2px solid hsl(0, 0%, 90%);
box-shadow: -1px 1px 10px hsla(0, 0%, 0%, 0.20);
margin: 0;
text-align: center;
border-radius: 1em;
a {
width: 100%;
color: hsl(0, 0%, 10%);
text-decoration: none;
font-size: 0.9em;
img {
background-color: #1a237e;
width: 100%;
}
img,
.name {
width: 100%;
}
.name {
display: block;
padding: 1rem 0;
font-weight: bold;
text-align: center;
span {
display: inline-block;
padding: 0 1em;
text-align: left;
}
}
}
}
}
#supportButtonContainer,
#projectStatus
......@@ -1749,73 +1959,6 @@ article#funding {
animation: progress-bar-stripes 1s linear infinite;
}
}
.donorsList {
list-style-type: none;
margin: 0 auto;
padding: 0;
max-width: 500px;
text-align: center;
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: center;
}
.donorsList > li {
padding: 0.10rem 0.5rem;
flex-shrink: 1;
box-sizing: border-box;
}
.donorsList > li span {
border-radius: 1em;
padding: 0 0.25em;
color: white;
}
.donorsList > li:nth-child(5n) span{
background: hsl(194, 100%, 70%);
color: black;
}
.donorsList > li:nth-child(5n+1) span{
background: hsl(185, 62%, 53%);
}
.donorsList > li:nth-child(5n+2) span{
background: hsl(210, 100%, 25%);
}
.donorsList > li:nth-child(5n+3) span{
background: hsl(194, 100%, 80%);
color: hsl(233, 88%, 9%);
}
.donorsList > li:nth-child(5n+4) span{
background: hsl(194, 100%, 60%);
color: hsl(233, 88%, 9%);
}
.donorsList > :nth-child(1) {
width: 100%;
}
.donorsList > :nth-child(2),
.donorsList > :nth-child(3) {
width: 50%;
}
}
......@@ -1984,4 +2127,4 @@ article#funding {
font-weight: bold;
font-size: 1.25rem;
}
}
\ No newline at end of file
}
......@@ -4,6 +4,8 @@ $pageTitle = _("Encouragez-nous !");
$pageDescription = _("");
include('cesiumDownloads.php');
require_once('vendor/crowdfunding/Crowdfunding.class.php');
include('head.php');
......@@ -11,32 +13,80 @@ include('head.php');
<article id="funding">
<h1><?php echo _("On a besoin de vous !"); ?></h1>
<?php
if (!empty($subpage)) {
echo '
<p>
'. _('Votre téléchargement de Cesium doit être en cours.') . '
'. sprintf(_('Sinon, <a href="%s">cliquez ici</a>.'), $cesiumDownloads[substr($subpage, 1)]['url']) .'
</p>';
}
?>
<section class="text-box">
<?php
if (!empty($subpage)) {
echo '
<p>
'. _('Votre téléchargement de Cesium doit être en cours.') . '
</p>
<h1><?php echo _("Merci aux donateurs !"); ?></h1>
<p>Les développeurs remercient chaleureusement toutes les personnes qui, le mois dernier, ont financé en Ğ1 le projet Duniter&nbsp;:</p>
<?php
$today = new DateTime();
$lastMonthSameDay = (clone $today)->sub(new DateInterval('P1M'));
$lastMonthStart = new DateTime($lastMonthSameDay->format('Y-m-') . '01');
$lastMonthEnd = new DateTime((clone $lastMonthSameDay)->format('Y-m-t'));
$lastMonthCF = new Crowdfunding(FUNDING_PUBKEY, 'relative', $lastMonthStart->format('Y-m-d'), $lastMonthEnd->format('Y-m-d'));
<p>
'. sprintf(_('Si ce n\'est pas le cas, <a href="%s">cliquez ici</a>.'), $cesiumDownloads[substr($subpage, 1)]['url']) .'
</p>
$donors = $lastMonthCF->getDonors();
if (empty($donors)) {
echo _('Pas encore de donateurs');
} else {
<p>
'. _('On profite de ce moment d\'attente pour vous adresser ce petit appel à l\'action&nbsp;:') .'
</p>
echo '<ul class="donorsList">';
foreach ($donors as $donor) {
<h2>
'. _('On a besoin de vous&nbsp;!') . '
</h2>
';
$donorProfile = $lastMonthCF->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 src="'. DEFAULT_AVATAR .'" />';
}
echo '
<span class="name">
<span>
'. $donorProfile->getName() .'
</span>
</span>
</a>
</li>';
}
?>
echo '</ul>';
}
?>
<section class="text-box">
<p>
L'adoption de la Ğ1 est lente.
</p>
......@@ -150,21 +200,13 @@ include('head.php');
</p>
<?php
include('inc/Crowdfunding.class.php');
$startDate = date('Y-m-d', (time() - (30*24*3600)));
$cfDuniter = new Crowdfunding(FUNDING_PUBKEY, 'relative', $startDate);
/*
$donationsList = $cfDuniter->getDonationsList();
$min = $cfDuniter->getMinDonation();
$max = $cfDuniter->getMaxDonation();
*/
$totalCollected = round($cfDuniter->getAmountCollected());
$currentCF = new Crowdfunding(FUNDING_PUBKEY, 'relative');
$totalCollected = round($currentCF->getAmountCollected());
$portionReached = round($totalCollected / FUNDING_TARGET * 100);
$totalDonorsNb = $cfDuniter->getDonorsNb();
$totalDonorsNb = $currentCF->getDonorsNb();
echo '
<aside class="crowdfunding-widget">
......@@ -302,4 +344,4 @@ function support() {
document.querySelector("#copyButton").addEventListener("click", copy);
document.querySelector("#supportButton").addEventListener("click", support);
</script>
\ No newline at end of file
</script>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment