xref: /webtrees/resources/views/components/badge.phtml (revision 0db1e7d20bab9209012a4f3fdc1af3ef87a1a528)
1<?php
2
3declare(strict_types=1);
4
5use Fisharebest\Webtrees\I18N;
6
7/**
8 * @var string|null $context
9 * @var int         $count
10 * @var int|null    $total
11 */
12
13?>
14
15<span class="badge bg-<?= $context ?? 'secondary' ?>">
16        <?= I18N::number($count) ?>
17    <?php if (($total ?? $count) > $count) : ?>
18        / <?= I18N::number($total) ?>
19    <?php endif ?>
20</span>
21