aboutsummaryrefslogtreecommitdiff
path: root/templates/toc/_toc-item-list.php
blob: 82cad8532ff4b88ae298131d529b320051ab2ccc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<li class="chapter<?= $item->isActive() ? ' active' : '' ?>">
    <div>
        <? if (!$item->isActive()) : ?>
            <a class="navigate" href="<?= htmlReady($item->getURL()) ?>">
        <? endif ?>
            <? if ($item->getIcon()) : ?>
                <?= $item->getIcon()->copyWithRole(Icon::ROLE_INFO)->asSvg(24) ?>
            <? endif ?>
            <?= htmlReady($item->getTitle()) ?>
        <? if (!$item->isActive()) : ?>
            </a>
        <? endif ?>
    </div>
    <? if ($item->hasChildren()) : ?>
        <ul class="toc">
            <? foreach ($item->getChildren() as $child) : ?>
                <?= $this->render_partial('toc/_toc-item-list', ['item' => $child]) ?>
            <? endforeach ?>
        </ul>
    <? endif ?>
</li>