summaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
authorRaindropsSys <raindrops@equestria.dev>2023-10-08 10:32:18 +0200
committerRaindropsSys <raindrops@equestria.dev>2023-10-08 10:32:18 +0200
commit4b76f46ac0d509bd0100cb593442e4d5d5601b29 (patch)
treed9b3de625133790be95e6519673c1d92a7b6450d /pages
parentd8f3e12df86424d456c7de2f090fcb60e3b69854 (diff)
downloadpluralconnect-4b76f46ac0d509bd0100cb593442e4d5d5601b29.tar.gz
pluralconnect-4b76f46ac0d509bd0100cb593442e4d5d5601b29.tar.bz2
pluralconnect-4b76f46ac0d509bd0100cb593442e4d5d5601b29.zip
Updated 2 files and added .idea/sshConfigs.xml (automated)
Diffstat (limited to 'pages')
-rw-r--r--pages/money.inc20
1 files changed, 20 insertions, 0 deletions
diff --git a/pages/money.inc b/pages/money.inc
index d0ec635..3791d8e 100644
--- a/pages/money.inc
+++ b/pages/money.inc
@@ -401,6 +401,26 @@ function getMonthlyEarnings(): array {
</div>
<p style="text-align: center; margin-top: 5px;" class="<?= $allAccounts > $minimumCloudburst ? "" : "bold text-danger" ?>">£<?= number_format($difference, 2, '.', ',') ?><?php if ($allAccounts > $minimumCloudburst): ?> (<?= round($part2 * 100, 2) ?>%)<?php endif; ?> <?= $allAccounts > $minimumCloudburst ? "over" : "under" ?> the minimum</p>
+ <?php if (isset($projects["cloudburst"]) && $projects["cloudburst"]["enable"]): ?>
+ <div class="grid" style="margin-bottom: 10px; display: grid; grid-template-columns: 25% 1fr; grid-gap: 20px;">
+ <div style="width: 100%; display: flex; align-items: center; justify-content: center;">
+ <img src="<?= $projects["cloudburst"]["image"] ?>" style="width: 100%;">
+ </div>
+ <div style="display: flex; align-items: center;">
+ <div style="width: 100%;">
+ <h2><?= strip_tags($projects["cloudburst"]["name"]) ?></h2>
+ <div class="progress" style="margin-top: 20px; margin-bottom: 20px; width: 100%; background-color: #222;">
+ <div class="progress-bar bg-success" style="width: <?= ($allAccounts - $minimumRaindrops >= 0) ? (($allAccounts - $minimumRaindrops) / $projects["raindrops"]["cost"]) * 100 : 0 ?>%"></div>
+ </div>
+ <?php $missing = $projects["cloudburst"]["cost"] - ($allAccounts - $minimumCloudburst); if ($missing > 0): $months = ceil($missing / getMonthlyEarnings()["cloudburst"]); ?>
+ <div>Costs £<?= number_format($projects["cloudburst"]["cost"], 2, '.', ',') ?> · Missing £<?= number_format($missing, 2, '.', ',') ?> · Can afford it in <?= date('F Y', time() + ($months * 2678400)) ?> (in <?= $months ?> month<?= $months > 1 ? "s" : "" ?>)</div>
+ <?php elseif ($missing === 0): ?><div>You can afford it now, this will take you to the minimum.</div>
+ <?php else: ?><div>You can afford it now, this will take you £<?= -$missing ?> above the minimum.</div><?php endif; ?>
+ </div>
+ </div>
+ </div>
+ <?php endif; ?>
+
<canvas id="history-cloudburst" style="margin-top: 10px; width: 100%; height: 200px; max-height: 100%;"></canvas>
<?php