diff options
Diffstat (limited to 'includes/pane.inc')
-rw-r--r-- | includes/pane.inc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/includes/pane.inc b/includes/pane.inc index e95747e..0a546a5 100644 --- a/includes/pane.inc +++ b/includes/pane.inc @@ -1,4 +1,4 @@ -<?php global $isLoggedIn; global $isUserLoggedIn; global $pages; global $navigation; $byColor = getMembersByColor($_SERVER['HTTP_HOST'] === "fr.equestria.horse"); global $lang; global $pages; ?> +<?php global $isLoggedIn; global $isLowerLoggedIn; global $pages; global $navigation; $byColor = getMembersByColor($_SERVER['HTTP_HOST'] === "fr.equestria.horse"); global $lang; global $pages; ?> <?php if ($_SERVER['HTTP_HOST'] === "fr.equestria.horse"): ?> <div id="pane-header-background" style="background-image: linear-gradient(90deg, <?php @@ -43,11 +43,11 @@ foreach ($list as $color) { </a> </div> -<?php if ($isLoggedIn || $isUserLoggedIn): ?> +<?php if ($isLoggedIn || $isLowerLoggedIn): ?> <a onclick="toggleGlobalSearch();" id="login-link" class="login-link-clickable"> <?= $lang["navigation"]["search"] ?> </a> -<?php elseif (!$isLoggedIn && !$isUserLoggedIn): ?> +<?php else: ?> <a href="/-/login" id="login-link" class="login-link-clickable"> <?php global $_PROFILE; ?> <img alt="" src="/assets/icons/login.svg" style="filter:invert(1);width:24px;vertical-align: middle;"> @@ -56,7 +56,7 @@ foreach ($list as $color) { <?php endif; ?> <?php endif; ?> -<?php foreach ($navigation as $id => $item): if (!$item["admin"] || $isLoggedIn): ?> +<?php foreach ($navigation as $id => $item): if (!$item["admin"] || $isLoggedIn || $isLowerLoggedIn): ?> <div class="pane-group" id="pane-group-<?= $id ?>"> <div class="pane-group-title"> @@ -64,19 +64,19 @@ foreach ($list as $color) { <span style="vertical-align: middle;"><?= $item["name"] ?></span> </div> - <?php foreach ($item["items"] as $category): ?> + <?php foreach ($item["items"] as $category): if (!($category["minimal"] && $isLowerLoggedIn)): ?> <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;"' : "" ?>> <?php if (isset($category["name"])): ?> <div class="pane-group-category-title"><?= $category["name"] ?></div> <?php endif; ?> - <?php foreach ($category["items"] as $link): if (isset($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 endif; endforeach; ?> + <?php endif; endif; endforeach; ?> </div> - <?php endforeach; ?> + <?php endif; endforeach; ?> </div> <?php endif; endforeach; ?> |