aboutsummaryrefslogtreecommitdiff
path: root/templates/skiplinks.php
blob: dcea66b08250b3d5543f892a1c9c9a4f4e2ce41c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?
# Lifter010: TODO
?>
<? if ($navigation instanceof Navigation && iterator_count($navigation) > 0) : ?>
    <ul role="navigation" id="skiplink_list">
    <? foreach ($navigation as $index => $nav) : ?>
        <li>
        <? if (mb_substr($url = $nav->getURL(), 0, 1) == '#') : ?>
            <button class="skiplink" role="link" onclick="STUDIP.SkipLinks.setActiveTarget('<?= htmlReady($url) ?>');"
                    data-in-fullscreen="<?= $fullscreen[$index] ?>">
                <?= htmlReady($nav->getTitle()) ?>
            </button>
        <? else : ?>
            <a href="<?= URLHelper::getLink($url, [], !is_internal_url($url)) ?>" data-in-fullscreen="<?= $fullscreen[$index] ?>">
                <?= htmlReady($nav->getTitle()) ?>
            </a>
        <? endif ?>
        </li>
    <? endforeach ?>
    </ul>
<? endif ?>