Browse code

Initial commit

Benjamin Roth authored on16/03/2023 20:22:35
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,38 @@
1
+<ul class="<?php if ($this->level == "level_1"): ?>accordion-nav<?php endif; ?> <?= $this->level ?>">
2
+    <?php foreach ($this->items as $item) : ?>
3
+        <?php if ($item['isActive']) : ?>
4
+            <li class="<?= $item['class'] ?>">
5
+                <div>
6
+                    <a href="<?= $item['href'] ?: './' ?>"
7
+                       class="<?= $item['class'] ?>" <?php if (!empty($item['subitems'])) : ?> aria-haspopup="true" <?php endif; ?>>
8
+                        <span><?= $item['link'] ?></span>
9
+                    </a>
10
+                    <?php if ($this->level == "level_1" && $item['subitems']): ?>
11
+                        <div class="nav-toggler">
12
+                            <i class="is-open fas fa-chevron-circle-up"></i>
13
+                            <i class="is-closed fal fa-chevron-circle-down"></i>
14
+                        </div>
15
+                    <?php endif; ?>
16
+                </div>
17
+                <?= $item['subitems'] ?? '' ?>
18
+            </li>
19
+        <?php else : ?>
20
+            <li<?php if ($item['class']) : ?> class="<?= $item['class'] ?>" <?php endif; ?>>
21
+                <div>
22
+                    <a href="<?= $item['href'] ?: './' ?>"
23
+                       title="<?= $item['pageTitle'] ?: $item['title'] ?>" <?php if ($item['class']) : ?> class="<?= $item['class'] ?>" <?php endif; ?><?php if ('' !== $item['accesskey']) : ?> accesskey="<?= $item['accesskey'] ?>" <?php endif; ?><?php if ($item['tabindex']) : ?> tabindex="<?= $item['tabindex'] ?>" <?php endif; ?><?= $item['target'] ?><?= $item['rel'] ?><?php if (!empty($item['subitems'])) : ?> aria-haspopup="true" <?php endif; ?>>
24
+                        <span><?= $item['link'] ?></span>
25
+                    </a>
26
+                    <?php if ($this->level == "level_1" && $item['subitems']): ?>
27
+                        <div class="nav-toggler">
28
+                            <i class="is-open fas fa-chevron-circle-up"></i>
29
+                            <i class="is-closed fal fa-chevron-circle-down"></i>
30
+                        </div>
31
+                    <?php endif; ?>
32
+                </div>
33
+
34
+                <?= $item['subitems'] ?? '' ?>
35
+            </li>
36
+        <?php endif; ?>
37
+    <?php endforeach; ?>
38
+</ul>
0 39
\ No newline at end of file