diff options
author | Minteck <contact@minteck.org> | 2022-10-18 08:59:09 +0200 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-10-18 08:59:09 +0200 |
commit | 2c4ae43e688a9873e86211ea0e7aeb9ba770dd77 (patch) | |
tree | 17848d95522dab25d3cdeb9c4a6450e2a234861f /includes/sysbanner.inc | |
parent | 108525534c28013cfe1897c30e4565f9893f3766 (diff) | |
download | pluralconnect-2c4ae43e688a9873e86211ea0e7aeb9ba770dd77.tar.gz pluralconnect-2c4ae43e688a9873e86211ea0e7aeb9ba770dd77.tar.bz2 pluralconnect-2c4ae43e688a9873e86211ea0e7aeb9ba770dd77.zip |
Update
Diffstat (limited to 'includes/sysbanner.inc')
-rw-r--r-- | includes/sysbanner.inc | 41 |
1 files changed, 15 insertions, 26 deletions
diff --git a/includes/sysbanner.inc b/includes/sysbanner.inc index d3caecd..e1789f7 100644 --- a/includes/sysbanner.inc +++ b/includes/sysbanner.inc @@ -8,10 +8,11 @@ global $systemID; global $system; $travelling = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/travelling/travelling.json"), true); +$pages = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/pages.json"), true); ?> -<div id="system-info" style="background:rgba(255, 255, 255, .1);border-radius:10px;display:grid;grid-template-columns: 128px 1fr;"> +<div id="system-info" style="display:grid;grid-template-columns: 128px 1fr;background-color:rgba(255, 255, 255, .05);margin-left: -20px; margin-right: -20px;margin-top:-20px;padding: 20px 20px 10px;"> <img src="/assets/uploads/<?= $system ?>.png" alt="" style="height:128px;border-top-left-radius:10px;border-bottom-left-radius:10px;"> <div style="padding:10px 10px 10px 20px;text-align:center;"> <div style="display: grid; grid-template-columns: 1fr;height:100%;grid-template-rows: max-content max-content 1fr;"> @@ -47,11 +48,9 @@ $travelling = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includ <?php if (isset($fronters["members"][0])): ?> <?php $member = $fronters["members"][0]; ?> <a class="member-link" href="/<?= $member["name"] ?>"><img src="<?= getAsset($systemID, $member["id"], "heads") ?>" style="width:24px;"> <?= getMiniName($member["display_name"] ?? ($member["name"] === "fusion" ? "<peh-muted>More than one</peh-muted>" : $member["name"])) ?></a> - <?php if (isset($fronters["members"][1])): ?> - <?php $member2 = $fronters["members"][1]; ?> + <?php if (count($fronters["members"]) > 1): ?> <br>(with - <a class="member-link" href="/<?= $member2["name"] ?>"><img src="<?= getAsset($systemID, $member["id"], "heads") ?>" style="width:24px;"> <?= getMiniName($member2["display_name"] ?? ($member2["name"] === "fusion" ? "<peh-muted>More than one</peh-muted>" : $member2["name"])) ?></a>) - <?php endif; ?> + <?php if (isset($fronters["members"][1])): ?><?php $member2 = $fronters["members"][1]; ?><a class="member-link" href="/<?= $member2["name"] ?>"><img src="<?= getAsset($systemID, $member2["id"], "heads") ?>" style="width:24px;"> <?= getMiniName($member2["display_name"] ?? ($member2["name"] === "fusion" ? "<peh-muted>More than one</peh-muted>" : $member2["name"])) ?></a><?php endif; ?><?php if (isset($fronters["members"][2])): ?><?php $member2 = $fronters["members"][2]; ?>, <a class="member-link" href="/<?= $member2["name"] ?>"><img src="<?= getAsset($systemID, $member2["id"], "heads") ?>" style="width:24px;"> <?= getMiniName($member2["display_name"] ?? ($member2["name"] === "fusion" ? "<peh-muted>More than one</peh-muted>" : $member2["name"])) ?></a><?php endif; ?><?php if (isset($fronters["members"][3])): ?><?php $member2 = $fronters["members"][3]; ?>, <a class="member-link" href="/<?= $member2["name"] ?>"><img src="<?= getAsset($systemID, $member2["id"], "heads") ?>" style="width:24px;"> <?= getMiniName($member2["display_name"] ?? ($member2["name"] === "fusion" ? "<peh-muted>More than one</peh-muted>" : $member2["name"])) ?></a><?php endif; ?>)<?php endif; ?> <?php else: ?>-<?php endif; ?> </span> <span> @@ -73,18 +72,8 @@ $travelling = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includ ?> <a class="member-link" href="/<?= $member["name"] ?>"><img src="<?= getAsset($systemID, $member["id"], "heads") ?>" style="width:24px;"> <?= getMiniName($member["display_name"] ?? ($member["name"] === "fusion" ? "<peh-muted>More than one</peh-muted>" : $member["name"])) ?></a> - <?php if (isset($previous[1])): - $previousID = $previous[1]; - $member2 = null; - - foreach (json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$systemID/members.json"), true) as $members) { - if ($members["id"] === $previousID) { - $member2 = $members; - break; - } - } ?> - <br>(with - <a class="member-link" href="/<?= $member2["name"] ?>"><img src="<?= getAsset($systemID, $member2["id"], "heads") ?>" style="width:24px;"> <?= getMiniName($member2["display_name"] ?? ($member2["name"] === "fusion" ? "<peh-muted>More than one</peh-muted>" : $member2["name"])) ?></a>) + <?php if (count($previous) > 1): ?> + <br>(with <?php if (isset($previous[1])): ?><?php $member2 = getMemberWithoutSystem($previous[1]); ?><a class="member-link" href="/<?= $member2["name"] ?>"><img src="<?= getAsset($systemID, $member2["id"], "heads") ?>" style="width:24px;"> <?= getMiniName($member2["display_name"] ?? ($member2["name"] === "fusion" ? "<peh-muted>More than one</peh-muted>" : $member2["name"])) ?></a><?php endif; ?><?php if (isset($previous[2])): ?><?php $member2 = getMemberWithoutSystem($previous[2]); ?>, <a class="member-link" href="/<?= $member2["name"] ?>"><img src="<?= getAsset($systemID, $member2["id"], "heads") ?>" style="width:24px;"> <?= getMiniName($member2["display_name"] ?? ($member2["name"] === "fusion" ? "<peh-muted>More than one</peh-muted>" : $member2["name"])) ?></a><?php endif; ?><?php if (isset($previous[3])): ?><?php $member2 = getMemberWithoutSystem($previous[3]); ?>, <a class="member-link" href="/<?= $member2["name"] ?>"><img src="<?= getAsset($systemID, $member2["id"], "heads") ?>" style="width:24px;"> <?= getMiniName($member2["display_name"] ?? ($member2["name"] === "fusion" ? "<peh-muted>More than one</peh-muted>" : $member2["name"])) ?></a><?php endif; ?>) <?php endif; ?> <?php else: ?>-<?php endif; ?> </span> @@ -112,21 +101,21 @@ $travelling = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includ </div> </div> -<div id="system-actions" style="margin-top:10px;padding:5px 10px;background:rgba(255, 255, 255, .1);border-radius:10px;display:grid;grid-template-columns: 1fr 1fr 1fr 1fr;"> - <a title="Front history" style="display:inline-block;padding:5px 10px;text-align: center" class="system-action" href="/<?= $system ?>/-/history"> +<div id="system-actions" style="padding:5px 30px;display:grid;grid-template-columns: 1fr 1fr 1fr 1fr;background-color:rgba(255, 255, 255, .025);margin-left: -20px; margin-right: -20px;"> + <a title="Front history" data-bs-toggle="tooltip" style="display:inline-block;padding:5px 10px;text-align: center" class="system-action tooltip-nohelp" href="/<?= $system ?>/-/history"> <img src="/assets/icons/history.svg" style="vertical-align: middle;height: 24px;width: 24px;filter: invert(1)" alt=""> - <span style="vertical-align: middle;" class="list-separator-desktop">Front history</span> + <span style="vertical-align: middle;" class="list-separator-desktop"><?= $pages["s:history"]["name"] ?></span> </a> - <a title="Compare members" style="display:inline-block;padding:5px 10px;text-align: center" class="system-action" href="/<?= $system ?>/-/compare"> + <a title="Compare members" data-bs-toggle="tooltip" style="display:inline-block;padding:5px 10px;text-align: center" class="system-action tooltip-nohelp" href="/<?= $system ?>/-/compare"> <img src="/assets/icons/compare.svg" style="vertical-align: middle;height: 24px;width: 24px;filter: invert(1)" alt=""> - <span style="vertical-align: middle;" class="list-separator-desktop">Compare members</span> + <span style="vertical-align: middle;" class="list-separator-desktop"><?= $pages["s:compare"]["name"] ?></span> </a> - <a title="System tree" style="display:inline-block;padding:5px 10px;text-align: center" class="system-action" href="/<?= $system ?>/-/tree"> + <a title="System tree" data-bs-toggle="tooltip" style="display:inline-block;padding:5px 10px;text-align: center" class="system-action tooltip-nohelp" href="/<?= $system ?>/-/tree"> <img src="/assets/icons/tree.svg" style="vertical-align: middle;height: 24px;width: 24px;filter: invert(1)" alt=""> - <span style="vertical-align: middle;" class="list-separator-desktop">System tree</span> + <span style="vertical-align: middle;" class="list-separator-desktop"><?= $pages["s:tree"]["name"] ?></span> </a> - <a title="Members by species" style="display:inline-block;padding:5px 10px;text-align: center" class="system-action" href="/<?= $system ?>/-/species"> + <a title="Members by species" data-bs-toggle="tooltip" style="display:inline-block;padding:5px 10px;text-align: center" class="system-action tooltip-nohelp" href="/<?= $system ?>/-/species"> <img src="/assets/icons/species.svg" style="vertical-align: middle;height: 24px;width: 24px;filter: invert(1)" alt=""> - <span style="vertical-align: middle;" class="list-separator-desktop">Members by species</span> + <span style="vertical-align: middle;" class="list-separator-desktop"><?= $pages["s:species"]["name"] ?></span> </a> </div>
\ No newline at end of file |