-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnav.php
More file actions
executable file
·28 lines (28 loc) · 682 Bytes
/
nav.php
File metadata and controls
executable file
·28 lines (28 loc) · 682 Bytes
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
27
28
<nav>
<ul>
<li>
<?php if ($site->is('home')): ?>
<a aria-current="page">
<?= i('Home'); ?>
</a>
<?php else: ?>
<a href="<?= eat($link->home); ?>">
<?= i('Home'); ?>
</a>
<?php endif; ?>
</li>
<?php foreach ($data[0] as $v): ?>
<li>
<?php if ($v->current): ?>
<a aria-current="page">
<?= $v->title; ?>
</a>
<?php else: ?>
<a href="<?= eat(first($v->links ?? []) ?? ($v->link . (q($v->children) ? '/1' : ""))); ?>">
<?= $v->title; ?>
</a>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
</nav>