diff options
Diffstat (limited to 'includes/components/mobilenav.inc')
-rw-r--r-- | includes/components/mobilenav.inc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/includes/components/mobilenav.inc b/includes/components/mobilenav.inc index 646738c..f83597f 100644 --- a/includes/components/mobilenav.inc +++ b/includes/components/mobilenav.inc @@ -1,4 +1,4 @@ -<?php global $navigation; global $isLoggedIn; ?> +<?php global $navigation; global $isLoggedIn; global $isLowerLoggedIn; ?> <div id="mobile-navigation"> <div id="mobile-navigation-container" class="container" style="display: grid; grid-template-columns: repeat(<?= count(array_values(array_filter($navigation, function ($item) use ($isLoggedIn) { return !$item["admin"] || $isLoggedIn; @@ -23,16 +23,16 @@ </div> <?php foreach ($item["items"] as $category): ?> - <div class="pane-group-category <?= $category["minimal"] ? "pane-group-category-minimal" : "" ?>" <?= $category["minimal"] ? 'style="display: grid; grid-template-columns: repeat(' . count($category["items"]) . ', 1fr); grid-gap: 10px;"' : "" ?>> + <div class="pane-group-category <?= $category["minimal"] ? "pane-group-category-minimal" : "" ?>" <?= $category["minimal"] ? 'style="display: grid; grid-template-columns: repeat(' . ($isLowerLoggedIn ? 2 : 3) . ', 1fr); grid-gap: 10px;"' : "" ?>> <?php if (isset($category["name"])): ?> <div class="pane-group-category-title"><?= $category["name"] ?></div> <?php endif; ?> - <?php foreach ($category["items"] as $link): ?> + <?php foreach ($category["items"] as $link): if (isset($link)): if (!($isLowerLoggedIn && $link["private"])): ?> <a class="pane-group-item" href="<?= $link["link"] ?>"> <img src="<?= $link["icon"] ?>" <?php if ($link["invert"]): ?>class="dropdown-icon"<?php endif; ?> alt="" style="width:24px; border-radius: 5px; vertical-align: middle;"> <?php if (!$category["minimal"]): ?><span style="vertical-align: middle;<?= isset($link["stepped"]) ? "color: $link[stepped];" : "" ?>"><?= isset($link["stepped"]) ? "<b>$link[name]</b>" : $link["name"] ?></span><?php endif; ?> </a> - <?php endforeach; ?> + <?php endif; endif; endforeach; ?> </div> <?php endforeach; ?> </div> |