diff options
Diffstat (limited to 'templates/note/info_line.php')
| -rw-r--r-- | templates/note/info_line.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/templates/note/info_line.php b/templates/note/info_line.php new file mode 100644 index 0000000..acc85d7 --- /dev/null +++ b/templates/note/info_line.php @@ -0,0 +1,28 @@ +<?php + +use Digitigrade\Model\NotePrivacyScope; + +?> +<div class="infoLine"> + <a class="authorName" + href="/@/<?= htmlspecialchars($note->author->getFullHandle()) ?>"><?= htmlspecialchars($note->author->displayName) ?></a> + <span class="authorPronouns"> + <?php if (isset($note->author->pronouns) && trim($note->author->pronouns) != '') { + echo htmlspecialchars($note->author->pronouns); + } ?> + </span> + <a class="timestamp" href="<?= htmlspecialchars($note->getLocalUiHref()) ?>"> + <?= format_datetime($note->created) ?> + </a> + <span class="privacyScope inlineIcon material-symbols <?= match ($note->privacy->scope) { + NotePrivacyScope::NONE => 'lock', + NotePrivacyScope::MUTUALS => 'group', + NotePrivacyScope::FOLLOWERS => 'groups', + NotePrivacyScope::PUBLIC => 'public' + } ?>" title="<?= match ($note->privacy->scope) { + NotePrivacyScope::NONE => __('note.privacy.scope.none'), + NotePrivacyScope::MUTUALS => __('note.privacy.scope.mutuals'), + NotePrivacyScope::FOLLOWERS => __('note.privacy.scope.followers'), + NotePrivacyScope::PUBLIC => __('note.privacy.scope.public') + } ?>"></span> +</div>
\ No newline at end of file |
