diff options
Diffstat (limited to 'pages/money.inc')
-rw-r--r-- | pages/money.inc | 20 |
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 |