diff options
Diffstat (limited to 'includes/details.inc')
-rw-r--r-- | includes/details.inc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/includes/details.inc b/includes/details.inc index aced1ac..323352d 100644 --- a/includes/details.inc +++ b/includes/details.inc @@ -1,5 +1,5 @@ -<?php global $isLoggedIn; global $metadata; global $memberData; global $lang; global $pages; $pronouns = getMemberPronouns($memberData['pronouns']); ?> -<div id="member-details" class="<?= $isLoggedIn ? 'member-details-loggedIn' : '' ?>" style="<?php if (!$isLoggedIn): ?>grid-template-columns: repeat(4, 1fr);<?php endif; ?> background-color: <?= isset($memberData["color"]) ? '#' . $memberData["color"] . "33" : "transparent" ?>; margin-left: -20px; margin-right: -20px;"> +<?php global $isLoggedIn; global $metadata; global $memberData; global $isLowerLoggedIn; global $lang; global $pages; $pronouns = getMemberPronouns($memberData['pronouns']); ?> +<div id="member-details" class="<?= ($isLoggedIn || $isLowerLoggedIn) ? 'member-details-loggedIn' : '' ?>" style="<?php if (!$isLoggedIn && !$isLowerLoggedIn): ?>grid-template-columns: repeat(4, 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"]) { @@ -17,10 +17,10 @@ 2 => "<span data-bs-toggle='tooltip' title='" . str_replace("'", "'", ucfirst($pronouns["subjective"])) . ($pronouns["third"] ? " shares" : " share") . " all memories with " . str_replace("'", "'", $pronouns["possessive_det"]) . " headmates.'>" . $lang["details"]["memory_states"][2] . "</span>", } ?> </div> - <?php if ($isLoggedIn): ?> + <?php if ($isLoggedIn || $isLowerLoggedIn): ?> <div> <b>Age:</b><span class="member-small-separator"><br></span> - <?php if (!isset($metadata["birth"]["year"])): ?> + <?php if (!isset($metadata["birth"]["year"]) || $metadata["birth"]["age"] > 0): ?> <?php if ($metadata["birth"]["age"] === -1): $age = abs(log(0)); // => INF ?> <?= "<span data-bs-toggle='tooltip' title='" . str_replace("'", "'", ucfirst($pronouns["subjective"])) . " never age" . str_replace("'", "'", $pronouns["third"] ? "s" : "") . " and " . str_replace("'", "'", $pronouns["third"] ? "doesn't" : "don't") . " have a defined age, making " . str_replace("'", "'", $pronouns["object"]) . " pretty much eternal.'>Eternal</span>" ?> <?php elseif ($metadata["birth"]["age"] <= 0): ?> @@ -70,9 +70,10 @@ <?php endif; ?> </div> </div> -<?php if ($isLoggedIn): ?> -<div id="member-details-2" style="background-color: <?= isset($memberData["color"]) ? '#' . $memberData["color"] . "33" : "transparent" ?>; margin-left: -20px; margin-right: -20px;"> +<?php if ($isLoggedIn || $isLowerLoggedIn): ?> +<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 if (((isset($age) && $age >= 16 && $metadata["little"] === 0) || (!isset($age) && $metadata["little"] === 0)) || $metadata["sexual_features"]): ?> + <?php if ($isLoggedIn): ?> <div> <span style="vertical-align: middle;"> <b>Sexual consent:</b><span class="member-small-separator"><br></span> @@ -86,6 +87,7 @@ <img src="/assets/icons/warning.svg" style="width: 16px;" title="Although this pony is able to engage in sexual relationships, they are not allowed to have sex with ponies who are over 16 years old." data-bs-toggle="tooltip"> <?php endif; ?> </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"]) { @@ -110,7 +112,7 @@ <div> <style> #member-details-2 { - grid-template-columns: 2fr 1fr 1fr; + 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 member is too young to be in a sexual relationship.</div> |