]> git.bts.cx Git - garden.git/blobdiff - templates/base.php
Added template
[garden.git] / templates / base.php
index 95cd6253f6311f6591809313f3541b493062bb29..0a72302ba3ee5bbcedc9243e308c8f349dd783a0 100644 (file)
                        <p>Find me <a href="https://mastodon.gamedev.place/@btsherratt" rel="me">@btsherratt</a> or on <a href="https://bts.itch.io/">itch.io</a></p>
                </header>
 
+               <nav>
+                       <ul>
+                       <?php foreach($categorised_items as $category_name => $category_items): ?>
+                               <?php if ($category_name != ''): ?>
+                               <li>
+                                       <?= $category_name ?>
+                                       <ul>
+                                               <?php foreach($category_items as $category_item): ?>
+                                                       <li><a href="<?= $category_item->url ?>"><?= $category_item->title ?></a></li>
+                                               <?php endforeach; ?>
+                                       </ul>
+                               </li>
+                               <?php else: ?>
+                                       <?php foreach($category_items as $category_item): ?>
+                                               <li><a href="<?= $category_item->url ?>"><?= $category_item->title ?></a></li>
+                                       <?php endforeach; ?>
+                               <?php endif ?>
+                       <?php endforeach ?>
+                       </ul>
+               </nav>
+
                <?= garden_template_content(); ?>
 
                <footer>