diff options
| author | winter | 2025-02-14 22:47:05 +0000 |
|---|---|---|
| committer | winter | 2025-02-14 22:47:05 +0000 |
| commit | 65dfe7aff06dfd3b044a5deb47b03d643c651ec1 (patch) | |
| tree | d86894a978336edaeb269a25944c1ed2dacc80e3 /templates | |
| parent | 5af36fccc0904cf743e3d598813d246e3fa52634 (diff) | |
add pronouns to profiles and notes
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/actor_profile.php | 1 | ||||
| -rw-r--r-- | templates/actor_profile_editable.php | 13 | ||||
| -rw-r--r-- | templates/note.php | 7 |
3 files changed, 17 insertions, 4 deletions
diff --git a/templates/actor_profile.php b/templates/actor_profile.php index 4692a53..ca19978 100644 --- a/templates/actor_profile.php +++ b/templates/actor_profile.php @@ -16,6 +16,7 @@ $user = UserAccount::findByCurrentSession(); <div> <div class="displayName"><?= htmlspecialchars($actor->displayName) ?></div> + <div class="pronouns"><?= htmlspecialchars($actor->pronouns) ?></div> <div class="handle">@<?= $actor->getFullHandle() ?></div> <div class="joinedDate"><?= sprintf(__('user.profile.createdAt'), $actor->created->format('Y-m-d')) ?> </div> diff --git a/templates/actor_profile_editable.php b/templates/actor_profile_editable.php index 1370e53..6ff5d8c 100644 --- a/templates/actor_profile_editable.php +++ b/templates/actor_profile_editable.php @@ -3,9 +3,16 @@ <?php call_template('actor_avatar', ['actor' => $actor]); ?> <div> <div class="row"> - <label for="profileDisplayName"><?= __('user.profile.displayName') ?></label> - <input id="profileDisplayName" name="displayName" type="text" required - value="<?= $actor->displayName ?>"> + <div class="column"> + <label for="profileDisplayName"><?= __('user.profile.displayName') ?></label> + <input id="profileDisplayName" name="displayName" type="text" required + value="<?= htmlspecialchars($actor->displayName) ?>"> + </div> + <div class="column"> + <label for="profilePronouns"><?= __('user.profile.pronouns') ?></label> + <input id="profilePronouns" name="pronouns" type="text" + value="<?= htmlspecialchars($actor->pronouns) ?>"> + </div> </div> <div class="handle">@<?= $actor->getFullHandle() ?></div> <div class="joinedDate"><?= sprintf(__('user.profile.createdAt'), $actor->created->format('Y-m-d')) ?></div> diff --git a/templates/note.php b/templates/note.php index 736d5f9..81f7e38 100644 --- a/templates/note.php +++ b/templates/note.php @@ -25,7 +25,12 @@ if ($user != null) { <div class="infoLine"> <a class="authorName" href="/@/<?= htmlspecialchars($note->author->getFullHandle()) ?>"><?= htmlspecialchars($note->author->displayName) ?></a> - <span class="authorHandle">@<?= htmlspecialchars($note->author->getFullHandle()) ?></span> + <span class="authorHandle"> + <?php if (isset($note->author->pronouns) && trim($note->author->pronouns) != ''): ?> + <?= htmlspecialchars($note->author->pronouns) ?> • + <?php endif; ?> + @<?= htmlspecialchars($note->author->getFullHandle()) ?> + </span> <a class="timestamp" href="/@/<?= htmlspecialchars($note->author->getFullHandle()) ?>/note/<?= $note->id ?>"> <?= format_datetime($note->created, $prefs?->get('locale.timezone')) |
