summaryrefslogtreecommitdiff
path: root/includes/homepage.inc
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2023-03-03 07:04:02 +0100
committerMinteck <contact@minteck.org>2023-03-03 07:04:02 +0100
commit29928887e733f3bc2c2baaf06dafd495a006753b (patch)
tree90f5fa4c5273f201cc2d26086298ad094d9dadda /includes/homepage.inc
parent3d77712a9ab014635c75a33ea0f491bbda6aead3 (diff)
downloadpluralconnect-29928887e733f3bc2c2baaf06dafd495a006753b.tar.gz
pluralconnect-29928887e733f3bc2c2baaf06dafd495a006753b.tar.bz2
pluralconnect-29928887e733f3bc2c2baaf06dafd495a006753b.zip
Updated 18 files and added 10 files (automated)
Diffstat (limited to 'includes/homepage.inc')
-rw-r--r--includes/homepage.inc12
1 files changed, 10 insertions, 2 deletions
diff --git a/includes/homepage.inc b/includes/homepage.inc
index c078e89..900d8f1 100644
--- a/includes/homepage.inc
+++ b/includes/homepage.inc
@@ -4,6 +4,7 @@ global $app;
global $travelling;
function newHomepage($id, $page, $title) {
+ global $travelling;
$system = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . $id . "/general.json"), true);
?>
@@ -17,10 +18,17 @@ function newHomepage($id, $page, $title) {
<?php endif; ?>
<div class="new-homepage-system-list" id="new-homepage-system-<?= $id ?>-list">
- <?php $list = array_values(withTravelers(scoreOrder(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . $id . "/members.json"), true), $id), $id)); foreach ($list as $index => $member): ?>
+ <?php $list = array_values(scoreOrder(withTravelers(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . $id . "/members.json"), true), $id), $id)); foreach ($list as $index => $member): ?>
<a href="/<?= $member["name"] ?>" class="new-homepage-link <?= $index === count($list) - 1 ? "new-homepage-link-last" : "" ?>" style="color: white !important; text-decoration: none !important; display: block; background-color: #<?= $member["color"] ?>22; padding: 5px 10px;">
- <img src="<?= getAsset($id, $member["id"]) ?>" style="width: 32px; height: 32px; vertical-align: middle; background-color: rgba(0, 0, 0, .25); border-radius: 999px;">
+ <img src="<?= getAsset(($travelling[$member["id"]]["travelling"] && !$travelling[$member["id"]]["equestria"]) ? ($id === "gdapd" ? "ynmuc" : "gdapd") : $id, $member["id"]) ?>" style="width: 32px; height: 32px; vertical-align: middle; background-color: rgba(0, 0, 0, .25); border-radius: 999px;">
<span style="width: calc(100% - 37px); vertical-align: middle; margin-left: 5px;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;"><?= $member["display_name"] ?? $member["name"] ?></span>
+ <span style="vertical-align: middle; float:right;">
+ <?php if ($travelling[$member["id"]]["travelling"] && $travelling[$member["id"]]["equestria"]): ?>
+ <img src="/assets/logo/equestria.png" style="width: 24px; height: 24px; margin-top: 5px;">
+ <?php elseif ($travelling[$member["id"]]["travelling"]): ?>
+ <img src="<?= getAsset($id === "gdapd" ? "ynmuc" : "gdapd") ?>" style="width: 24px; height: 24px; margin-top: 5px;">
+ <?php endif; ?>
+ </span>
</a>
<?php endforeach; ?>
</div>