diff options
Diffstat (limited to 'includes')
-rw-r--r-- | includes/components/details.inc | 10 | ||||
-rw-r--r-- | includes/fragments/metadata.inc | 2 | ||||
-rw-r--r-- | includes/util/banner.inc | 2 |
3 files changed, 11 insertions, 3 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='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23000000' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%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='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23000000' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%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>' ]; } |