summaryrefslogtreecommitdiff
path: root/resources/views/components/breadcrumbs.phtml
blob: f270b73434bca06a41adcffd49d91306240c5e74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php

declare(strict_types=1);

/**
 * @var array<string|int,string> $links
 */

?>
<nav class="wt-breadcrumbs" aria-label="breadcrumb" role="navigation">
    <ol class="breadcrumb small py-2">
        <?php foreach ($links as $url => $label) : ?>
            <?php if (is_int($url)) : ?>
                <li class="breadcrumb-item active">
                    <?= $label ?>
                </li>
            <?php else : ?>
                <li class="breadcrumb-item">
                    <a href="<?= e($url) ?>">
                        <?= $label ?>
                    </a>
                </li>
            <?php endif ?>
        <?php endforeach ?>
    </ol>
</nav>