summaryrefslogtreecommitdiff
path: root/includes/header.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/header.php')
-rw-r--r--includes/header.php153
1 files changed, 102 insertions, 51 deletions
diff --git a/includes/header.php b/includes/header.php
index 1f71aa5..91d0aee 100644
--- a/includes/header.php
+++ b/includes/header.php
@@ -1,4 +1,6 @@
-<?php global $title;
+<?php global $title; global $pages;
+
+$pages = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/pages.json"), true);
function error($errno, $errstr, $file, $line) {
echo('
@@ -226,6 +228,10 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/ical/main.php";
}
}
+ .member-small-only {
+ display: none;
+ }
+
@media (max-width: 767px) {
#member-card {
grid-template-columns: 1fr !important;
@@ -248,6 +254,14 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/ical/main.php";
grid-template-columns: 1fr !important;
text-align: left;
}
+
+ .member-small-separator {
+ display: none;
+ }
+
+ .member-small-only {
+ display: inline-block;
+ }
}
#page-content a {
@@ -583,6 +597,35 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/ical/main.php";
left: -10px;
}
+ .tree-l1 .tree-l0-separator {
+ border-bottom: none !important;
+ }
+
+ .tree-l2-separator {
+ display: inline-block;
+ width: 20px;
+ margin-left: 35px;
+ border-bottom: 1px solid white;
+ border-left: 1px solid white;
+ height: 26px;
+ position: relative;
+ top: -12px;
+ left: -10px;
+ }
+
+ .tree-l2 .tree-l1-separator {
+ width: 30px;
+ }
+
+ .tree-l2 .tree-l0-separator {
+ width: 30px;
+ }
+
+ .tree-l2 .tree-inner {
+ position: relative;
+ left: -10px;
+ }
+
.tree-inner {
display: inline-block;
}
@@ -633,7 +676,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/ical/main.php";
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
display: grid;
- grid-template-columns: repeat(4, 1fr);
+ grid-template-columns: repeat(6, 1fr);
text-align: center;
}
@@ -643,7 +686,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/ical/main.php";
@media (max-width: 991px) {
div#member-details.member-details-loggedIn {
- grid-template-columns: repeat(2, 1fr) !important;
+ grid-template-columns: repeat(3, 1fr) !important;
text-align: center;
}
@@ -655,7 +698,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/ical/main.php";
@media (max-width: 767px) {
div#member-details.member-details-loggedIn {
- grid-template-columns: 1fr !important;
+ grid-template-columns: repeat(2, 1fr) !important;
text-align: left;
}
}
@@ -698,29 +741,29 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/ical/main.php";
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="/">
<img src="/assets/icons/home.svg" class="dropdown-icon" alt="" style="width:24px;vertical-align: middle;">
- <span style="vertical-align: middle;">Home</span>
+ <span style="vertical-align: middle;"><?= $pages["home"]["name"] ?></span>
</a></li>
<li><a class="dropdown-item" href="/-/disclaimers">
<img src="/assets/icons/disclaimers.svg" class="dropdown-icon" alt="" style="width:24px;vertical-align: middle;">
- <span style="vertical-align: middle;">Disclaimers</span>
+ <span style="vertical-align: middle;"><?= $pages["disclaimers"]["name"] ?></span>
</a></li>
<li><a class="dropdown-item" href="/-/relations">
<img src="/assets/icons/relations.svg" class="dropdown-icon" alt="" style="width:24px;vertical-align: middle;">
- <span style="vertical-align: middle;">Relations</span>
+ <span style="vertical-align: middle;"><?= $pages["relations"]["name"] ?></span>
</a></li>
<li><a class="dropdown-item" href="/-/terminology">
<img src="/assets/icons/terminology.svg" class="dropdown-icon" alt="" style="width:24px;vertical-align: middle;">
- <span style="vertical-align: middle;">Terminology</span>
+ <span style="vertical-align: middle;"><?= $pages["terminology"]["name"] ?></span>
</a></li>
<li><hr class="dropdown-divider"></li>
<li><h5 class="dropdown-header">Tools</h5></li>
<li><a class="dropdown-item" href="/-/parser">
<img src="/assets/icons/parser.svg" class="dropdown-icon" alt="" style="width:24px;vertical-align: middle;">
- <span style="vertical-align: middle;">Message parser</span>
+ <span style="vertical-align: middle;"><?= $pages["parser"]["name"] ?></span>
</a></li>
<li><a class="dropdown-item" href="/-/prefix">
<img src="/assets/icons/prefix.svg" class="dropdown-icon" alt="" style="width:24px;vertical-align: middle;">
- <span style="vertical-align: middle;">Prefix generator</span>
+ <span style="vertical-align: middle;"><?= $pages["prefix"]["name"] ?></span>
</a></li>
</ul>
</li>
@@ -733,21 +776,32 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/ical/main.php";
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="/-/emergency">
<img src="/assets/icons/emergency.svg" alt="" style="width:24px;vertical-align: middle;">
- <span class="text-danger" style="vertical-align: middle;"><b>Emergency alert</b></span>
+ <span class="text-danger" style="vertical-align: middle;"><b><?= $pages["emergency"]["name"] ?></b></span>
</a></li>
<?php
$frontCloudburst = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/ynmuc-fronters.json"), true)["members"];
$frontRaindrops = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/gdapd-fronters.json"), true)["members"];
- if (isset($_GET['pleasure']) || (
+ if (isset($_GET['pleasure']) || (isset($frontRaindrops[0]) && isset($frontCloudburst[0]) && (
((int)date('H') >= 20 || (int)date('H') < 6) &&
- $frontCloudburst[0]["id"] === "erknz" &&
- $frontRaindrops[0]["id"] === "qbzxm"
- )): ?>
+ ($frontCloudburst[0]["id"] === "erknz" &&
+ $frontRaindrops[0]["id"] === "qbzxm") ||
+ ($frontCloudburst[0]["id"] === "zzise" &&
+ $frontRaindrops[0]["id"] === "tfbob") ||
+ ($frontCloudburst[0]["id"] === "vncoa" &&
+ $frontRaindrops[0]["id"] === "qraku")
+ ))): ?>
<li><a class="dropdown-item" href="/-/pleasure" <?= isset($_GET['pleasure']) ? 'style="opacity: .5;"' : '' ?>>
<img src="/assets/icons/pleasure.svg" alt="" style="width:24px;vertical-align: middle;">
- <span class="text-success" style="vertical-align: middle;"><b>Pleasure alert</b></span>
+ <span class="text-success" style="vertical-align: middle;"><b><?= $pages["pleasure"]["name"] ?></b></span>
+ </a></li>
+ <?php endif; ?>
+
+ <?php if (isset($_GET['wakeup']) || (int)date('H') >= 20 || (int)date('H') < 8): ?>
+ <li><a class="dropdown-item" href="/-/wakeup" <?= isset($_GET['wakeup']) ? 'style="opacity: .5;"' : '' ?>>
+ <img src="/assets/icons/wakeup.svg" alt="" style="width:24px;vertical-align: middle;">
+ <span class="text-info" style="vertical-align: middle;"><b><?= $pages["wakeup"]["name"] ?></b></span>
</a></li>
<?php endif; ?>
<li><hr class="dropdown-divider"></li>
@@ -755,56 +809,36 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/ical/main.php";
<li><h5 class="dropdown-header">Applications</h5></li>
<li><a class="dropdown-item" href="/-/dashboard">
<img src="/assets/icons/dashboard.svg" class="dropdown-icon" alt="" style="width:24px;vertical-align: middle;">
- <span style="vertical-align: middle;">Dashboard</span>
+ <span style="vertical-align: middle;"><?= $pages["dashboard"]["name"] ?></span>
</a></li>
<li><a class="dropdown-item" href="/-/fronting">
<img src="/assets/icons/fronting.svg" class="dropdown-icon" alt="" style="width:24px;vertical-align: middle;">
- <span style="vertical-align: middle;">Front planner</span>
- </a></li>
- <!--<li><a class="dropdown-item" href="/-/actions">
- <img src="/assets/icons/actions.svg" class="dropdown-icon" alt="" style="width:24px;vertical-align: middle;">
- <span style="vertical-align: middle;">Actions database</span>
+ <span style="vertical-align: middle;"><?= $pages["fronting"]["name"] ?></span>
</a></li>
- <li><a class="dropdown-item" href="/-/rules">
- <img src="/assets/icons/rules.svg" class="dropdown-icon" alt="" style="width:24px;vertical-align: middle;">
- <span style="vertical-align: middle;">Systems rules</span>
+ <li><a class="dropdown-item" href="/-/docs">
+ <img src="/assets/icons/docs.svg" class="dropdown-icon" alt="" style="width:24px;vertical-align: middle;">
+ <span style="vertical-align: middle;"><?= $pages["docs"]["name"] ?></span>
</a></li>
- <li><a class="dropdown-item" href="/-/nicknames">
- <img src="/assets/icons/nicknames.svg" class="dropdown-icon" alt="" style="width:24px;vertical-align: middle;">
- <span style="vertical-align: middle;">Relationships nicknames</span>
- </a></li>
- <li><a class="dropdown-item" href="/-/together">
- <img src="/assets/icons/together.svg" class="dropdown-icon" alt="" style="width:24px;vertical-align: middle;">
- <span style="vertical-align: middle;">Watch Together</span>
- </a></li>-->
<li><a class="dropdown-item" href="/-/travelling">
<img src="/assets/icons/travel.svg" class="dropdown-icon" alt="" style="width:24px;vertical-align: middle;">
- <span style="vertical-align: middle;">System travels manager</span>
- </a></li>
- <!--<li><a class="dropdown-item" href="/-/splitting">
- <img src="/assets/icons/form.svg" class="dropdown-icon" alt="" style="width:24px;vertical-align: middle;">
- <span style="vertical-align: middle;">Members by splitting date</span>
+ <span style="vertical-align: middle;"><?= $pages["travelling"]["name"] ?></span>
</a></li>
- <li><a class="dropdown-item" href="/-/bitset">
- <img src="/assets/icons/bitset.svg" class="dropdown-icon" alt="" style="width:24px;vertical-align: middle;">
- <span style="vertical-align: middle;">Bitset calculator</span>
- </a></li>-->
<li><hr class="dropdown-divider"></li>
<li><h5 class="dropdown-header">Debugging</h5></li>
<li><a class="dropdown-item" href="/-/debug">
<img src="/assets/icons/debug.svg" class="dropdown-icon" alt="" style="width:24px;vertical-align: middle;">
- <span style="vertical-align: middle;">Data updater debugging</span>
+ <span style="vertical-align: middle;"><?= $pages["debug"]["name"] ?></span>
</a></li>
<li><a class="dropdown-item" href="/-/score">
<img src="/assets/icons/score.svg" class="dropdown-icon" alt="" style="width:24px;vertical-align: middle;">
- <span style="vertical-align: middle;">Score system testing</span>
+ <span style="vertical-align: middle;"><?= $pages["score"]["name"] ?></span>
</a></li>
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="/-/logout">
<img src="/assets/icons/logout.svg" class="dropdown-icon" alt="" style="width:24px;vertical-align: middle;">
- <span style="vertical-align: middle;">Logout</span>
+ <span style="vertical-align: middle;"><?= $pages["logout"]["name"] ?></span>
</a></li>
</ul>
</li>
@@ -829,8 +863,8 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/ical/main.php";
</a></li>
<?php
- $subsystems = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/ynmuc-subsystems.json"), true);
- $subsystemsNotMember = array_values(array_filter($subsystems, function ($i) {
+ $subsystems1 = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/ynmuc-subsystems.json"), true);
+ $subsystemsNotMember = array_values(array_filter($subsystems1, function ($i) {
return $i["source_type"] !== "member";
}));
@@ -846,8 +880,8 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/ical/main.php";
<?php endif; ?>
<li><hr class="dropdown-divider"></li>
<li><h5 class="dropdown-header">Members</h5></li>
- <?php foreach (scoreOrder(withTravelers(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/ynmuc-members.json"), true), "ynmuc"), "ynmuc") as $member): if ($member['name'] !== "unknown" && $member['name'] !== "fusion"): ?>
- <li><a class="dropdown-item" href="/cloudburst/<?= $member['name'] ?>">
+ <?php foreach (scoreOrder(withTravelers(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/ynmuc-members.json"), true), "ynmuc"), "ynmuc") as $member): if ($member['name'] !== "unknown" && $member['name'] !== "fusion" && $member['name'] !== "new"): ?>
+ <li><a class="dropdown-item" href="/<?= $member['name'] ?>">
<img src="/assets/uploads/pt<?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/assets/uploads/pt-" . resolveMember($member['name']) . ".png") ? "-" . $member['name'] : "" ?>.png" alt="" style="width:24px;vertical-align: middle;">
<span style="vertical-align: middle;"><?= $member['display_name'] ?? $member['name'] ?></span>
</a></li>
@@ -864,10 +898,27 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/ical/main.php";
<img src="/assets/icons/about.svg" class="dropdown-icon" alt="" style="width:24px;vertical-align: middle;">
<span style="vertical-align: middle;">About us</span>
</a></li>
+ <?php
+
+ $subsystems1 = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/gdapd-subsystems.json"), true);
+ $subsystemsNotMember = array_values(array_filter($subsystems1, function ($i) {
+ return $i["source_type"] !== "member";
+ }));
+
+ if (count($subsystemsNotMember) > 0): ?>
+ <li><hr class="dropdown-divider"></li>
+ <li><h5 class="dropdown-header">Subsystems</h5></li>
+ <?php foreach ($subsystemsNotMember as $subsystem): $ssData = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/gdapd-subsystem-" . $subsystem['source'] . ".json"), true); ?>
+ <li><a class="dropdown-item" href="/raindrops/-/subsystem/<?= $subsystem['source'] ?>">
+ <img src="/assets/uploads/ss-<?= $subsystem['source'] ?>.png" alt="" style="border-radius:5px;width:24px;vertical-align: middle;">
+ <span style="vertical-align: middle;"><?= $ssData['name'] ?? $subsystem['source'] ?></span>
+ </a></li>
+ <?php endforeach; ?>
+ <?php endif; ?>
<li><hr class="dropdown-divider"></li>
<li><h5 class="dropdown-header">Members</h5></li>
- <?php foreach (scoreOrder(withTravelers(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/gdapd-members.json"), true), "gdapd"), "gdapd") as $member): if ($member['name'] !== "unknown" && $member['name'] !== "fusion"): ?>
- <li><a class="dropdown-item" href="/raindrops/<?= $member['name'] ?>">
+ <?php foreach (scoreOrder(withTravelers(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/gdapd-members.json"), true), "gdapd"), "gdapd") as $member): if ($member['name'] !== "unknown" && $member['name'] !== "fusion" && $member['name'] !== "new"): ?>
+ <li><a class="dropdown-item" href="/<?= $member['name'] ?>">
<img src="/assets/uploads/pt<?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/assets/uploads/pt-" . resolveMember($member['name']) . ".png") ? "-" . $member['name'] : "" ?>.png" alt="" style="width:24px;vertical-align: middle;">
<span style="vertical-align: middle;"><?= $member['display_name'] ?? $member['name'] ?></span>
</a></li>