diff options
author | RaindropsSys <contact@minteck.org> | 2023-03-12 19:16:53 +0100 |
---|---|---|
committer | RaindropsSys <contact@minteck.org> | 2023-03-12 19:16:53 +0100 |
commit | eb89b15c0f044673c1206a418a21d0baba1a675e (patch) | |
tree | 39ac31a576d8b8392cbd9baf8d67621bf2cefa86 /includes/mobilenav.inc | |
parent | 5385f0ed8fbb4325203a222a75e6700ffb519349 (diff) | |
download | pluralconnect-eb89b15c0f044673c1206a418a21d0baba1a675e.tar.gz pluralconnect-eb89b15c0f044673c1206a418a21d0baba1a675e.tar.bz2 pluralconnect-eb89b15c0f044673c1206a418a21d0baba1a675e.zip |
Updated 104 files, added 3 files, deleted 4 files and renamed 36 files (automated)
Diffstat (limited to 'includes/mobilenav.inc')
-rw-r--r-- | includes/mobilenav.inc | 88 |
1 files changed, 0 insertions, 88 deletions
diff --git a/includes/mobilenav.inc b/includes/mobilenav.inc deleted file mode 100644 index ed778ec..0000000 --- a/includes/mobilenav.inc +++ /dev/null @@ -1,88 +0,0 @@ -<?php global $navigation; global $isLoggedIn; ?> -<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; - }))) + 1 ?>, 1fr); height: 100%;"> - <a title="Cold Haze" data-bs-toggle="tooltip" href="/" id="mobile-navigation-item--logo" class="tooltip-nohelp mobile-navigation-item"> - <img src="/assets/logo/newlogo.png" alt="" style="width:24px;vertical-align: middle;"> - </a> - <?php foreach ($navigation as $id => $item): if (!$item["admin"] || $isLoggedIn): ?> - <a onclick="toggleMobileNavigation('<?= $id ?>');" title="<?= $item["name"] ?>" data-bs-toggle="tooltip" id="mobile-navigation-item-<?= $id ?>" class="tooltip-nohelp mobile-navigation-item"> - <img src="<?= $item["icon"] ?>" <?php if ($item["invert"]): ?>class="dropdown-icon"<?php endif; ?> alt="" style="width:24px;vertical-align: middle;"> - </a> - <?php endif; endforeach; ?> - </div> -</div> - -<div id="mobile-navigation-box-container" style="display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 48px; background-color: rgba(0, 0, 0, .75); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); z-index: 99999; overflow: auto;"> - <?php foreach ($navigation as $id => $item): if (!$item["admin"] || $isLoggedIn): ?> - <div id="mobile-navigation-box-<?= $id ?>" style="display: none; margin-top: 10px; margin-bottom: 10px;" class="mobile-navigation-box container"> - <div class="pane-group-title"> - <img src="<?= $item["icon"] ?>" <?php if ($item["invert"]): ?>class="dropdown-icon"<?php endif; ?> alt="" style="width:24px;vertical-align: middle;"> - <span style="vertical-align: middle;"><?= $item["name"] ?></span> - </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;"' : "" ?>> - <?php if (isset($category["name"])): ?> - <div class="pane-group-category-title"><?= $category["name"] ?></div> - <?php endif; ?> - <?php foreach ($category["items"] as $link): ?> - <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; ?> - </div> - <?php endforeach; ?> - </div> - <?php endif; endforeach; ?> -</div> - -<style> - .mobile-navigation-item { - display: flex; - cursor: pointer; - align-items: center; - justify-content: center; - } - - .mobile-navigation-item:hover { - background: rgba(255, 255, 255, .1); - } - - .mobile-navigation-item:active, .mobile-navigation-item:focus, .mobile-navigation-item.open { - background: rgba(255, 255, 255, .25); - } -</style> - -<script> - function closeMobileNavigation() { - document.getElementById("mobile-navigation-box-container").style.display = "none"; - document.body.style.overflow = ""; - - Array.from(document.getElementsByClassName("mobile-navigation-item")).forEach((i) => { - i.classList.remove("open"); - }); - - Array.from(document.getElementsByClassName("mobile-navigation-box")).forEach((i) => { - i.style.display = "none"; - }); - } - - function openMobileNavigation(id) { - document.getElementById("mobile-navigation-item-" + id).classList.add("open"); - document.body.style.overflow = "hidden"; - document.getElementById("mobile-navigation-box-container").style.display = "block"; - document.getElementById("mobile-navigation-box-" + id).style.display = "block"; - } - - function toggleMobileNavigation(id) { - if (document.getElementById("mobile-navigation-box-" + id).style.display !== "block") { - closeMobileNavigation(); - openMobileNavigation(id); - } else { - closeMobileNavigation(); - } - } -</script>
\ No newline at end of file |