diff options
author | RaindropsSys <raindrops@equestria.dev> | 2024-03-30 23:40:33 +0100 |
---|---|---|
committer | RaindropsSys <raindrops@equestria.dev> | 2024-03-30 23:40:33 +0100 |
commit | 6b796258d413f00e498ce7f80f73a9f6c061f29c (patch) | |
tree | 49e64a5dd4cde2acff7f0a93ed3f8e20e1cb2dc8 /includes/components/sysbanner.inc | |
parent | 5860551daa0f60103ad24e93da29f401a653f144 (diff) | |
download | pluralconnect-6b796258d413f00e498ce7f80f73a9f6c061f29c.tar.gz pluralconnect-6b796258d413f00e498ce7f80f73a9f6c061f29c.tar.bz2 pluralconnect-6b796258d413f00e498ce7f80f73a9f6c061f29c.zip |
Updated 5 files, added 2 files, deleted 495 files and renamed 7 files (automated)
Diffstat (limited to 'includes/components/sysbanner.inc')
-rw-r--r-- | includes/components/sysbanner.inc | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/includes/components/sysbanner.inc b/includes/components/sysbanner.inc deleted file mode 100644 index c6f9579..0000000 --- a/includes/components/sysbanner.inc +++ /dev/null @@ -1,65 +0,0 @@ -<?php - -global $memberData; -global $memberCommonName; -global $memberID; -global $systemCommonName; -global $systemID; -global $system; -global $lang; global $pages; global $app; - -$travelling = []; -$pages = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/pages.json"), true); - -?> - -<div id="system-info" class="system-info-system" style="background-color:rgba(255, 255, 255, .05);margin-left: -20px; margin-right: -20px;margin-top:-20px;padding: 0 20px 10px; <?php if ($systemID === $app["other"]["id"]): ?>padding-top: 15px;<?php endif; ?>"> - <div style="padding:10px 10px 10px 20px;text-align:center;"> - <div> - <img src="<?= getAsset($systemID) ?>" alt="" style="margin-right: auto; margin-left: auto; display: block; width:128px;max-height:128px;border-radius:10px;"> - <h3 style="height:max-content;"><?= $systemCommonName ?></h3> - <div style="height:max-content;" id="member-card"> - <span> - <?= count(scoreOrder(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$systemID/members.json"), true), $systemID)) ?> members<?php - - ?><br><?php $leaders = array_filter(scoreOrderGlobal(), function ($i) use ($systemID) { - return $i["_system"] === $systemID && isset($i["_metadata"]["leader2"]) && $i["_metadata"]["leader2"]; - }); if (count($leaders) > 0): ?><span style="vertical-align: middle; height: 24px;">Leader<?= count($leaders) > 1 ? "s" : "" ?>: </span><?php foreach ($leaders as $index => $leader): ?><a href="/<?= $leader["name"] ?>" class="member-link"><img src="<?= getAsset($leader["_system"], $leader["id"], "heads") ?>"><span style="vertical-align: middle;"> <?= $leader["display_name"] ?? $leader["name"] ?></span></a><?= $index <= count($leaders) - 1 ? ", " : "" ?><?php endforeach; ?><?php endif; ?> - </span> - </div> - </div> - </div> -</div> - -<div id="system-actions" style="padding:5px 30px;background-color:rgba(255, 255, 255, .025);margin-left: -20px; margin-right: -20px;"> - <div id="timeline"></div> - <script> - async function refreshTimeline() { - document.getElementById("timeline").innerHTML = await (await fetch("/api/timeline?<?= $systemID ?>")).text(); - - Array.from(document.getElementsByClassName("dynamic-time")).forEach((el) => { - let time = el.getAttribute("data-time"); - el.innerText = new Date(parseInt(time) * 1000).toTimeString().split(":").splice(0, 2).join(":"); - }); - - Array.from(document.getElementsByClassName("dynamic-time-mobile")).forEach((el) => { - let time = el.getAttribute("data-time"); - el.innerText = new Date(parseInt(time) * 1000).toTimeString().split(":")[0] + ":"; - }); - } - - setInterval(refreshTimeline, 10000); - refreshTimeline(); - </script> - <?php global $use2023UI; ?> - <div style="display:grid;grid-template-columns: repeat(2, 1fr);"> - <div style="display: flex; align-items: center; justify-content: center; text-align: center;"> - Last switch <span data-bs-toggle="tooltip" title="<?= date("D j M Y, G:i:s (e)", strtotime(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$systemID/fronters.json"), true)["timestamp"])) ?>"><?= timeAgo(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$systemID/fronters.json"), true)["timestamp"]) ?></span> - </div> - <a title="<?= $pages["s:history"]["name"][$lang["_name"]] ?>" data-bs-toggle="tooltip" style="display:inline-block;padding:5px 10px;text-align: center" class="system-action tooltip-nohelp" href="/<?= $system ?>/-/history"> - <img src="<?= $use2023UI ? icon("history") : "/assets/icons/history.svg" ?>" style="vertical-align: middle;height: 24px;width: 24px;" alt=""> - <span style="vertical-align: middle;" class="list-separator-desktop"><?= $pages["s:history"]["name"][$lang["_name"]] ?></span> - </a> - <div></div> - </div> -</div> |