From 6b796258d413f00e498ce7f80f73a9f6c061f29c Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Sat, 30 Mar 2024 23:40:33 +0100 Subject: Updated 5 files, added 2 files, deleted 495 files and renamed 7 files (automated) --- includes/components/2023ui.inc | 187 --------------- includes/components/footer.inc | 30 --- includes/components/fullbanner.inc | 7 - includes/components/header.inc | 475 ------------------------------------- includes/components/sysbanner.inc | 65 ----- includes/components/timeline.inc | 119 ---------- 6 files changed, 883 deletions(-) delete mode 100644 includes/components/2023ui.inc delete mode 100644 includes/components/footer.inc delete mode 100644 includes/components/fullbanner.inc delete mode 100644 includes/components/header.inc delete mode 100644 includes/components/sysbanner.inc delete mode 100644 includes/components/timeline.inc (limited to 'includes/components') 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 @@ - - - - - - - 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 @@ - - - -

- - - - -
- - - - 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 @@ - - -
- - \ 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 @@ - 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"; - -?> - - - - - - - - - - - - <?= $title && $title !== "-" ? $title . " ยท " : "" ?>Ponycule - - - - - "); - - 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(""); - 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]); ?> - - - - - -
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 @@ - - -
padding-top: 15px;"> -
-
- -

-
- - members
0): ?>Leader 1 ? "s" : "" ?>: $leader): ?>" class="member-link">"> -
-
-
-
-
- -
-
- - -
-
- Last switch "> -
- " data-bs-toggle="tooltip" style="display:inline-block;padding:5px 10px;text-align: center" class="system-action tooltip-nohelp" href="//-/history"> - " style="vertical-align: middle;height: 24px;width: 24px;" alt=""> - - -
-
-
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 @@ - 1; ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - '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(''); - } else { - echo(''); - } - - $leftCols -= $v; if ($leftCols < 0) $leftCols = 0; - $time = strtotime($switch["timestamp"]); - } - } - - ?> - - - - - - - - - - - - - - - - - - - - - - - - - - -
- " style="width: 100%; height: 30px; display: flex; align-items: center; justify-content: center;"> - - - ' . implode(", ", array_map(function ($i) { - return getMemberWithoutSystem($i)["display_name"] ?? getMemberWithoutSystem($i)["name"] ?? $i; - }, $correct["members"])) . '
6 hours ago5 hours ago4 hours ago3 hours ago2 hours ago1 hour agoNow
-6h-5h-4h-3h-2h-1hNow
- - -