diff options
author | RaindropsSys <raindrops@equestria.dev> | 2023-11-17 23:25:29 +0100 |
---|---|---|
committer | RaindropsSys <raindrops@equestria.dev> | 2023-11-17 23:25:29 +0100 |
commit | 953ddd82e48dd206cef5ac94456549aed13b3ad5 (patch) | |
tree | 8f003106ee2e7f422e5a22d2ee04d0db302e66c0 /includes/components | |
parent | 62a9199846b0c07c03218703b33e8385764f42d9 (diff) | |
download | pluralconnect-953ddd82e48dd206cef5ac94456549aed13b3ad5.tar.gz pluralconnect-953ddd82e48dd206cef5ac94456549aed13b3ad5.tar.bz2 pluralconnect-953ddd82e48dd206cef5ac94456549aed13b3ad5.zip |
Updated 30 files and deleted 2976 files (automated)
Diffstat (limited to 'includes/components')
-rw-r--r-- | includes/components/2023ui.inc | 12 | ||||
-rw-r--r-- | includes/components/details.inc | 197 | ||||
-rw-r--r-- | includes/components/fullbanner.inc | 7 | ||||
-rw-r--r-- | includes/components/header.inc | 2 | ||||
-rw-r--r-- | includes/components/timeline.inc | 7 |
5 files changed, 13 insertions, 212 deletions
diff --git a/includes/components/2023ui.inc b/includes/components/2023ui.inc index 7281cfc..8e9dc69 100644 --- a/includes/components/2023ui.inc +++ b/includes/components/2023ui.inc @@ -100,7 +100,6 @@ <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;">Cold Haze</span> - <span data-bs-toggle="tooltip" data-bs-placement="bottom" title="This is the new Cold Haze experience and it is currently experimental" class="badge bg-warning" style="margin-left: 5px; vertical-align: middle; position: relative; top: -1px; font-weight: bold;">Beta</span> </a> </div> <div style="display: flex; align-items: center;"> @@ -153,9 +152,9 @@ <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"] === "cloudburst" ? "ynmuc" : "other")) . "/fronters.json"), true); if (isset($fronters["members"][0])): ?> + <?php $fronters = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . ($_PROFILE["login"] === "raindrops" ? "gdapd" : ($_PROFILE["login"] === "cloudburst" ? "ynmuc" : ($_PROFILE["login"] === "Moonwind" ? "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"] === "cloudburst" ? "ynmuc" : "other")), $fronters["members"][0]["id"]) ?>" style="width: 32px; height: 32px; border-radius: 999px; background-color: var(--palette-2);"> + <img src="<?= getAsset(($_PROFILE["login"] === "raindrops" ? "gdapd" : ($_PROFILE["login"] === "cloudburst" ? "ynmuc" : ($_PROFILE["login"] === "Moonwind" ? "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);"> @@ -189,6 +188,9 @@ <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="Cloudburst System" class="ui2023-side-bar-system" href="/cloudburst" style="padding: 8px; height: 48px; width: 48px; display: block; border-bottom-left-radius: 999px; border-bottom-right-radius: 999px;"> + <img class="antialias" src="<?= getAsset("ynmuc") ?>" style="max-width: 32px; max-height: 32px;"> + </a> <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> @@ -197,8 +199,8 @@ <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="Cloudburst System" class="ui2023-side-bar-system" href="/cloudburst" style="padding: 8px; height: 48px; width: 48px; display: block; border-bottom-left-radius: 999px; border-bottom-right-radius: 999px;"> - <img class="antialias" src="<?= getAsset("ynmuc") ?>" style="max-width: 32px; max-height: 32px;"> + <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-top-left-radius: 999px; border-top-right-radius: 999px;"> + <img class="antialias" class="antialias" src="<?= getAsset("hrbom") ?>" style="max-width: 32px; max-height: 32px;"> </a> </div> diff --git a/includes/components/details.inc b/includes/components/details.inc deleted file mode 100644 index 39f8c21..0000000 --- a/includes/components/details.inc +++ /dev/null @@ -1,197 +0,0 @@ -<?php global $isLoggedIn; global $metadata; global $memberData; global $isLowerLoggedIn; global $systemID; global $app; global $lang; global $pages; $pronouns = getMemberPronouns($memberData['pronouns']); ?> -<?php /*if ($isLoggedIn && $memberData['id'] === "alily"): ?> -<div id="member-details-hazy" class="<?= (($isLoggedIn || $isLowerLoggedIn) && $systemID !== $app["other"]["id"]) ? 'member-details-loggedIn' : 'member-details-loggedIn2' ?>" style="<?php if (!$isLoggedIn && !$isLowerLoggedIn): ?>grid-template-columns: repeat(3, 1fr);<?php endif; ?> background-color: <?= isset($memberData["color"]) ? '#' . $memberData["color"] . "44" : "transparent" ?>; margin-left: -20px; margin-right: -20px; padding: 10px 20px;"> - <div style="display: grid; grid-template-columns: 128px 1fr;"> - <img id="member-icon2" src="data:image/png;base64,<?= base64_encode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/assets/uploads/hazy.png")) ?>" alt="" style="background-color:rgba(255, 255, 255, .125);width:128px;height:128px;border-radius:5px;"> - <div id="member-details-hazy2" style="display: flex; align-items: center; justify-content: center; text-align: center;"> - <div> - <h3 style="margin: 0;">Hazel Stardawn</h3> - <div style="margin-bottom:0.5rem;"></div> - <p style="margin: 0 10px;">This pony takes a human appearance when she is around <u><a href="/leah" class="member-link">Leah</a></u> or other humans in Cloudburst System. However, her pony appearance remains her preferred one and she will use it with other creatures and pony members of Cloudburst System.</p> - </div> - </div> - </div> -</div> - -<style> - @media (max-width: 700px) { - #member-details-hazy > div { - grid-template-columns: 46px 1fr !important; - } - - #member-details-hazy2 { - text-align: left !important; - justify-content: left !important; - } - - #member-icon2 { - width: 36px !important; - height: 36px !important; - border-radius: 999px !important; - } - - #member-details-hazy2 > div > p { - margin: 0 !important; - } - } -</style> - -<?php endif;*/ ?> -<div id="member-details" class="<?= (($isLoggedIn || $isLowerLoggedIn) && $systemID !== $app["other"]["id"]) ? 'member-details-loggedIn' : 'member-details-loggedIn2' ?>" style="<?php if (!$isLoggedIn && !$isLowerLoggedIn): ?>grid-template-columns: repeat(3, 1fr);<?php endif; ?> background-color: <?= isset($memberData["color"]) ? '#' . $memberData["color"] . "33" : "transparent" ?>; margin-left: -20px; margin-right: -20px;"> - <div> - <b><?= $lang["details"]["food"] ?></b><span class="member-small-separator"><br></span> - <?= match ($metadata["food"]) { - 0 => "<span data-bs-toggle='tooltip' title='This pony's species indicates that this pony doesn't need to eat food, therefore this pony can eat all foods.'>" . $lang["details"]["food_states"][0] . "</span>", - 1 => "<span data-bs-toggle='tooltip' title='This pony can't eat fish or meat.'>" . $lang["details"]["food_states"][1] . "</span>", - 2 => "<span data-bs-toggle='tooltip' title='This pony can't eat meat, but can eat fish.'>" . $lang["details"]["food_states"][2] . "</span>", - 3 => "<span data-bs-toggle='tooltip' title='This pony can eat all foods, meat and fish included.'>" . $lang["details"]["food_states"][3] . "</span>", - } ?> - </div> - <div> - <b><?= $lang["details"]["memory"] ?></b><span class="member-small-separator"><br></span> - <?= match ($metadata["shared_memory"]) { - 0 => "<span data-bs-toggle='tooltip' title='This pony doesn't directly share memories with this pony's headmates, but is able to (slowly) query them if that is needed.'>" . $lang["details"]["memory_states"][0] . "</span>", - 1 => "<span data-bs-toggle='tooltip' title='This pony doesn't directly share memories with this pony's headmates, but may be able to share certain memories and/or share memories at will.'>" . $lang["details"]["memory_states"][1] . "</span>", - 2 => "<span data-bs-toggle='tooltip' title='This pony shares all memories with this pony's headmates.'>" . $lang["details"]["memory_states"][2] . "</span>", - } ?> - </div> - <div> - <b>Age:</b><span class="member-small-separator"><br></span> - <?php if (!isset($metadata["birth"]["year"]) || $metadata["birth"]["age"] > 0 || $metadata["birth"]["age"] === -1): ?> - <?php if ($metadata["birth"]["age"] === -1): $age = abs(log(0)); // => INF ?> - <?= "<span data-bs-toggle='tooltip' title='This pony never ages and doesn't have a defined age, making this pony pretty much eternal.'>Eternal</span>" ?> - <?php elseif ($metadata["birth"]["age"] <= 0): ?> - - - <?php else: $age = $metadata["birth"]["age"]; if (is_numeric($metadata["birth"]["age"])): ?> - <?= "<span data-bs-toggle='tooltip' title='This pony doesn't age like the body does, making this pony stay " . $metadata["birth"]["age"] . " years old for this pony's entire life.'>" . $metadata["birth"]["age"] . "* years old</span>" ?> - <?php else: ?> - <?= "<span data-bs-toggle='tooltip' title='This pony's age changes frequently between " . explode("-", $metadata["birth"]["age"])[0] . " and " . explode("-", $metadata["birth"]["age"])[1] . " years old, and this 't have a single defined age.'>Sliding " . explode("-", $metadata["birth"]["age"])[0] . " to " . explode("-", $metadata["birth"]["age"])[1] . "</span>" ?> - <?php endif; endif; ?> - <?php else: ?> - <?php if ($metadata["birth"]["year"] <= 1900): ?> - - - <?php else: ?> - <?php - - $birthdate = $metadata["birth"]["year"] . date('-m-d'); - if (isset($metadata["birth"]["date"]) && trim($metadata["birth"]["date"]) !== "" && $metadata["birth"]["date"] !== "01-01") { - $birthdate = $metadata["birth"]["year"] . "-" . $metadata["birth"]["date"]; - } - - $age = (int)date('Y') - $metadata["birth"]["year"] + (strtotime(date('Y') . "-" . $metadata["birth"]["date"]) <= time() ? 0 : -1); - $age2 = floor((time() - strtotime($birthdate)) / 31557600); - $birthday = "as time passes"; - - if (isset($metadata["birth"]["date"]) && trim($metadata["birth"]["date"]) !== "" && $metadata["birth"]["date"] !== "01-01") { - $birthday = "every " . date('F jS', strtotime(date('Y') . "-" . $metadata["birth"]["date"])); - } - - ?> - <?= "<span data-bs-toggle='tooltip' title='$age2 with the old algorithm | This pony ages like the body does, making this pony stay " . $age . " years old for now, having this age change $birthday.'>" . $age . " years old</span>" ?> - <?php endif; ?> - <?php endif; ?> - </div> - <?php if ($systemID !== $app["other"]["id"]): ?> - <div> - <b>Primary interest:</b><span class="member-small-separator"><br></span> - <?php if (isset($metadata["interest"]) && trim($metadata["interest"]) !== ""): ?> - <?= trim($metadata["interest"]) ?> - <?php else: ?> - - - <?php endif; ?> - </div> - <?php endif ?> -<?php if ($systemID !== $app["other"]["id"]): ?> -</div> -<?php endif; ?> -<?php if ($isLoggedIn || $isLowerLoggedIn): ?> -<?php if ($systemID !== $app["other"]["id"]): ?> -<div id="member-details-2" style="background-color: <?= isset($memberData["color"]) ? '#' . $memberData["color"] . "33" : "transparent" ?>; margin-left: -20px; margin-right: -20px;<?php if ($isLowerLoggedIn): ?>grid-template-columns: repeat(3, 1fr);<?php endif; ?>"> -<?php endif; ?> - <?php $age2 = $age ?? 0; if (is_string($age2)) $age2 = (int)(explode("-", $age2)[1] ?? "0"); if (((isset($age2) && $age2 >= 15 && $metadata["little"] !== 1) || (!isset($age2) && $metadata["little"] !== 1)) || $metadata["sexual_features"]): ?> - <?php if ($isLoggedIn && $systemID !== $app["other"]["id"]): ?> - <div> - <span style="vertical-align: middle;"> - <b>Sexual consent:</b><span class="member-small-separator"><br></span> - <?php if ($metadata["sexually_active"]): ?> - <span title="Consent is assumed when having sex with this pony, however this pony may ask to not have sex at the moment and such request must be honored." data-bs-toggle="tooltip">Preemptive</span> - <?php else: ?> - <span title="Consent is absolutely required every time when having sex with this pony." data-bs-toggle="tooltip">Required</span> - <?php endif; ?> - </span> - </div> - <?php endif; ?> - <div> - <b><span class="member-detail-desktop">Sexual alignment</span><span class="member-detail-mobile">Sex. algn.</span>:</b><span class="member-small-separator"><br></span> - <?php switch ($metadata["alignment"]["sexual"]) { - case "unsure": - echo "Unsure"; - break; - case "aroace": - echo "Asexual"; - break; - case "hetero": - echo "Straight"; - break; - case "homo": - echo str_starts_with($memberData["pronouns"], "she") ? "Lesbian" : (str_starts_with($memberData["pronouns"], "he") ? "Gay" : "Homosexual"); - break; - case "bi": - echo "Bisexual"; - break; - case "pan": - echo "Pansexual"; - break; - case "poly": - echo "Polysexual"; - break; - } ?><?php if ($metadata["polyamorous"]["sexual"]): ?> (poly)<?php endif; ?> - </div> - <?php else: ?> - <div> - <style> - #member-details-2 { - grid-template-columns: <?= $isLowerLoggedIn ? "1fr 1fr 1fr" : "2fr 1fr 1fr" ?>; - } - </style> - <div style="display: flex; align-items: center; justify-content: center; height: 100%;opacity:.5;">This pony is too young to be in a sexual relationship.</div> - </div> - <?php endif; ?> - <div> - <b><span class="member-detail-desktop">Romantic alignment</span><span class="member-detail-mobile">Rom. algn.</span>:</b><span class="member-small-separator"><br></span> - <?php switch ($metadata["alignment"]["romantic"]) { - case "unsure": - echo "Unsure"; - break; - case "aroace": - echo "Aromantic"; - break; - case "hetero": - echo "Heteroromantic"; - break; - case "homo": - echo str_starts_with($memberData["pronouns"], "she") ? "Lesbiromantic" : (str_starts_with($memberData["pronouns"], "he") ? "Gay" : "Homoromantic"); - break; - case "bi": - echo "Biromantic"; - break; - case "pan": - echo "Panromantic"; - break; - case "poly": - echo "Polyromantic"; - break; - } ?><?php if ($metadata["polyamorous"]["romantic"]): ?> (poly)<?php endif; ?> - </div> - <?php if ($systemID !== $app["other"]["id"]): ?> - <div> - <b>Birthday:</b><span class="member-small-separator"><br></span> - <?php if (isset($metadata["birth"]["date"]) && trim($metadata["birth"]["date"]) !== "" && $metadata["birth"]["date"] !== "01-01"): ?> - <?= date('F jS', strtotime(date('Y') . "-" . $metadata["birth"]["date"])) ?> - <?php else: ?> - - - <?php endif; ?> - </div> - <?php endif; ?> -</div> -<?php endif; ?> diff --git a/includes/components/fullbanner.inc b/includes/components/fullbanner.inc index 99cdb53..8d3f4a1 100644 --- a/includes/components/fullbanner.inc +++ b/includes/components/fullbanner.inc @@ -2,14 +2,7 @@ <script> window.currentMemberData = JSON.parse(atob(`<?= base64_encode(json_encode(getMemberBannerData($memberID, $systemID))) ?>`)); </script> -<?php if ($memberData["name"] !== "unknown" && $memberData["name"] !== "fusion"): ?> - <div id="member-banner-container"> - <div id="member-banner"></div> - <?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/components/details.inc"; ?> - </div> -<?php else: ?> <div id="member-banner"></div> -<?php endif; ?> <script src="/assets/logo/banner.js"></script><script>refreshBanner(false, <?= $lang["_french"] ? "true" : "false" ?>)</script> diff --git a/includes/components/header.inc b/includes/components/header.inc index 1f7d012..5ab13dc 100644 --- a/includes/components/header.inc +++ b/includes/components/header.inc @@ -1,7 +1,7 @@ <?php global $title; global $pages; global $readOnly; $start = microtime(true); $useNewUI = !isset($_GET['old']); -$use2023UI = isset($_COOKIE["new2023UI"]) && !isset($_GET["no2023"]); +$use2023UI = !isset($_GET["no2023"]); global $use2023UI; if (!isset($_COOKIE["new2023UIctaFirstVisit"])) { diff --git a/includes/components/timeline.inc b/includes/components/timeline.inc index 3766073..bbda780 100644 --- a/includes/components/timeline.inc +++ b/includes/components/timeline.inc @@ -29,7 +29,7 @@ function displayTimeline($systems) { global $app; $showIcons = count($systems) > <?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 === "ynmuc" ? "cloudburst" : $app["other"]["slug"]) ?>" style="width: 100%; height: 30px; display: flex; align-items: center; justify-content: center;"> + <a href="/<?= $system === "gdapd" ? "raindrops" : ($system === "ynmuc" ? "cloudburst" : ($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; ?> @@ -49,7 +49,10 @@ function displayTimeline($systems) { global $app; $showIcons = count($systems) > foreach ($switches as $index => $switch) { if (strtotime($switch["timestamp"]) >= $time) { - $correct = $switches[$index - 1]; + $correct = $switches[$index - 1] ?? [ + "members" => [], + "timestamp" => date('c', 0) + ]; $v = floor((strtotime($switch["timestamp"]) - $time) / 60); if (count($correct["members"]) > 0) { |