summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaindropsSys <contact@minteck.org>2023-06-01 14:55:45 +0200
committerRaindropsSys <contact@minteck.org>2023-06-01 14:55:45 +0200
commit82ef2e6f4fadb6ed721a0de79ec4d2fcfdc3f426 (patch)
treea192e62111c727a6dc6204cb7188e1c5ed006486
parent1c7477be214a95d7c551e627b11d1d63fe82a553 (diff)
downloadpluralconnect-82ef2e6f4fadb6ed721a0de79ec4d2fcfdc3f426.tar.gz
pluralconnect-82ef2e6f4fadb6ed721a0de79ec4d2fcfdc3f426.tar.bz2
pluralconnect-82ef2e6f4fadb6ed721a0de79ec4d2fcfdc3f426.zip
Updated 4 files (automated)
-rw-r--r--includes/components/details.inc10
-rw-r--r--includes/fragments/metadata.inc2
-rw-r--r--includes/util/banner.inc2
-rw-r--r--pages/home.inc2
4 files changed, 12 insertions, 4 deletions
diff --git a/includes/components/details.inc b/includes/components/details.inc
index 7b02808..6b8ea64 100644
--- a/includes/components/details.inc
+++ b/includes/components/details.inc
@@ -89,6 +89,9 @@
<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;
@@ -96,7 +99,7 @@
echo "Straight";
break;
case "homo":
- echo $pronouns["subjective"] === "she" ? "Lesbian" : ($pronouns["subjective"] === "he" ? "Gay" : "Homosexual");
+ echo str_starts_with($memberData["pronouns"], "she") ? "Lesbian" : (str_starts_with($memberData["pronouns"], "he") ? "Gay" : "Homosexual");
break;
case "bi":
echo "Bisexual";
@@ -122,6 +125,9 @@
<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;
@@ -129,7 +135,7 @@
echo "Heteroromantic";
break;
case "homo":
- echo $pronouns["subjective"] === "she" ? "Lesbiromantic" : ($pronouns["subjective"] === "he" ? "Gay" : "Homoromantic");
+ echo str_starts_with($memberData["pronouns"], "she") ? "Lesbiromantic" : (str_starts_with($memberData["pronouns"], "he") ? "Gay" : "Homoromantic");
break;
case "bi":
echo "Biromantic";
diff --git a/includes/fragments/metadata.inc b/includes/fragments/metadata.inc
index 719abbc..cd022df 100644
--- a/includes/fragments/metadata.inc
+++ b/includes/fragments/metadata.inc
@@ -110,6 +110,7 @@ if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $member
<b>Alignment</b><br>
<div style="display: grid; grid-template-columns: repeat(2, 1fr); grid-gap: 10px;">
<select class="tooltip-nohelp form-select" style='display:inline-block;filter:invert(1) hue-rotate(180deg);background-image:url("data:image/svg+xml,%3csvg xmlns=&apos;http://www.w3.org/2000/svg&apos; viewBox=&apos;0 0 16 16&apos;%3e%3cpath fill=&apos;none&apos; stroke=&apos;%23000000&apos; stroke-linecap=&apos;round&apos; stroke-linejoin=&apos;round&apos; stroke-width=&apos;2&apos; d=&apos;M2 5l6 6 6-6&apos;/%3e%3c/svg%3e");' name="alignment[sexual]">
+ <option <?= $metadata["alignment"]["sexual"] === "unsure" ? "selected" : "" ?> value="unsure">Unsure</option>
<option <?= $metadata["alignment"]["sexual"] === "aroace" ? "selected" : "" ?> value="aroace">Asexual</option>
<option <?= $metadata["alignment"]["sexual"] === "hetero" ? "selected" : "" ?> value="hetero">Heterosexual</option>
<option <?= $metadata["alignment"]["sexual"] === "homo" ? "selected" : "" ?> value="homo">Homosexual</option>
@@ -118,6 +119,7 @@ if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $member
<option <?= $metadata["alignment"]["sexual"] === "poly" ? "selected" : "" ?> value="poly">Polysexual</option>
</select>
<select class="tooltip-nohelp form-select" style='display:inline-block;filter:invert(1) hue-rotate(180deg);background-image:url("data:image/svg+xml,%3csvg xmlns=&apos;http://www.w3.org/2000/svg&apos; viewBox=&apos;0 0 16 16&apos;%3e%3cpath fill=&apos;none&apos; stroke=&apos;%23000000&apos; stroke-linecap=&apos;round&apos; stroke-linejoin=&apos;round&apos; stroke-width=&apos;2&apos; d=&apos;M2 5l6 6 6-6&apos;/%3e%3c/svg%3e");' name="alignment[romantic]">
+ <option <?= $metadata["alignment"]["romantic"] === "unsure" ? "selected" : "" ?> value="unsure">Unsure</option>
<option <?= $metadata["alignment"]["romantic"] === "aroace" ? "selected" : "" ?> value="aroace">Aromantic</option>
<option <?= $metadata["alignment"]["romantic"] === "hetero" ? "selected" : "" ?> value="hetero">Heteroromantic</option>
<option <?= $metadata["alignment"]["romantic"] === "homo" ? "selected" : "" ?> value="homo">Homoromantic</option>
diff --git a/includes/util/banner.inc b/includes/util/banner.inc
index e30f064..388e4b1 100644
--- a/includes/util/banner.inc
+++ b/includes/util/banner.inc
@@ -340,7 +340,7 @@ function getMemberBannerData(string $id, string $system, bool $french = false) {
$badges[] = [
"id" => "leader",
"color" => "d6a833",
- "html" => '<span data-bs-toggle="tooltip" data-bs-html="true" title="<b>Leader</b><br>' . ucfirst(getMemberPronouns($member['pronouns'])["subjective"]) . ' ' . (getMemberPronouns($member['pronouns'])["third"] ? "is" : "are") . ' a leader in ' . getMemberPronouns($member['pronouns'])["possessive_det"] . ' system." class="badge rounded-pill" style="background-color:#fd7e14;height:24px;display: inline-flex;align-items: center;position: relative;top: 1px;"><span>Leader</span>'
+ "html" => '<span data-bs-toggle="tooltip" data-bs-html="true" title="<b>Leader</b><br>' . ucfirst(getMemberPronouns($member['pronouns'])["subjective"]) . ' ' . (getMemberPronouns($member['pronouns'])["third"] ? "is" : "are") . ' a leader in ' . getMemberPronouns($member['pronouns'])["possessive_det"] . ' system." class="badge rounded-pill" style="background-color:#fd7e14;height:24px;display: inline-flex;align-items: center;position: relative;top: 1px;"><span>Leader</span></span>'
];
}
diff --git a/pages/home.inc b/pages/home.inc
index 48c26da..f19d6f5 100644
--- a/pages/home.inc
+++ b/pages/home.inc
@@ -54,7 +54,7 @@ function members() { global $isLoggedIn; global $isLowerLoggedIn; global $app; ?
echo('<a style="text-decoration:none !important;filter:none !important;"><div class="hpd-item-card" style="background-color:rgba(255, 255, 255, .1);border:1px solid ' . (isset($member['color']) ? "#" . $member['color'] . "55" : "transparent") . ';outline-color:' . (isset($member['color']) ? "#" . $member['color'] . "55" : "transparent") . ';border-radius:10px;text-align:center;display:flex;align-items:center;justify-content:center;padding:5px;opacity:5;"><div>
<img alt="" src="' . $member["avatar"] . '" style="border-radius:999px;background-color:rgba(0, 0, 0, .25);height:48px;display:block;margin-left:auto;margin-right:auto;">
<div style="text-decoration:none;color:white;margin-top:5px;">' . ($member['name'] ?? $id) . '</div>
-<div style="text-decoration:none !important;color:white !important;">' . date('j M Y', strtotime($member["date"])) . '</div>
+<div style="text-decoration:none !important;color:white !important;">' . (isset($member['prefix']) ? "<code style='color:white;'>" . $member['prefix'] . "</code> ยท " : "") . date('j M Y', strtotime($member["date"])) . '</div>
</div></div></a>');
endforeach; ?>