From 61b122e88cc6783b4d0cf5142a22002f8e558c60 Mon Sep 17 00:00:00 2001 From: winter Date: Sat, 15 Mar 2025 18:35:59 +0000 Subject: implement pages --- templates/note.php | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'templates/note.php') diff --git a/templates/note.php b/templates/note.php index 759a7c7..c80eace 100644 --- a/templates/note.php +++ b/templates/note.php @@ -17,7 +17,7 @@ if ($user != null) { $interactions = $note->getInteractionsWithAuthor($user->actor); $interKinds = array_map(fn($inter) => $inter->kind, $interactions); } -$pathToSelf = '/@/' . $note->author->getFullHandle() . '/note/' . $note->id; +$pathToSelf = $note->getLocalUiHref(); ?>
@@ -36,9 +36,9 @@ $pathToSelf = '/@/' . $note->author->getFullHandle() . '/note/' . $note->id; } ?> - created, $prefs?->get('locale.timezone')) + created) . (isset($note->modified) && $note->modified != $note->created - ? ' (' . format_datetime($note->modified, $prefs?->get('locale.timezone')) . ')' + ? ' (' . format_datetime($note->modified) . ')' : '' ) ?> @@ -81,7 +81,11 @@ $pathToSelf = '/@/' . $note->author->getFullHandle() . '/note/' . $note->id; summary) ?>
- getBestContentAsHtml() ?> + hasPage()): ?> + getPage()->title)) ?> + + getBestContentAsHtml() ?> +
attachments) > 0): ?> @@ -105,6 +109,13 @@ $pathToSelf = '/@/' . $note->author->getFullHandle() . '/note/' . $note->id; + hasPage()): ?> + + + + + +