From d5a57276eb27e215dd0b1bd5eb67ac26acc9575b Mon Sep 17 00:00:00 2001 From: winter Date: Tue, 24 Dec 2024 15:32:56 +0000 Subject: more stuff and things --- templates/actor_profile.php | 6 +++++- templates/actor_profile_page.php | 3 +++ templates/note.php | 4 ++-- templates/placeholder_text.php | 1 + templates/thread_page.php | 8 ++++++++ 5 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 templates/placeholder_text.php create mode 100644 templates/thread_page.php (limited to 'templates') diff --git a/templates/actor_profile.php b/templates/actor_profile.php index 0d99d05..f721fc8 100644 --- a/templates/actor_profile.php +++ b/templates/actor_profile.php @@ -13,5 +13,9 @@ -

bio ?>

+ bio) && $actor->bio != '') { ?> +

bio ?>

+ "This user hasn't written a bio yet."]); + } ?> \ No newline at end of file diff --git a/templates/actor_profile_page.php b/templates/actor_profile_page.php index e745433..ffa94e3 100644 --- a/templates/actor_profile_page.php +++ b/templates/actor_profile_page.php @@ -10,6 +10,9 @@ call_template('skeleton', [ call_template('actor_profile', ['actor' => $actor]); echo '
'; $notes = Note::findAllWithAuthor($actor, 50); + if (count($notes) == 0) { + call_template('placeholder_text', ['message' => "This user hasn't posted anything yet."]); + } foreach ($notes as $n) { call_template('note', ['note' => $n]); } diff --git a/templates/note.php b/templates/note.php index 6e718f5..8887afb 100644 --- a/templates/note.php +++ b/templates/note.php @@ -6,7 +6,7 @@
author->displayName ?> @author->getFullHandle() ?> - + created->format('Y-m-d \a\t H:i') . (isset($note->modified) && $note->modified != $note->created @@ -14,7 +14,7 @@ : '' ) ?> - +
getFormattedContent('text/html') ?? htmlspecialchars($note->plainContent) ?> diff --git a/templates/placeholder_text.php b/templates/placeholder_text.php new file mode 100644 index 0000000..b27e490 --- /dev/null +++ b/templates/placeholder_text.php @@ -0,0 +1 @@ +

\ No newline at end of file diff --git a/templates/thread_page.php b/templates/thread_page.php new file mode 100644 index 0000000..73d8f0b --- /dev/null +++ b/templates/thread_page.php @@ -0,0 +1,8 @@ + '"' . $note->plainContent . '" - @' . $note->author->getFullHandle(), + 'renderTitleHeading' => false +], function () { + global $note; + call_template('note', ['note' => $note]); +}); \ No newline at end of file -- cgit v1.3