+<style>
+ #optionsopen {
+ transition: left 0.3s;
+ }
+ #optionsclose {
+ transition: left 0.3s;
+ }
+ .w3-sidebar {
+ top: 50px;
+ color: white;
+ transition: left 0.3s;
+ }
+ .container-fluid {
+ transition: padding-left 0.3s;
+ }
+ .list-group-item-action {
+ color: #e0e0e0;
+ }
+</style>
+<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
+<nav id="sidebarlol" style="left: 0" class="w3-sidebar navbar-expand-sm bg-dark padding-top me-5 ma-5">
+<div class="sidebarlol list-group">
+ <div class="badge badge-secondary rounded-pill">Main Menu</div>
+ <?php
+$active_page = NULL;
+
+function show_page_item($name, $page, $nestlevel)
+{
+ $icon = $style = "";
+ $class = "nav-link nav-item";
+ if (is_string($active_page) && $page == $active_page)
+ $class .= " active";
+
+ if ($nestlevel > 0)
+ {
+ echo "<small>";
+ $name = " ".$name;
+ $style = "padding-bottom: 1px; padding-top: 1px";
+ } else {
+ echo "<b>";
+ }
+ if (is_array($page))
+ {
+ $style = "padding-bottom: 0px;";
+ } else {
+ echo "<a href=\"".BASE_URL.$page."\" style=\"text-decoration: none\">\n";
+ }
+ echo "<div class=\"d-flex justify-content-between align-items-center $class list-group-item-action\" style=\"$style\">$name
+ <div class=\"text-right padding-top\">
+ <i class=\"fa fa-$icon\"></i>
+ </div></div>\n";
+ if (!is_array($page))
+ echo "</a>";
+ if ($nestlevel > 0)
+ echo "</small>";
+ else
+ echo "</b>";
+ if (is_array($page))
+ {
+ foreach ($page as $subname=>$subpage)
+ show_page_item($subname, $subpage, 1);
+ }
+}
+foreach($pages as $name=>$page)
+ show_page_item($name, $page, 0);
+?>
+</div>
+</nav>