diff options
Diffstat (limited to 'includes/fragments')
-rw-r--r-- | includes/fragments/dashboard.inc | 37 | ||||
-rw-r--r-- | includes/fragments/member.inc | 35 | ||||
-rw-r--r-- | includes/fragments/system.inc | 4 |
3 files changed, 8 insertions, 68 deletions
diff --git a/includes/fragments/dashboard.inc b/includes/fragments/dashboard.inc index bb58df1..f25fba1 100644 --- a/includes/fragments/dashboard.inc +++ b/includes/fragments/dashboard.inc @@ -48,8 +48,8 @@ global $use2023UI; <h2> <span id="greeting">Hi</span> <span><?php - $fronters = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . ($_PROFILE["login"] === "raindrops" ? "gdapd" : ($_PROFILE["login"] === "cloudburst" ? "ynmuc" : ($_PROFILE["login"] === "Moonwind" ? "hrbom" : "other"))) . "/fronters.json"), true); - $name = ($_PROFILE["login"] === "raindrops" ? "Raindrops System" : ($_PROFILE["login"] === "cloudburst" ? "Cloudburst System" : ($_PROFILE["login"] === "Moonwind" ? "Moonglow" : $app["other"]["name"]))); + $fronters = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . ($_PROFILE["login"] === "raindrops" ? "gdapd" : ($_PROFILE["login"] === "Moonglow" ? "hrbom" : "other")) . "/fronters.json"), true); + $name = ($_PROFILE["login"] === "raindrops" ? "Raindrops System" : ($_PROFILE["login"] === "Moonglow" ? "Moonglow" : $app["other"]["name"])); if (isset($fronters["members"][0])) { $name = implode(" and ", array_map(function ($i) { @@ -62,7 +62,7 @@ global $use2023UI; ?>!</span> </h2> - <div id="schedules" style="margin-top: 20px; display: grid; grid-template-columns: repeat(4, 1fr); grid-gap: 20px;"> + <div id="schedules" style="margin-top: 20px; display: grid; grid-template-columns: repeat(3, 1fr); grid-gap: 20px;"> <div> <div id="live-time-other-outer" class="day-gradient" style="text-align: center; background-color: rgba(255, 255, 255, .1); padding: 20px 0; border-radius: 10px;"> <b><?= $app["other"]["name"] ?></b><br> @@ -73,15 +73,6 @@ global $use2023UI; </div> <div> - <div id="live-time-cloudburst-outer" class="day-gradient" style="text-align: center; background-color: rgba(255, 255, 255, .1); padding: 20px 0; border-radius: 10px;"> - <b>Cloudburst System</b><br> - <h3 id="live-time-cloudburst">--:--</h3> - </div> - - <hr style="display: none;" class="schedules-separator"> - </div> - - <div> <div id="live-time-raindrops-outer" class="day-gradient" style="text-align: center; background-color: rgba(255, 255, 255, .1); padding: 20px 0; border-radius: 10px;"> <b>Raindrops System</b><br> <h3 id="live-time-raindrops">--:--</h3> @@ -133,16 +124,6 @@ global $use2023UI; document.getElementById("live-time-moonwind").innerText = time4.replace("24:", "00:"); document.getElementById("live-time-moonwind-outer").style.backgroundPositionY = getDayPercentage(time4) + "%"; - let time2 = (new Intl.DateTimeFormat('en-US', { - timeZone: 'Europe/London', - hour: 'numeric', - minute: '2-digit', - hour12: false - })).format(new Date()); - - document.getElementById("live-time-cloudburst").innerText = time2.replace("24:", "00:"); - document.getElementById("live-time-cloudburst-outer").style.backgroundPositionY = getDayPercentage(time2) + "%"; - let time3 = (new Intl.DateTimeFormat('en-US', { timeZone: 'America/Chicago', hour: 'numeric', @@ -207,7 +188,7 @@ global $use2023UI; <div id="timeline"></div> <script> async function refreshTimeline() { - document.getElementById("timeline").innerHTML = await (await fetch("/api/timeline?gdapd&ynmuc<?= ($isLowerLoggedIn || $isLoggedIn) ? "&" . $app["other"]["id"] : "" ?>&hrbom")).text(); + document.getElementById("timeline").innerHTML = await (await fetch("/api/timeline?gdapd<?= ($isLowerLoggedIn || $isLoggedIn) ? "&" . $app["other"]["id"] : "" ?>&hrbom")).text(); Array.from(document.getElementsByClassName("dynamic-time")).forEach((el) => { let time = el.getAttribute("data-time"); @@ -228,9 +209,6 @@ global $use2023UI; <div style="display: grid; grid-template-columns: 1fr 2fr; grid-gap: 20px;" id="home-parts"> <div style="background-color: var(--palette-2) !important; margin-top: 20px; border-radius: 10px;"> <div class="list-group"> - <a href="/cloudburst" class="list-group-item list-group-item-action" style="display: flex; align-items: center;"> - <img src="/assets/avatars/ade46823206b4b0cad3ccaae934a5f3b.webp" style="margin-right: 5px; width: 24px;"><div style="vertical-align: middle; display: flex; align-items: center; color: var(--bs-body-color);">Cloudburst System</div> - </a> <a href="/raindrops" class="list-group-item list-group-item-action" style="display: flex; align-items: center;"> <img src="/assets/avatars/7d9f543ef74240f69d0786c3f2983124.webp" style="margin-right: 5px; width: 24px;"><div style="vertical-align: middle; display: flex; align-items: center; color: var(--bs-body-color);">Raindrops System</div> </a> @@ -246,8 +224,8 @@ global $use2023UI; <a href="/-/byfront" class="list-group-item list-group-item-action" style="display: grid; grid-template-columns: max-content 1fr;"> <img src="/assets/icons/new/front.svg?color=474747" style="margin-right: 5px; height: 24px; width: 24px;"><div style="display: flex; align-items: center; color: var(--bs-body-color);">By last fronted date</div> </a> - <a href="https://countdown.equestria.horse" target="_blank" class="list-group-item list-group-item-action" style="display: grid; grid-template-columns: max-content 1fr;"> - <img src="/assets/icons/new/schedule.svg?color=474747" style="margin-right: 5px; height: 24px; width: 24px;"><div style="display: flex; align-items: center; color: var(--bs-body-color);">Meet-up countdown</div> + <a href="/-/schedule" target="_blank" class="list-group-item list-group-item-action" style="display: grid; grid-template-columns: max-content 1fr;"> + <img src="/assets/icons/new/schedule.svg?color=474747" style="margin-right: 5px; height: 24px; width: 24px;"><div style="display: flex; align-items: center; color: var(--bs-body-color);">Raindrops schedule</div> </a> <a href="https://plex.equestria.horse" target="_blank" class="list-group-item list-group-item-action" style="display: grid; grid-template-columns: max-content 1fr;"> <img src="https://plex.equestria.horse/web/favicon.ico" style="margin-right: 5px; height: 24px; width: 24px;"><div style="display: flex; align-items: center; color: var(--bs-body-color);">Plex</div> @@ -255,9 +233,6 @@ global $use2023UI; <a href="https://live.equestria.dev" target="_blank" class="list-group-item list-group-item-action" style="display: grid; grid-template-columns: max-content 1fr;"> <img src="https://avatars.githubusercontent.com/u/8463692?s=128" style="margin-right: 5px; height: 24px; width: 24px;"><div style="display: flex; align-items: center; color: var(--bs-body-color);">Streaming server</div> </a> - <a href="https://mist.equestria.horse" target="_blank" class="list-group-item list-group-item-action" style="display: grid; grid-template-columns: max-content 1fr;"> - <img src="https://mist.equestria.horse/icons/normal_128x128.png" style="margin-right: 5px; height: 24px; width: 24px;"><div style="display: flex; align-items: center; color: var(--bs-body-color);">Mist</div> - </a> </div> </div> <div style="background-color: var(--palette-2) !important; text-align: center; margin-top: 20px; border-radius: 10px; display: flex; align-items: center; justify-content: center;"> diff --git a/includes/fragments/member.inc b/includes/fragments/member.inc index 8b153fa..0b1ce03 100644 --- a/includes/fragments/member.inc +++ b/includes/fragments/member.inc @@ -29,27 +29,8 @@ if ($memberData["name"] !== "unknown" && $memberData["name"] !== "fusion") { global $isLoggedIn; $frontersRaindrops = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/gdapd/fronters.json"), true); -$frontersCloudburst = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/ynmuc/fronters.json"), true); $frontersOther = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/other/fronters.json"), true); -$fusionRaindrops = false; - -if ($memberData["name"] === "fusion") { - if (in_array("fusion", array_map(function ($i) { - return $i["name"]; - }, $frontersRaindrops["members"]))) { - $fusionRaindrops = true; - - $memberData = array_values(array_filter($frontersRaindrops["members"], function ($i) { - return $i["name"] === "fusion"; - }))[0]; - $memberCommonName = $memberData['display_name'] ?? $memberData['name']; - $memberID = $memberData['id']; - $system = $systemID === "gdapd" ? "cloudburst" : "raindrops"; - $systemID = $system === "cloudburst" ? "ynmuc" : "gdapd"; - } -} - if (!file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/designs/" . $memberID . ".json")) file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/designs/" . $memberID . ".json", json_encode([ "_main" => [ "name" => "Main", @@ -113,22 +94,6 @@ if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/assets/ponies/" . $memberID . ".pn <span>In all cases, feel free to ask!</span> </div> <br> - <?php elseif ($memberData["name"] === "fusion"): ?> - <br> - <div class="alert alert-secondary" style="margin-bottom: 0 !important;"> - <p><?= $lang["member"]["fusion"][0] ?></p> - <p><?= $lang["member"]["fusion"][1] ?></p> - <p><?= $lang["member"]["fusion"][2] ?></p> - <div class="list-group"> - <?php $foundFusion = false; $fusionOn = false; foreach ($fusionRaindrops ? $frontersRaindrops['members'] : $frontersCloudburst['members'] as $fronter): if ($fronter["name"] !== "fusion"): if ($fusionOn): $foundFusion = true; $name = str_ends_with($fronter['name'], "-travelling") ? substr($fronter['name'], 0, strlen($fronter['name']) - 11) : $fronter['name'] ?> - <a class="list-group-item list-group-item-action text-black" href="/<?= $name ?>"><img src="<?= getAsset($system, $fronter["id"], "heads") ?>" style="filter:invert(1) hue-rotate(180deg);width:24px;"> <?= $fronter["display_name"] ?? $name ?></a> - <?php endif; else: $fusionOn = true; endif; endforeach; ?> - </div> - <?php if (!$foundFusion): ?> - <i><?= $lang["member"]["no_fusion"] ?></i> - <?php endif; ?> - </div> - <br> <?php else: ?><?php endif; ?> </div> </div> diff --git a/includes/fragments/system.inc b/includes/fragments/system.inc index bc1b0df..717efee 100644 --- a/includes/fragments/system.inc +++ b/includes/fragments/system.inc @@ -17,7 +17,7 @@ <?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/components/sysbanner.inc"; ?> <br> - <?php if ($system === "cloudburst") cloudburst(true); elseif ($system === "raindrops") raindrops(true); elseif ($system === "moonglow") moonglow(true); elseif ($isLoggedIn || $isLowerLoggedIn) other(true); ?> + <?php if ($system === "raindrops") raindrops(true); elseif ($system === "moonglow") moonglow(true); elseif ($isLoggedIn || $isLowerLoggedIn) other(true); ?> </div> </div> @@ -26,7 +26,7 @@ </div> <style> - #hpd-cloudburst, #hpd-raindrops, #hpd-cloudburst, #hpd-other { + #hpd-raindrops, #hpd-moonglow, #hpd-other { background: transparent !important; padding: 0 !important; margin-bottom: 0 !important; |