summaryrefslogtreecommitdiff
path: root/includes/components
diff options
context:
space:
mode:
Diffstat (limited to 'includes/components')
-rw-r--r--includes/components/2023ui.inc187
-rw-r--r--includes/components/footer.inc30
-rw-r--r--includes/components/fullbanner.inc7
-rw-r--r--includes/components/header.inc475
-rw-r--r--includes/components/sysbanner.inc65
-rw-r--r--includes/components/timeline.inc119
6 files changed, 0 insertions, 883 deletions
diff --git a/includes/components/2023ui.inc b/includes/components/2023ui.inc
deleted file mode 100644
index 4c1aa5b..0000000
--- a/includes/components/2023ui.inc
+++ /dev/null
@@ -1,187 +0,0 @@
-<style>
- .new-homepage-link {
- background-color: rgba(0, 0, 0, .01) !important;
- }
-
- .new-homepage-link:hover {
- background-color: rgba(0, 0, 0, .05) !important;
- }
-
- .new-homepage-link:active {
- background-color: rgba(0, 0, 0, .1) !important;
- }
-
- .new-homepage-system-list {
- background: linear-gradient(180deg, rgba(216,53,124,0.1) 0%, rgba(227,65,55,0.1) 7%, rgba(231,155,96,0.1) 14%, rgba(223,191,78,0.1) 21%, rgba(203,207,117,0.1) 28%, rgba(108,224,154,0.1) 35%, rgba(106,228,205,0.1) 42%, rgba(100,217,234,0.1) 49%, rgba(83,182,238,0.1) 56%, rgba(74,158,234,0.1) 63%, rgba(164,137,238,0.1) 70%, rgba(211,142,240,0.1) 77%, rgba(230,122,238,0.1) 84%, rgba(227,113,196,0.1) 91%);
- }
-
- #banner-lower, #timeline-container {
- backdrop-filter: none !important;
- background-color: var(--palette-2) !important;
- }
-
- #hpd-legacy {
- display: none !important;
- }
-
- #system-page, #member-page {
- background-color: var(--palette-2) !important;
- backdrop-filter: none !important;
- -webkit-backdrop-filter: none !important;
- }
-
- @media (max-width: 926px) {
- .mobile-hide {
- display: none !important;
- }
-
- .mobile-icon-container-right {
- margin-right: 0 !important;
- }
-
- #menu-bar {
- grid-template-columns: 1fr max-content 1fr !important;
- left: 20px !important;
- }
-
- #side-bar-systems {
- display: none !important;
- }
-
- #side-bar-options {
- margin: 0 !important;
- }
-
- #side-bar {
- bottom: 0 !important;
- right: 0 !important;
- width: 100% !important;
- height: 64px;
- top: unset !important;
- z-index: 9 !important;
- align-items: center;
- }
-
- #app {
- left: 0 !important;
- right: 0 !important;
- bottom: 64px;
- }
-
- .ui2023-side-bar-item:not(.mobile-hide) {
- display: inline-block !important;
- }
-
- .mobile-show {
- display: inline-block !important;
- }
-
- #app {
- z-index: -1;
- }
-
- body:not(.modal-open) #menu-bar {
- z-index: 9999;
- }
-
- #app > #member-banner-container, #system-banner-container {
- width: 100% !important;
- }
-
- .hpd-item-card div:nth-child(3)::before, .hpd-item-card div:nth-child(3)::after {
- color: inherit !important;
- }
- }
-</style>
-
-<div id="menu-bar" style="position: fixed; top: 0; left: 101px; right: 20px; height: 52px; display: grid; grid-template-columns: 1fr 1fr 1fr;">
- <div style="display: grid; grid-template-columns: max-content 1fr;">
- <div style="height: 52px; display: flex; align-items: center;">
- <a href="/" style="color: inherit; text-decoration: inherit;">
- <img class="antialias" src="/assets/logo/newlogo-ng.png" style="width: 32px;">
- <span style="margin-left: 5px; vertical-align: middle; position: relative; top: -1px; font-weight: bold;">Ponycule</span>
- </a>
- </div>
- </div>
- <div style="height: 52px; display: flex; align-items: center;">
- <!--<form action="/-/search" style="width: 100%;">
- <input name="q" class="form-control" type="text" value="" placeholder="Search on Cold Haze..." style="width: 100%; margin-left: auto; margin-right: auto; border-color: var(--palette-4) !important; background-color: var(--palette-4) !important;">
- </form>-->
- </div>
- <div style="display: grid; grid-template-columns: 1fr max-content;">
- <div style="display: flex; align-items: center;">
- <?php global $isLowerLoggedIn; global $isLoggedIn; global $_PROFILE; if ($isLoggedIn || $isLowerLoggedIn): ?>
- <div style="margin-left: auto; margin-right: auto;" class="mobile-icon-container mobile-icon-container-right">
- <a data-bs-toggle="tooltip" data-bs-placement="bottom" title="Jobs" class="ui2023-side-bar-item mobile-hide" href="/-/jobs" style="padding: 10px; height: 48px; width: 48px; display: inline-block; border-radius: 999px;">
- <img src="<?= icon("jobs") ?>" style="max-width: 28px; max-height: 28px;">
- </a><a data-bs-toggle="tooltip" data-bs-placement="bottom" title="Logout" class="ui2023-side-bar-item mobile-hide" href="/-/logout" style="padding: 10px; height: 48px; width: 48px; display: inline-block; border-radius: 999px;">
- <img src="<?= icon("logout") ?>" style="max-width: 28px; max-height: 28px;">
- </a><div class="ui2023-side-bar-item mobile-show dropdown" style="padding: 10px; height: 48px; width: 48px; display: none; border-radius: 999px;">
- <a data-bs-toggle="dropdown" href="#">
- <img src="<?= icon("menu") ?>" style="max-width: 28px; max-height: 28px;">
- </a>
- <ul class="dropdown-menu">
- <li><a class="dropdown-item" href="/-/jobs">
- <img src="<?= icon("jobs") ?>" style="vertical-align: middle; width: 24px; height: 24px;"><span style="vertical-align: middle; margin-left: 5px;">Jobs</span>
- </a></li>
- <li><a class="dropdown-item" href="/-/logout">
- <img src="<?= icon("logout") ?>" style="vertical-align: middle; width: 24px; height: 24px;"><span style="vertical-align: middle; margin-left: 5px;">Logout</span>
- </a></li>
- </ul>
- </div>
- </div>
- <?php endif; ?>
- </div>
- <div style="height: 52px; display: flex; align-items: center;">
- <?php global $isLowerLoggedIn; global $isLoggedIn; global $_PROFILE; if ($isLoggedIn || $isLowerLoggedIn): ?>
- <a href="https://account.equestria.dev/hub/users/<?= $_PROFILE["id"] ?>" target="_blank" style="color: inherit; text-decoration: inherit;">
- <?php $fronters = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . ($_PROFILE["login"] === "raindrops" ? "gdapd" : ($_PROFILE["login"] === "Moonglow" ? "hrbom" : "other")) . "/fronters.json"), true); if (isset($fronters["members"][0])): ?>
- <span class="mobile-hide" style="margin-right: 5px; vertical-align: middle; margin-top: -2px;"><?= $fronters["members"][0]["display_name"] ?? $fronters["members"][0]["name"] ?></span>
- <img src="<?= getAsset(($_PROFILE["login"] === "raindrops" ? "gdapd" : ($_PROFILE["login"] === "Moonglow" ? "hrbom" : "other")), $fronters["members"][0]["id"]) ?>" style="width: 32px; height: 32px; border-radius: 999px; background-color: var(--palette-2);">
- <?php else: ?>
- <span class="mobile-hide" style="margin-right: 5px; vertical-align: middle; margin-top: -2px;"><?= $_PROFILE["name"] ?></span>
- <img class="antialias" src="https://account.equestria.dev/hub/api/rest/avatar/<?= $_PROFILE["id"] ?>?dpr=2&size=32" style="width: 32px; height: 32px; border-radius: 999px; background-color: var(--palette-2);">
- <?php endif; ?>
- </a>
- <?php else: ?>
- <a href="/login" style="color: inherit; text-decoration: inherit;">
- <span class="mobile-hide" style="margin-right: 5px; vertical-align: middle; margin-top: -2px;">Log in</span>
- <img src="<?= icon("login", false) ?>" class="light-only" style="width: 24px; height: 24px; margin: 4px;">
- <img src="<?= icon("login", true) ?>" class="dark-only" style="width: 24px; height: 24px; margin: 4px;">
- </a>
- <?php endif; ?>
- </div>
- </div>
-</div>
-
-<style>
- .ui2023-side-bar-system:hover, .ui2023-side-bar-item:hover {
- background-color: var(--palette-2);
- }
-
- .ui2023-side-bar-system:active {
- background-color: var(--palette-1);
- }
-
- .ui2023-side-bar-system:active {
- background-color: var(--palette-3);
- }
-</style>
-
-<div id="side-bar" style="position: fixed; top: 62px; bottom: 20px; left: 0; width: 64px; display: flex; justify-content: center;">
- <div>
- <div id="side-bar-systems" style="background-color: var(--palette-4); height: max-content; border-radius: 999px;">
- <a data-bs-toggle="tooltip" data-bs-placement="right" title="Raindrops System" class="ui2023-side-bar-system" href="/raindrops" style="padding: 8px; height: 48px; width: 48px; display: block; border-top-left-radius: 999px; border-top-right-radius: 999px;">
- <img class="antialias" class="antialias" src="<?= getAsset("gdapd") ?>" style="max-width: 32px; max-height: 32px;">
- </a>
- <?php global $app; if ($isLoggedIn || $isLowerLoggedIn): ?>
- <a data-bs-toggle="tooltip" data-bs-placement="right" title="<?= $app["other"]["name"] ?>" class="ui2023-side-bar-system" href="/<?= $app["other"]["slug"] ?>" style="padding: 8px; height: 48px; width: 48px; display: block;">
- <img class="antialias" class="antialias" src="<?= getAsset("other") ?>" style="max-width: 32px; max-height: 32px;">
- </a>
- <?php endif; ?>
- <a data-bs-toggle="tooltip" data-bs-placement="right" title="Moonglow" class="ui2023-side-bar-system" href="/moonglow" style="padding: 8px; height: 48px; width: 48px; display: block; border-bottom-left-radius: 999px; border-bottom-right-radius: 999px;">
- <img class="antialias" class="antialias" src="<?= getAsset("hrbom") ?>" style="max-width: 32px; max-height: 32px;">
- </a>
- </div>
- </div>
-</div>
diff --git a/includes/components/footer.inc b/includes/components/footer.inc
deleted file mode 100644
index 00d74aa..0000000
--- a/includes/components/footer.inc
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-global $start;
-$GLOBALS["ColdHazePerformance"]["page"] = (microtime(true) - $start) * 1000;
-$start = microtime(true);
-
-?>
-
-<script src="/assets/editor/ua-parser.js"></script>
-<br><br></main>
-
-<script>
- let tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'))
- let tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
- return new bootstrap.Tooltip(tooltipTriggerEl)
- });
-
- if (document.createElement("canvas").getContext("webgl") === null) {
- let style = document.createElement("style");
- style.innerText = "* { backdrop-filter: none !important; }";
- document.head.appendChild(style);
- try { document.getElementById("gpuWarning").style.display = ""; } catch (e) {}
- }
-</script>
-
-<?php if (isset($_GET["performance"])): ?>
-<pre><?php $GLOBALS["ColdHazePerformance"]["footer"] = (microtime(true) - $start) * 1000; var_dump($GLOBALS["ColdHazePerformance"]); ?></pre>
-<?php endif; ?>
-
-</body>
-</html>
diff --git a/includes/components/fullbanner.inc b/includes/components/fullbanner.inc
deleted file mode 100644
index 07dfa59..0000000
--- a/includes/components/fullbanner.inc
+++ /dev/null
@@ -1,7 +0,0 @@
-<?php global $memberData; global $memberID; global $systemID; global $metadata; global $travelling; global $systemCommonName; global $member; global $lang; global $pages; ?>
-<script>
- window.currentMemberData = JSON.parse(atob(`<?= base64_encode(json_encode(getMemberBannerData($memberID, $systemID))) ?>`));
-</script>
- <div id="member-banner"></div>
-
-<script src="/assets/logo/banner.js?_=<?= sha1_file($_SERVER['DOCUMENT_ROOT'] . "/assets/logo/banner.js") ?>"></script><script>refreshBanner(false, <?= $lang["_french"] ? "true" : "false" ?>)</script> \ No newline at end of file
diff --git a/includes/components/header.inc b/includes/components/header.inc
deleted file mode 100644
index 7cf626e..0000000
--- a/includes/components/header.inc
+++ /dev/null
@@ -1,475 +0,0 @@
-<?php global $title; global $pages; global $readOnly;
-$start = microtime(true);
-$use2023UI = $useNewUI = true;
-global $use2023UI;
-
-$isNormallyLoggedIn = false;
-
-require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/session.inc"; global $isLoggedIn; global $isUserLoggedIn; global $isLowerLoggedIn;
-if ($readOnly && $isLoggedIn || $readOnly && $isUserLoggedIn) {
- $isLoggedIn = false;
- $isUserLoggedIn = false;
- $isNormallyLoggedIn = true;
-}
-
-$pages = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/pages.json"), true);
-
-global $_MemberName;
-global $_MemberPage;
-global $_SystemName;
-global $_SystemPage;
-global $toplevel;
-
-$pages = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/pages.json"), true);
-$page = $pages[$toplevel] ?? [
- "rail" => false
-];
-
-require_once $_SERVER["DOCUMENT_ROOT"] . "/includes/util/score.inc";
-require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/functions.inc";
-require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/banner.inc";
-require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/rainbow.inc";
-
-?>
-<!doctype html>
-<html lang="en">
-<head>
- <script>
- document.cookie = "new2023UIDarkMode=" + (window.matchMedia("(prefers-color-scheme: dark)").matches ? "yes" : "no") + "; max-age=" + (60*60*24*365) + "; path=/; samesite; secure";
- </script>
- <link href="/assets/logo/custom-2023.css" rel="preload" as="style">
- <link href="/assets/logo/light-2023.css" rel="preload" as="style">
- <link href="/assets/logo/custom-2023.css" rel="stylesheet">
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet">
- <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js"></script>
- <title><?= $title && $title !== "-" ? $title . " ยท " : "" ?>Ponycule</title>
- <link rel="shortcut icon" href="/assets/logo/newlogo-ng.png" type="image/png">
- <link href="/assets/logo/light-2023.css" rel="stylesheet">
-</head>
-<body style="background-color: var(--palette-1);">
- <?php
- $palettes = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/themes.json"), true);
-
- $selectedPalette = $palettes["default"];
-
- global $memberID; global $systemID; if (isset($memberID) || isset($systemID)) {
- if (isset($memberID)) {
- $member = getMemberWithoutSystem($memberID);
- $color = $member["color"];
- } else {
- $systemDataForColor = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$systemID/general.json"), true);
- $color = $systemDataForColor["color"] ?? "000000";
- }
-
- if (isset($_GET["debug"])) {
- ob_clean();
- echo("<pre>");
-
- echo("Color difference debug\n======================\n\n");
- echo("Color: #" . $member["color"] . "\n\n");
- }
-
- $sr = hexdec(substr($color, 0, 2));
- $sg = hexdec(substr($color, 2, 2));
- $sb = hexdec(substr($color, 4, 2));
-
- $differencesAll = [];
-
- foreach ($palettes["list"] as $id => $palette) {
- $colors = [
- ...explode(",", $palette["dark"]),
- ...explode(",", $palette["light"])
- ];
-
- $importantColors = [
- $colors[5],
- $colors[9],
- $colors[15],
- $colors[19]
- ];
- $differences = [];
-
- if (isset($_GET["debug"])) echo("Palette " . $id . ": " . implode(", ", array_map(function ($i) { return "#$i"; }, $importantColors)) . "\n");
-
- foreach ($importantColors as $color) {
- $r = hexdec(substr($color, 0, 2));
- $g = hexdec(substr($color, 2, 2));
- $b = hexdec(substr($color, 4, 2));
-
- $dr = abs($r - $sr);
- $dg = abs($g - $sg);
- $db = abs($b - $sb);
-
- $differences[] = $dr + $dg + $db;
- }
-
- $total = array_reduce($differences, function ($a, $b) { return $a + $b; }) / count($differences);
-
- if (isset($_GET["debug"])) {
- echo(" " . implode(", ", $differences) . "\n");
- echo(" " . $total . "\n\n");
- }
-
- $differencesAll[] = [
- "id" => $id,
- "difference" => $total
- ];
- }
-
- usort($differencesAll, function ($a, $b) {
- return $a["difference"] - $b["difference"];
- });
-
- if (isset($_GET["debug"])) {
- echo("Smaller: " . $differencesAll[0]["id"] . ", " . $differencesAll[0]["difference"]);
- }
-
- $selectedPalette = $differencesAll[0]["id"];
-
- if (isset($_GET["debug"])) {
- echo("</pre>");
- die();
- }
- }
-
- global $userPalette;
- $userPalette = $palettes["list"][$selectedPalette];
-
- function rgb($color) {
- return hexdec(substr($color, 0, 2)) . "," . hexdec(substr($color, 2, 2)) . "," . hexdec(substr($color, 4, 2));
- }
-
- function icon($name, $dark = null, $body = false) {
- global $userPalette;
-
- if (isset($dark)) {
- return "/assets/icons/new/" . $name . ".svg?color=" . explode(",", $userPalette[$dark ? "dark" : "light"])[$body ? 6 : 9];
- } else {
- return "/assets/icons/new/" . $name . ".svg?color=" . explode(",", $userPalette[isset($_COOKIE["new2023UIDarkMode"]) && $_COOKIE["new2023UIDarkMode"] === "yes" ? "dark" : "light"])[$body ? 6 : 9];
- }
- }
-
- foreach ([ "dark", "light" ] as $theme) { $palette = explode(",", $userPalette[$theme]); ?>
- <style>
- @media (prefers-color-scheme: <?= $theme ?>)<?= $theme === "light" ? ", (prefers-color-scheme: no-preference)" : "" ?> {
- :root {
- --bs-body-color: #<?= $palette[6] ?> !important;
- --bs-body-color-rgb: <?= rgb($palette[6]) ?> !important;
- --bs-body-bg: #<?= $palette[0] ?> !important;
- --bs-body-bg-rgb: <?= rgb($palette[0]) ?> !important;
- --bs-white: #<?= $palette[0] ?> !important;
- --bs-white-rgb: <?= rgb($palette[0]) ?> !important;
-
- --bs-secondary-color: #<?= $palette[6] ?> !important;
- --bs-secondary-color-rgb: <?= rgb($palette[6]) ?> !important;
- --bs-secondary-bg: #<?= $palette[1] ?> !important;
- --bs-secondary: #<?= $palette[6] ?> !important;
- --bs-secondary-bg-rgb: <?= rgb($palette[1]) ?> !important;
-
- --bs-tertiary-color: #<?= $palette[6] ?> !important;
- --bs-tertiary-color-rgb: <?= rgb($palette[6]) ?> !important;
- --bs-tertiary-bg: #<?= $palette[2] ?> !important;
- --bs-tertiary-bg-rgb: <?= rgb($palette[2]) ?> !important;
-
- --bs-light: #<?= $palette[2] ?> !important;
- --bs-light-rgb: <?= rgb($palette[2]) ?> !important;
-
- --bs-link-color: #<?= $palette[9] ?> !important;
- --bs-link-hover-color: #<?= $palette[9] ?>77 !important;
- --bs-link-active-color: #<?= $palette[9] ?>77 !important;
-
- --palette-0: #<?= $palette[0] ?> !important;
- --palette-1: #<?= $palette[1] ?> !important;
- --palette-2: #<?= $palette[2] ?> !important;
- --palette-3: #<?= $palette[3] ?> !important;
- --palette-4: #<?= $palette[4] ?> !important;
- --palette-5: #<?= $palette[5] ?> !important;
- --palette-6: #<?= $palette[6] ?> !important;
- --palette-7: #<?= $palette[7] ?> !important;
- --palette-8: #<?= $palette[8] ?> !important;
- --palette-9: #<?= $palette[9] ?> !important;
-
- --palette-0-rgb: <?= rgb($palette[0]) ?> !important;
- --palette-1-rgb: <?= rgb($palette[1]) ?> !important;
- --palette-2-rgb: <?= rgb($palette[2]) ?> !important;
- --palette-3-rgb: <?= rgb($palette[3]) ?> !important;
- --palette-4-rgb: <?= rgb($palette[4]) ?> !important;
- --palette-5-rgb: <?= rgb($palette[5]) ?> !important;
- --palette-6-rgb: <?= rgb($palette[6]) ?> !important;
- --palette-7-rgb: <?= rgb($palette[7]) ?> !important;
- --palette-8-rgb: <?= rgb($palette[8]) ?> !important;
- --palette-9-rgb: <?= rgb($palette[9]) ?> !important;
- }
-
- .dropdown-menu {
- background-color: #<?= $palette[1] ?> !important;
- --bs-dropdown-bg: #<?= $palette[1] ?> !important;
- --bs-dropdown-link-color: #<?= $palette[6] ?> !important;
- --bs-dropdown-link-disabled-color: #<?= $palette[6] ?>77 !important;
- --bs-dropdown-link-hover-color: #<?= $palette[6] ?> !important;
- --bs-dropdown-link-hover-bg: #<?= $palette[3] ?> !important;
- --bs-dropdown-link-active-bg: #<?= $palette[6] ?> !important;
- --bs-dropdown-link-active-color: #<?= $palette[6] ?> !important;
- }
-
- .dropdown-item {
- color: #<?= $palette[6] ?> !important;
- }
-
- .dropdown-item:hover {
- color: #<?= $palette[6] ?> !important;
- background-color: #<?= $palette[3] ?> !important;
- }
-
- .dropdown-item:active {
- color: #<?= $palette[6] ?> !important;
- background-color: #<?= $palette[6] ?> !important;
- }
-
- .dropdown-item.disabled {
- color: #<?= $palette[6] ?>77 !important;
- }
-
- .coins {
- color: #<?= $palette[6] ?> !important;
- background-color: #<?= $palette[1] ?> !important;
- }
-
- .list-group-item-primary {
- color: var(--bs-body-bg);
- background-color: #<?= $palette[6] ?>;
- }
-
- .list-group-item-action.list-group-item-primary:hover, .list-group-item-action.list-group-item-primary:active, .list-group-item-action.list-group-item-primary:focus {
- background-color: #<?= $palette[6] ?>dd;
- color: var(--bs-body-bg);
- }
-
- .profile-border-inner-active {
- background-color: var(--bs-tertiary-bg) !important;
- }
-
- .bg-secondary {
- background-color: #<?= $palette[9] ?> !important;
- color: #<?= $palette[0] ?> !important;
- }
-
- .list-group-item-primary small {
- color: #<?= $palette[0] ?>77 !important;
- }
-
- .list-group, .list-group-item, .list-group-item-action {
- --bs-list-group-color: var(--bs-body-color) !important;
- --bs-list-group-action-color: var(--bs-body-color) !important;
- --bs-list-group-action-hover-color: var(--bs-body-color) !important;
- --bs-list-group-action-active-color: var(--bs-body-color) !important;
- --bs-list-group-border-color: #<?= $palette[5] ?> !important;
- --bs-list-group-bg: #<?= $palette[2] ?> !important;
- --bs-list-group-action-hover-bg: #<?= $palette[1] ?> !important;
- --bs-list-group-action-active-bg: #<?= $palette[1] ?> !important;
- }
-
- .btn-outline-dark, .btn-outline-secondary {
- --bs-btn-color: var(--bs-body-color);
- --bs-btn-border-color: var(--bs-body-color);
- --bs-btn-hover-color: var(--bs-body-bg);
- --bs-btn-hover-bg: var(--bs-body-color);
- --bs-btn-hover-border-color: var(--bs-body-color);
- --bs-btn-focus-shadow-rgb: <?= rgb($palette[6]) ?>;
- --bs-btn-active-color: var(--bs-body-bg);
- --bs-btn-active-bg: var(--bs-body-color);
- --bs-btn-active-border-color: var(--bs-body-color);
- --bs-btn-active-shadow: inset 0 3px 5px rgba(<?= rgb($palette[6]) ?>, 0.125);
- --bs-btn-disabled-color: #<?= $palette[6] ?>77;
- --bs-btn-disabled-bg: transparent;
- --bs-btn-disabled-border-color: #<?= $palette[6] ?>77;
- --bs-gradient: none;
- }
-
- .alert-primary {
- --bs-alert-color: var(--bs-body-bg);
- --bs-alert-bg: var(--bs-body-color);
- --bs-alert-border-color: var(--bs-body-color);
- }
-
- .alert-danger .btn-close, .alert-success .btn-close, .alert-warning .btn-close {
- background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23<?= $palette[0] ?>'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat
- }
-
- .alert-danger, .alert-success, .alert-warning, .list-group-item-warning {
- --bs-alert-color: var(--bs-body-bg) !important;
- --bs-alert-bg: #<?= $palette[9] ?> !important;
- --bs-alert-border-color: #<?= $palette[9] ?> !important;
- --bs-list-group-border-color: #<?= $palette[8] ?> !important;
- }
-
- .list-group-item-warning, .list-group-item-success, .list-group-item-danger, .list-group-item-warning:hover, .list-group-item-success:hover, .list-group-item-danger:hover, .list-group-item-warning:active, .list-group-item-success:active, .list-group-item-danger:active {
- color: var(--bs-body-color) !important;
- background-color: #<?= $palette[8] ?> !important;
- }
-
- .list-group-item-warning:hover, .list-group-item-success:hover, .list-group-item-danger:hover {
- opacity: .75;
- }
-
- .list-group-item-warning:active, .list-group-item-success:active, .list-group-item-danger:active {
- opacity: .5;
- }
-
- .list-group-item[open] {
- opacity: 1 !important;
- }
-
- .alert-secondary {
- --bs-alert-color: var(--bs-secondary-color);
- --bs-alert-bg: var(--bs-secondary-bg);
- --bs-alert-border-color: var(--bs-secondary-bg);
- }
-
- .badge.bg-success, .badge.bg-danger, .badge.bg-warning {
- background-color: var(--bs-body-color) !important;
- color: var(--bs-body-bg) !important;
- }
-
- .badge.bg-secondary, .badge.bg-black {
- background-color: var(--bs-body-bg) !important;
- color: var(--bs-body-color) !important;
- }
-
- .text-muted {
- color: #<?= $palette[6] ?>77 !important;
- }
-
- body.bg-light {
- background-color: var(--bs-body-bg) !important;
- }
-
- .btn-primary {
- --bs-btn-color: #<?= $palette[8] ?>;
- --bs-btn-bg: #<?= $palette[9] ?>;
- --bs-btn-border-color: #<?= $palette[9] ?>;
- --bs-btn-hover-color: #<?= $palette[8] ?>;
- --bs-btn-hover-bg: #<?= $palette[9] ?>;
- --bs-btn-hover-border-color: #<?= $palette[9] ?>;
- --bs-btn-focus-shadow-rgb: <?= rgb($palette[9]) ?>;
- --bs-btn-active-color: #<?= $palette[8] ?>;
- --bs-btn-active-bg: #<?= $palette[9] ?>;
- --bs-btn-active-border-color: #<?= $palette[9] ?>;
- --bs-btn-active-shadow: inset 0 3px 5px rgba(<?= rgb($palette[9]) ?>, 0.25);
- --bs-btn-disabled-color: #<?= $palette[8] ?>;
- --bs-btn-disabled-bg: #<?= $palette[9] ?>77;
- --bs-btn-disabled-border-color: #<?= $palette[9] ?>77;
- }
-
- .btn-outline-primary {
- --bs-btn-color: #<?= $palette[9] ?>;
- --bs-btn-border-color: #<?= $palette[9] ?>;
- --bs-btn-hover-color: var(--bs-body-bg);
- --bs-btn-hover-bg: #<?= $palette[9] ?>;
- --bs-btn-hover-border-color: #<?= $palette[9] ?>;
- --bs-btn-focus-shadow-rgb: <?= rgb($palette[6]) ?>;
- --bs-btn-active-color: var(--bs-body-bg);
- --bs-btn-active-bg: #<?= $palette[9] ?>;
- --bs-btn-active-border-color: #<?= $palette[9] ?>;
- --bs-btn-active-shadow: inset 0 3px 5px rgba(<?= rgb($palette[6]) ?>, 0.125);
- --bs-btn-disabled-color: #<?= $palette[6] ?>77;
- --bs-btn-disabled-bg: transparent;
- --bs-btn-disabled-border-color: #<?= $palette[6] ?>77;
- --bs-gradient: none;
- }
-
- .progress {
- background-color: #<?= $palette[2] ?> !important;
- }
-
- .progress-bar.bg-success {
- background-color: #<?= $palette[9] ?> !important;
- }
-
- .progress-bar.bg-danger {
- background-color: #<?= $palette[7] ?> !important;
- }
-
- .card {
- background-color: #<?= $palette[2] ?> !important;
- border-color: #<?= $palette[5] ?> !important;
- }
-
- .form-control, .form-control:focus, .form-select, .form-select:focus, .form-check-input, .form-check-input:focus {
- color: var(--bs-body-color);
- background-color: #<?= $palette[2] ?> !important;
- border-color: #<?= $palette[3] ?> !important;
- }
-
- .form-check-input:checked, .form-check-input:checked:focus {
- background-color: #<?= $palette[9] ?> !important;
- border-color: #<?= $palette[9] ?> !important;
- }
-
- .form-control:focus, .form-select:focus, .form-check-input:focus {
- box-shadow: 0 0 0 0.25rem rgba(<?= rgb($palette[9]) ?>, .25);
- transition: box-shadow 200ms;
- }
-
- .form-control::placeholder, .form-select::placeholder {
- color: #<?= $palette[6] ?>77;
- }
-
- .modal {
- --bs-modal-bg: #<?= $palette[1] ?> !important;
- --bs-modal-header-border-color: #<?= $palette[3] ?> !important;
- }
-
- .card {
- --bs-card-bg: #<?= $palette[1] ?> !important;
- }
-
- .btn-close {
- background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23<?= $palette[6] ?>'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
- opacity: 1 !important;
- }
-
- .antialias, #new-homepage img, #hpd-other img, #hpd-raindrops img, .ck img, #system-info img, #member-card img {
- image-rendering: auto !important;
- }
-
- #member-relations img {
- image-rendering: pixelated !important;
- }
-
- .btn-close:hover {
- opacity: .75 !important;
- }
-
- .btn-close:active {
- opacity: .5 !important;
- }
-
- .ck-editor {
- color: var(--bs-black);
- }
-
- .alert-primary a, .alert-danger a, .alert-success a, .alert-warning a {
- color: var(--bs-body-bg);
- }
-
- #plus-box, #plus-box > div > div > div > span, #plus-box h2 {
- color: var(--bs-body-color);
- }
-
- #plus-box {
- background: #<?= $palette[2] ?> !important;
- }
-
- #plus-box > div {
- background-image: none !important;
- }
- }
- </style>
- <?php } ?>
-
- <?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/components/2023ui.inc"; ?>
-<?php $GLOBALS["ColdHazePerformance"]["header"] = (microtime(true) - $start) * 1000; $start = microtime(true); ?>
-<main id="app" style="background-color: var(--palette-0);">
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&nbsp;<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>
diff --git a/includes/components/timeline.inc b/includes/components/timeline.inc
deleted file mode 100644
index 21e82a2..0000000
--- a/includes/components/timeline.inc
+++ /dev/null
@@ -1,119 +0,0 @@
-<?php
-
-
-function displayTimeline($systems) { global $app; $showIcons = count($systems) > 1; ?>
- <table style="margin-top: 10px; width: 100%; margin-bottom: 10px;table-layout:fixed;">
- <thead>
- <tr class="row-desktop">
- <?php if ($showIcons): ?><th colspan="20"></th><?php endif; ?>
- <th class="dynamic-time timeline-indicator" data-time="<?= time() - 3600 * 6 ?>" colspan="60" style="text-align: right; padding-right: 10px; border-right: 1px solid rgba(255, 255, 255, 0.5);"><?= date('H:i', time() - 3600 * 6) ?></th>
- <th class="dynamic-time timeline-indicator" data-time="<?= time() - 3600 * 5 ?>" colspan="60" style="text-align: right; padding-right: 10px; border-right: 1px solid rgba(255, 255, 255, 0.5);"><?= date('H:i', time() - 3600 * 5) ?></th>
- <th class="dynamic-time timeline-indicator" data-time="<?= time() - 3600 * 4 ?>" colspan="60" style="text-align: right; padding-right: 10px; border-right: 1px solid rgba(255, 255, 255, 0.5);"><?= date('H:i', time() - 3600 * 4) ?></th>
- <th class="dynamic-time timeline-indicator" data-time="<?= time() - 3600 * 3 ?>" colspan="60" style="text-align: right; padding-right: 10px; border-right: 1px solid rgba(255, 255, 255, 0.5);"><?= date('H:i', time() - 3600 * 3) ?></th>
- <th class="dynamic-time timeline-indicator" data-time="<?= time() - 3600 * 2 ?>" colspan="60" style="text-align: right; padding-right: 10px; border-right: 1px solid rgba(255, 255, 255, 0.5);"><?= date('H:i', time() - 3600 * 2) ?></th>
- <th class="dynamic-time timeline-indicator" data-time="<?= time() - 3600 * 1 ?>" colspan="60" style="text-align: right; padding-right: 10px; border-right: 1px solid rgba(255, 255, 255, 0.5);"><?= date('H:i', time() - 3600 * 1) ?></th>
- <th class="dynamic-time timeline-indicator" data-time="<?= time() ?>" colspan="60" style="text-align: right; padding-right: 10px; border-right: 1px solid rgba(255, 255, 255, 0.5);"><?= date('H:i', time()) ?></th>
- </tr>
- <tr class="row-mobile">
- <?php if ($showIcons): ?><th colspan="20"></th><?php endif; ?>
- <th class="dynamic-time-mobile timeline-indicator" data-time="<?= time() - 3600 * 6 ?>" colspan="60" style="text-align: right; padding-right: 10px; border-right: 1px solid rgba(255, 255, 255, 0.5);"><?= date('H:', time() - 3600 * 6) ?></th>
- <th class="dynamic-time-mobile timeline-indicator" data-time="<?= time() - 3600 * 5 ?>" colspan="60" style="text-align: right; padding-right: 10px; border-right: 1px solid rgba(255, 255, 255, 0.5);"><?= date('H:', time() - 3600 * 5) ?></th>
- <th class="dynamic-time-mobile timeline-indicator" data-time="<?= time() - 3600 * 4 ?>" colspan="60" style="text-align: right; padding-right: 10px; border-right: 1px solid rgba(255, 255, 255, 0.5);"><?= date('H:', time() - 3600 * 4) ?></th>
- <th class="dynamic-time-mobile timeline-indicator" data-time="<?= time() - 3600 * 3 ?>" colspan="60" style="text-align: right; padding-right: 10px; border-right: 1px solid rgba(255, 255, 255, 0.5);"><?= date('H:', time() - 3600 * 3) ?></th>
- <th class="dynamic-time-mobile timeline-indicator" data-time="<?= time() - 3600 * 2 ?>" colspan="60" style="text-align: right; padding-right: 10px; border-right: 1px solid rgba(255, 255, 255, 0.5);"><?= date('H:', time() - 3600 * 2) ?></th>
- <th class="dynamic-time-mobile timeline-indicator" data-time="<?= time() - 3600 * 1 ?>" colspan="60" style="text-align: right; padding-right: 10px; border-right: 1px solid rgba(255, 255, 255, 0.5);"><?= date('H:', time() - 3600 * 1) ?></th>
- <th class="dynamic-time-mobile timeline-indicator" data-time="<?= time() ?>" colspan="60" style="text-align: right; padding-right: 10px; border-right: 1px solid rgba(255, 255, 255, 0.5);"><?= date('H:', time()) ?></th>
- </tr>
- </thead>
- <tbody>
- <?php foreach ($systems as $system): ?>
- <tr style="height: <?= count($systems) === 1 ? 50 : 30 ?>px;">
- <?php if ($showIcons): ?><td colspan="20">
- <a href="/<?= $system === "gdapd" ? "raindrops" : ($system === "hrbom" ? "moonglow" : $app["other"]["slug"]) ?>" style="width: 100%; height: 30px; display: flex; align-items: center; justify-content: center;">
- <img alt="" style="border-radius: 5px; height: 24px; text-align: center;" src="<?= getAsset($system) ?>">
- </a>
- </td><?php endif; ?>
- <?php
-
- $leftCols = 420;
-
- $time = time() - 3600 * 7;
- $switches = [
- ...array_reverse(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$system/switches.json"), true)),
- [
- 'id' => '00000000-0000-0000-0000-000000000000',
- 'timestamp' => date('c', time() + 3600),
- 'members' => []
- ]
- ];
-
- foreach ($switches as $index => $switch) {
- if (strtotime($switch["timestamp"]) >= $time) {
- $correct = $switches[$index - 1] ?? [
- "members" => [],
- "timestamp" => date('c', 0)
- ];
- $v = floor((strtotime($switch["timestamp"]) - $time) / 60);
-
- if (count($correct["members"]) > 0) {
- echo('<td style="max-width: 100%; overflow: hidden; text-align: left; white-space: nowrap; padding: 0 15px; height: ' . 50 / count($systems) . 'px; background-color: #' . (getMemberWithoutSystem($correct["members"][0])["color"] ?? "000000") . '80;" colspan="' . ($v > $leftCols ? $leftCols : $v) . '"><a style="color: white; cursor: pointer; text-decoration: none; width: 100%; display: flex; height: ' . 50 / count($systems) . 'px; align-items: center; justify-content: left;" href="/' . getMemberWithoutSystem($correct["members"][0])["name"] . '">' . implode(", ", array_map(function ($i) {
- return getMemberWithoutSystem($i)["display_name"] ?? getMemberWithoutSystem($i)["name"] ?? $i;
- }, $correct["members"])) . '</a></td>');
- } else {
- echo('<td style="max-width: 100%; overflow: hidden; text-align: left; white-space: nowrap; padding: 0 15px; height: ' . 50 / count($systems) . 'px; background-color: transparent;" colspan="' . ($v > $leftCols ? $leftCols : $v) . '"></td>');
- }
-
- $leftCols -= $v; if ($leftCols < 0) $leftCols = 0;
- $time = strtotime($switch["timestamp"]);
- }
- }
-
- ?>
- </tr>
- <?php endforeach; ?>
- <tr class="row-desktop">
- <?php if ($showIcons): ?><td colspan="20"></td><?php endif; ?>
- <td class="timeline-indicator" colspan="60" style="text-align: right; padding-right: 10px; border-right: 1px solid rgba(255, 255, 255, 0.5);">6 hours ago</td>
- <td class="timeline-indicator" colspan="60" style="text-align: right; padding-right: 10px; border-right: 1px solid rgba(255, 255, 255, 0.5);">5 hours ago</td>
- <td class="timeline-indicator" colspan="60" style="text-align: right; padding-right: 10px; border-right: 1px solid rgba(255, 255, 255, 0.5);">4 hours ago</td>
- <td class="timeline-indicator" colspan="60" style="text-align: right; padding-right: 10px; border-right: 1px solid rgba(255, 255, 255, 0.5);">3 hours ago</td>
- <td class="timeline-indicator" colspan="60" style="text-align: right; padding-right: 10px; border-right: 1px solid rgba(255, 255, 255, 0.5);">2 hours ago</td>
- <td class="timeline-indicator" colspan="60" style="text-align: right; padding-right: 10px; border-right: 1px solid rgba(255, 255, 255, 0.5);">1 hour ago</td>
- <td class="timeline-indicator" colspan="60" style="text-align: right; padding-right: 10px; border-right: 1px solid rgba(255, 255, 255, 0.5);">Now</td>
- </tr>
- <tr class="row-mobile">
- <?php if ($showIcons): ?><td colspan="20"></td><?php endif; ?>
- <td class="timeline-indicator" colspan="60" style="text-align: right; padding-right: 10px; border-right: 1px solid rgba(255, 255, 255, 0.5);">-6h</td>
- <td class="timeline-indicator" colspan="60" style="text-align: right; padding-right: 10px; border-right: 1px solid rgba(255, 255, 255, 0.5);">-5h</td>
- <td class="timeline-indicator" colspan="60" style="text-align: right; padding-right: 10px; border-right: 1px solid rgba(255, 255, 255, 0.5);">-4h</td>
- <td class="timeline-indicator" colspan="60" style="text-align: right; padding-right: 10px; border-right: 1px solid rgba(255, 255, 255, 0.5);">-3h</td>
- <td class="timeline-indicator" colspan="60" style="text-align: right; padding-right: 10px; border-right: 1px solid rgba(255, 255, 255, 0.5);">-2h</td>
- <td class="timeline-indicator" colspan="60" style="text-align: right; padding-right: 10px; border-right: 1px solid rgba(255, 255, 255, 0.5);">-1h</td>
- <td class="timeline-indicator" colspan="60" style="text-align: right; padding-right: 10px; border-right: 1px solid rgba(255, 255, 255, 0.5);">Now</td>
- </tr>
- <tr>
- <?php for ($i = 0; $i < 420; $i++): ?><td></td><?php endfor; ?>
- </tr>
- </tbody>
- </table>
-
- <style>
- .row-mobile {
- display: none !important;
- }
-
- .row-desktop {
- display: table-row !important;
- }
-
- @media (max-width: 991px) {
- .row-desktop {
- display: none !important;
- }
-
- .row-mobile {
- display: table-row !important;
- }
- }
- </style>
-<?php } \ No newline at end of file