xref: /webtrees/resources/views/components/breadcrumbs.phtml (revision 10e0649788c8d7d4974d81c048ca2b225df8f22e)
1<?php
2
3declare(strict_types=1);
4
5/**
6 * @var array<string|int,string> $links
7 */
8
9?>
10<nav class="wt-breadcrumbs" aria-label="breadcrumb" role="navigation">
11    <ol class="breadcrumb small py-2">
12        <?php foreach ($links as $url => $label) : ?>
13            <?php if (is_int($url)) : ?>
14                <li class="breadcrumb-item active">
15                    <?= $label ?>
16                </li>
17            <?php else : ?>
18                <li class="breadcrumb-item">
19                    <a href="<?= e($url) ?>">
20                        <?= $label ?>
21                    </a>
22                </li>
23            <?php endif ?>
24        <?php endforeach ?>
25    </ol>
26</nav>
27