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/navigation.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/navigation.inc')
-rw-r--r-- | includes/navigation.inc | 432 |
1 files changed, 0 insertions, 432 deletions
diff --git a/includes/navigation.inc b/includes/navigation.inc deleted file mode 100644 index 976cfff..0000000 --- a/includes/navigation.inc +++ /dev/null @@ -1,432 +0,0 @@ -<?php - -$pages = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/pages.json"), true); - -global $navigation; -global $toplevel; -global $lang; global $pages; global $app; - -$navigation_admin = [ - "admin" => true, - "name" => "Private utilities", - "icon" => "/assets/icons/admin.svg", - "invert" => true, - "items" => [ - "alerts" => [ - "name" => null, - "minimal" => true, - "items" => [ - [ - "name" => $pages["emergency"]["name"][$lang["_name"]], - "icon" => "/assets/icons/emergency.svg", - "invert" => false, - "link" => "/-/emergency", - "stepped" => "rgb(220,53,69)", - "private" => false - ], - [ - "name" => $pages["wakeup"]["name"][$lang["_name"]], - "icon" => "/assets/icons/wakeup.svg", - "invert" => false, - "link" => "/-/wakeup", - "stepped" => "rgb(13,202,240)", - "private" => false - ] - ] - ], - "apps" => [ - "name" => $lang["navigation"]["apps"], - "minimal" => false, - "items" => [ - [ - "name" => $pages["about"]["name"][$lang["_name"]], - "icon" => "/assets/icons/about.svg", - "invert" => true, - "link" => "/-/about", - "stepped" => null, - "private" => false - ], - [ - "name" => $pages["fronting"]["name"][$lang["_name"]], - "icon" => "/assets/icons/fronting.svg", - "invert" => true, - "link" => "/-/fronting", - "stepped" => null, - "private" => false - ], - [ - "name" => $pages["profiles"]["name"][$lang["_name"]], - "icon" => "/assets/icons/profiles.svg", - "invert" => true, - "link" => "/-/profiles", - "stepped" => null, - "private" => false - ], - [ - "name" => $pages["money"]["name"][$lang["_name"]], - "icon" => "/assets/icons/money.svg", - "invert" => true, - "link" => "/-/money", - "stepped" => null, - "private" => true - ], - [ - "name" => $pages["rules"]["name"][$lang["_name"]], - "icon" => "/assets/icons/rules.svg", - "invert" => true, - "link" => "/-/rules", - "stepped" => null, - "private" => true - ], - [ - "name" => $pages["docs"]["name"][$lang["_name"]], - "icon" => "/assets/icons/docs.svg", - "invert" => true, - "link" => "/-/docs", - "stepped" => null, - "private" => true - ], - [ - "name" => $pages["computers"]["name"][$lang["_name"]], - "icon" => "/assets/icons/computers.svg", - "invert" => true, - "link" => "/-/computers", - "stepped" => null, - "private" => true - ], - [ - "name" => $pages["travelling"]["name"][$lang["_name"]], - "icon" => "/assets/icons/travelling.svg", - "invert" => true, - "link" => "/-/travelling", - "stepped" => null, - "private" => false - ], - [ - "name" => $pages["stats"]["name"][$lang["_name"]], - "icon" => "/assets/icons/stats.svg", - "invert" => true, - "link" => "/-/stats", - "stepped" => null, - "private" => true - ], - [ - "name" => $pages["logout"]["name"][$lang["_name"]], - "icon" => "/assets/icons/logout.svg", - "invert" => true, - "link" => "/-/logout", - "stepped" => null, - "private" => false - ] - ] - ], - "sort" => [ - "name" => "Sorted members lists", - "minimal" => false, - "items" => [ - [ - "name" => $pages["splitting"]["name"][$lang["_name"]], - "icon" => "/assets/icons/splitting.svg", - "invert" => true, - "link" => "/-/splitting", - "stepped" => null, - "private" => false - ], - [ - "name" => $pages["byfront"]["name"][$lang["_name"]], - "icon" => "/assets/icons/byfront.svg", - "invert" => true, - "link" => "/-/byfront", - "stepped" => null, - "private" => false - ], - [ - "name" => $pages["alphabet"]["name"][$lang["_name"]], - "icon" => "/assets/icons/alphabet.svg", - "invert" => true, - "link" => "/-/alphabet", - "stepped" => null, - "private" => false - ], - [ - "name" => $pages["s:species"]["name"][$lang["_name"]], - "icon" => "/assets/icons/species.svg", - "invert" => true, - "link" => "/-/byspecies", - "stepped" => null, - "private" => false - ], - ] - ], - /*"debug" => [ - "name" => $lang["navigation"]["debug"], - "minimal" => false, - "items" => [ - [ - "name" => $pages["debug"]["name"][$lang["_name"]], - "icon" => "/assets/icons/debug.svg", - "invert" => true, - "link" => "/-/debug", - "stepped" => null - ], - [ - "name" => $pages["bitset"]["name"][$lang["_name"]], - "icon" => "/assets/icons/bitset.svg", - "invert" => true, - "link" => "/-/bitset", - "stepped" => null - ], - [ - "name" => $pages["score"]["name"][$lang["_name"]], - "icon" => "/assets/icons/score.svg", - "invert" => true, - "link" => "/-/score", - "stepped" => null - ], - [ - "name" => $pages["logout"]["name"][$lang["_name"]], - "icon" => "/assets/icons/logout.svg", - "invert" => true, - "link" => "/-/logout", - "stepped" => null - ] - ] - ]*/ - ] -]; -$navigation_global = [ - "admin" => false, - "name" => $lang["navigation"]["general"], - "icon" => "/assets/icons/global.svg", - "invert" => true, - "items" => [ - "main" => [ - "name" => null, - "minimal" => false, - "items" => [ - [ - "name" => $pages["home"]["name"][$lang["_name"]], - "icon" => "/assets/icons/home.svg", - "invert" => true, - "link" => "/", - "stepped" => null, - "private" => false - ], - [ - "name" => $pages["relations"]["name"][$lang["_name"]], - "icon" => "/assets/icons/relations.svg", - "invert" => true, - "link" => "/-/relations", - "stepped" => null, - "private" => false - ], - [ - "name" => $pages["terminology"]["name"][$lang["_name"]], - "icon" => "/assets/icons/terminology.svg", - "invert" => true, - "link" => "/-/terminology", - "stepped" => null, - "private" => false - ] - ] - ] - ] -]; -$navigation_cloudburst = [ - "admin" => $_SERVER['HTTP_HOST'] === "fr.equestria.horse", - "name" => "Cloudburst System", - "icon" => getAsset("ynmuc"), - "invert" => false, - "items" => [ - "header" => [ - "name" => null, - "minimal" => false, - "items" => [ - [ - "name" => $lang["navigation"]["about"], - "icon" => "/assets/icons/about.svg", - "invert" => true, - "link" => "/cloudburst", - "stepped" => null, - "private" => false - ], - [ - "name" => $pages["s:history"]["name"][$lang["_name"]], - "icon" => "/assets/icons/history.svg", - "invert" => true, - "link" => "/cloudburst/-/history", - "stepped" => null, - "private" => false - ], - [ - "name" => $pages["s:compare"]["name"][$lang["_name"]], - "icon" => "/assets/icons/compare.svg", - "invert" => true, - "link" => "/cloudburst/-/compare", - "stepped" => null, - "private" => false - ] - ] - ], - "members" => [ - "name" => $lang["navigation"]["members"], - "minimal" => false, - "items" => array_map(function ($member) { - return [ - "name" => $member['display_name'] ?? $member['name'], - "icon" => getAsset($member["system"], $member["id"], "heads"), - "invert" => false, - "link" => "/$member[name]", - "stepped" => null, - "private" => false - ]; - }, array_filter(scoreOrder(withTravelers(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/ynmuc/members.json"), true), "ynmuc"), "ynmuc"), function ($member) { - return $member['name'] !== "unknown" && $member['name'] !== "fusion" && $member['name'] !== "new"; - })) - ] - ] -]; -$navigation_other = [ - "admin" => true, - "name" => $app["other"]["name"], - "icon" => getAsset($app["other"]["id"]), - "invert" => false, - "items" => [ - "header" => [ - "name" => null, - "minimal" => false, - "items" => [ - [ - "name" => $lang["navigation"]["about"], - "icon" => "/assets/icons/about.svg", - "invert" => true, - "link" => "/" . $app["other"]["slug"], - "stepped" => null, - "private" => false - ], - [ - "name" => $pages["s:history"]["name"][$lang["_name"]], - "icon" => "/assets/icons/history.svg", - "invert" => true, - "link" => "/" . $app["other"]["slug"] . "/-/history", - "stepped" => null, - "private" => false - ], - [ - "name" => $pages["s:compare"]["name"][$lang["_name"]], - "icon" => "/assets/icons/compare.svg", - "invert" => true, - "link" => "/" . $app["other"]["slug"] . "/-/compare", - "stepped" => null, - "private" => false - ] - ] - ], - "members" => [ - "name" => $lang["navigation"]["members"], - "minimal" => false, - "items" => array_map(function ($member) { - return [ - "name" => $member['display_name'] ?? $member['name'], - "icon" => getAsset($member["system"], $member["id"], "heads"), - "invert" => false, - "link" => "/$member[name]", - "stepped" => null, - "private" => false - ]; - }, array_filter(scoreOrder(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/other/members.json"), true), $app["other"]["id"]), function ($member) { - return $member['name'] !== "unknown" && $member['name'] !== "fusion" && $member['name'] !== "new"; - })) - ] - ] -]; -$navigation_raindrops = [ - "admin" => false, - "name" => "Raindrops System", - "icon" => getAsset("gdapd"), - "invert" => false, - "items" => [ - "header" => [ - "name" => null, - "minimal" => false, - "items" => [ - [ - "name" => $lang["navigation"]["about"], - "icon" => "/assets/icons/about.svg", - "invert" => true, - "link" => "/raindrops", - "stepped" => null, - "private" => false - ], - [ - "name" => $pages["s:history"]["name"][$lang["_name"]], - "icon" => "/assets/icons/history.svg", - "invert" => true, - "link" => "/raindrops/-/history", - "stepped" => null, - "private" => false - ], - [ - "name" => $pages["s:compare"]["name"][$lang["_name"]], - "icon" => "/assets/icons/compare.svg", - "invert" => true, - "link" => "/raindrops/-/compare", - "stepped" => null, - "private" => false - ] - ] - ], - "members" => [ - "name" => $lang["navigation"]["members"], - "minimal" => false, - "items" => array_map(function ($member) { - return [ - "name" => $member['display_name'] ?? $member['name'], - "icon" => getAsset($member["system"], $member["id"], "heads"), - "invert" => false, - "link" => "/$member[name]", - "stepped" => null, - "private" => false - ]; - }, array_filter(scoreOrder(withTravelers(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/gdapd/members.json"), true), "gdapd"), "gdapd"), function ($member) { - return $member['name'] !== "unknown" && $member['name'] !== "fusion" && $member['name'] !== "new"; - })) - ] - ] -]; - -global $parts; - -if (isset($parts) && isset($parts[0]) && $parts[0] === $app["other"]["slug"]) { - $navigation = [ - "other" => $navigation_other, - "cloudburst" => $navigation_cloudburst, - "raindrops" => $navigation_raindrops, - "admin" => $navigation_admin, - "global" => $navigation_global - ]; -} elseif (isset($parts) && isset($parts[0]) && $parts[0] === "cloudburst") { - $navigation = [ - "cloudburst" => $navigation_cloudburst, - "raindrops" => $navigation_raindrops, - "other" => $navigation_other, - "admin" => $navigation_admin, - "global" => $navigation_global - ]; -} elseif (isset($parts) && isset($parts[0]) && $parts[0] === "raindrops") { - $navigation = [ - "raindrops" => $navigation_raindrops, - "cloudburst" => $navigation_cloudburst, - "other" => $navigation_other, - "admin" => $navigation_admin, - "global" => $navigation_global - ]; -} else { - $navigation = [ - "admin" => $navigation_admin, - "global" => $navigation_global, - "cloudburst" => $navigation_cloudburst, - "raindrops" => $navigation_raindrops, - "other" => $navigation_other, - ]; -}
\ No newline at end of file |