From 916d4521cb595493bc5df8b7f9ef52310b6d013a Mon Sep 17 00:00:00 2001
From: winter
Date: Mon, 23 Dec 2024 22:17:41 +0000
Subject: actor profile page
---
templates/actor_avatar.php | 4 ++++
templates/actor_profile.php | 11 +++++++++++
templates/actor_profile_page.php | 16 ++++++++++++++++
templates/note.php | 12 +++---------
templates/skeleton.php | 4 +++-
5 files changed, 37 insertions(+), 10 deletions(-)
create mode 100644 templates/actor_avatar.php
create mode 100644 templates/actor_profile.php
create mode 100644 templates/actor_profile_page.php
(limited to 'templates')
diff --git a/templates/actor_avatar.php b/templates/actor_avatar.php
new file mode 100644
index 0000000..d428006
--- /dev/null
+++ b/templates/actor_avatar.php
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/templates/actor_profile.php b/templates/actor_profile.php
new file mode 100644
index 0000000..45a0a59
--- /dev/null
+++ b/templates/actor_profile.php
@@ -0,0 +1,11 @@
+
+
+ $actor]); ?>
+
+
= $actor->displayName ?>
+
@= $actor->getFullHandle() ?>
+
Joined on = $actor->created->format('Y-m-d') ?>
+
+
+
= $actor->bio ?>
+
\ No newline at end of file
diff --git a/templates/actor_profile_page.php b/templates/actor_profile_page.php
new file mode 100644
index 0000000..e745433
--- /dev/null
+++ b/templates/actor_profile_page.php
@@ -0,0 +1,16 @@
+ "$actor->displayName - @" . $actor->getFullHandle(),
+ 'renderTitleHeading' => false
+], function () {
+ global $actor;
+ call_template('actor_profile', ['actor' => $actor]);
+ echo '
';
+ $notes = Note::findAllWithAuthor($actor, 50);
+ foreach ($notes as $n) {
+ call_template('note', ['note' => $n]);
+ }
+});
\ No newline at end of file
diff --git a/templates/note.php b/templates/note.php
index 9c4f609..6fcb477 100644
--- a/templates/note.php
+++ b/templates/note.php
@@ -1,17 +1,11 @@
-author->handle . ($note->author->isLocal ? '' : '@' . hostname_from_uri($note->author->uri));
-?>
-
-
-
-
-
+
+ $note->author]); ?>
= $note->author->displayName ?>
- @= $fullHandle ?>
+ @= $note->author->getFullHandle() ?>
=
$note->created->format('Y-m-d \a\t H:i')
diff --git a/templates/skeleton.php b/templates/skeleton.php
index 8a7fdf1..acf86bf 100644
--- a/templates/skeleton.php
+++ b/templates/skeleton.php
@@ -18,7 +18,9 @@
- = $pageTitle ?>
+
+ = $pageTitle ?>
+