diff options
| author | winter | 2025-03-15 18:53:29 +0000 |
|---|---|---|
| committer | winter | 2025-03-15 18:53:29 +0000 |
| commit | e0588a6113ff6b3c1000fa6c82629f81fb5e05b5 (patch) | |
| tree | ef6beb046a7dcc7542b88f0962d4e5e264895b7a /templates | |
| parent | 61b122e88cc6783b4d0cf5142a22002f8e558c60 (diff) | |
[refactor] move some templates to subdirs
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/actor/atom.php (renamed from templates/actor_atom.php) | 0 | ||||
| -rw-r--r-- | templates/actor/avatar.php (renamed from templates/actor_avatar.php) | 0 | ||||
| -rw-r--r-- | templates/actor/profile.php (renamed from templates/actor_profile.php) | 8 | ||||
| -rw-r--r-- | templates/actor/profile_block_button.php (renamed from templates/actor_profile_block_button.php) | 0 | ||||
| -rw-r--r-- | templates/actor/profile_editable.php (renamed from templates/actor_profile_editable.php) | 4 | ||||
| -rw-r--r-- | templates/actor/profile_follow_button.php (renamed from templates/actor_profile_follow_button.php) | 0 | ||||
| -rw-r--r-- | templates/actor/profile_page.php (renamed from templates/actor_profile_page.php) | 4 | ||||
| -rw-r--r-- | templates/actor/profile_pending_follow.php (renamed from templates/actor_profile_pending_follow.php) | 0 | ||||
| -rw-r--r-- | templates/actor/profile_reset_avatar.php (renamed from templates/actor_profile_reset_avatar.php) | 0 | ||||
| -rw-r--r-- | templates/actor/rss.php (renamed from templates/actor_rss.php) | 0 | ||||
| -rw-r--r-- | templates/follow_requests_page.php | 2 | ||||
| -rw-r--r-- | templates/mobilepane_left.php | 6 | ||||
| -rw-r--r-- | templates/navigation/header_links.php (renamed from templates/navigation_links.php) | 0 | ||||
| -rw-r--r-- | templates/navigation/left_side.php (renamed from templates/left_side_navigation.php) | 2 | ||||
| -rw-r--r-- | templates/navigation/side_links.php (renamed from templates/side_navigation.php) | 0 | ||||
| -rw-r--r-- | templates/note/attachment.php (renamed from templates/note_attachment.php) | 0 | ||||
| -rw-r--r-- | templates/note/attachment_pill.php (renamed from templates/attachment_pill.php) | 0 | ||||
| -rw-r--r-- | templates/note/link_preview.php (renamed from templates/note_link_preview.php) | 0 | ||||
| -rw-r--r-- | templates/note/note.php (renamed from templates/note.php) | 10 | ||||
| -rw-r--r-- | templates/note/reply_button.php (renamed from templates/reply_button.php) | 0 | ||||
| -rw-r--r-- | templates/note/reply_form.php (renamed from templates/reply_form.php) | 0 | ||||
| -rw-r--r-- | templates/note/write_form.php (renamed from templates/write_note_form.php) | 4 | ||||
| -rw-r--r-- | templates/pages/list_item.php (renamed from templates/pages_list_item.php) | 2 | ||||
| -rw-r--r-- | templates/pages/list_page.php (renamed from templates/pages_list_page.php) | 2 | ||||
| -rw-r--r-- | templates/pages/new_form.php (renamed from templates/pages_new_form.php) | 0 | ||||
| -rw-r--r-- | templates/pages/new_page.php (renamed from templates/pages_new_page.php) | 2 | ||||
| -rw-r--r-- | templates/pages/page.php (renamed from templates/note_page.php) | 2 | ||||
| -rw-r--r-- | templates/skeleton.php | 10 | ||||
| -rw-r--r-- | templates/thread_page.php | 2 |
29 files changed, 30 insertions, 30 deletions
diff --git a/templates/actor_atom.php b/templates/actor/atom.php index 8bd40fb..8bd40fb 100644 --- a/templates/actor_atom.php +++ b/templates/actor/atom.php diff --git a/templates/actor_avatar.php b/templates/actor/avatar.php index 16b529b..16b529b 100644 --- a/templates/actor_avatar.php +++ b/templates/actor/avatar.php diff --git a/templates/actor_profile.php b/templates/actor/profile.php index dfb0174..be27c86 100644 --- a/templates/actor_profile.php +++ b/templates/actor/profile.php @@ -11,7 +11,7 @@ $actorUser = UserAccount::findByLinkedActor($actor); <?php if ($addLink ?? false): ?> <a href="/@/<?= $actor->getFullHandle() ?>"> <?php endif; ?> - <?php call_template('actor_avatar', ['actor' => $actor]); ?> + <?php call_template('actor/avatar', ['actor' => $actor]); ?> <?php if ($addLink ?? false): ?> </a> <?php endif; ?> @@ -50,7 +50,7 @@ $actorUser = UserAccount::findByLinkedActor($actor); </li> <?php endif; ?> <?php if ($user != null && $user->actor != $actor): ?> - <li><?php call_template('actor_profile_block_button', ['user' => $user, 'actor' => $actor]) ?></li> + <li><?php call_template('actor/profile_block_button', ['user' => $user, 'actor' => $actor]) ?></li> <?php endif; ?> <?php }); ?> </div> @@ -66,11 +66,11 @@ $actorUser = UserAccount::findByLinkedActor($actor); <?php if (isset($user) && $actor->id != $user->actor->id): ?> <div class="profileActions"> <?php if ($actor->followsPending($user->actor)) - call_template('actor_profile_pending_follow', ['subject' => $actor, 'object' => $user->actor]); ?> + call_template('actor/profile_pending_follow', ['subject' => $actor, 'object' => $user->actor]); ?> <?php if ($actor->follows($user->actor)): ?> <?= __('user.profile.followsYou') ?> <?php endif; ?> - <?php call_template('actor_profile_follow_button', ['actor' => $actor, 'user' => $user]); ?> + <?php call_template('actor/profile_follow_button', ['actor' => $actor, 'user' => $user]); ?> </div> <?php elseif ($actor->id == $user->actor->id): ?> <div class="profileActions"> diff --git a/templates/actor_profile_block_button.php b/templates/actor/profile_block_button.php index 1b71613..1b71613 100644 --- a/templates/actor_profile_block_button.php +++ b/templates/actor/profile_block_button.php diff --git a/templates/actor_profile_editable.php b/templates/actor/profile_editable.php index 6ff5d8c..fc969bd 100644 --- a/templates/actor_profile_editable.php +++ b/templates/actor/profile_editable.php @@ -1,6 +1,6 @@ <form class="fullProfile" hx-post="/fragment/profile" hx-swap="outerHTML" enctype="multipart/form-data"> <div class="basicInfo"> - <?php call_template('actor_avatar', ['actor' => $actor]); ?> + <?php call_template('actor/avatar', ['actor' => $actor]); ?> <div> <div class="row"> <div class="column"> @@ -22,7 +22,7 @@ <div class="row"> <label for="profileAvatar"><?= __('user.profile.changeAvatar') ?></label> <input style="display: inline-block" type="file" id="profileAvatar" name="avatar" accept="image/*"> - <?php call_template('actor_profile_reset_avatar'); ?> + <?php call_template('actor/profile_reset_avatar'); ?> </div> <div class="row"> diff --git a/templates/actor_profile_follow_button.php b/templates/actor/profile_follow_button.php index e2b314d..e2b314d 100644 --- a/templates/actor_profile_follow_button.php +++ b/templates/actor/profile_follow_button.php diff --git a/templates/actor_profile_page.php b/templates/actor/profile_page.php index 1b2981d..9c11dd6 100644 --- a/templates/actor_profile_page.php +++ b/templates/actor/profile_page.php @@ -32,7 +32,7 @@ call_template('skeleton', [ ], function () use ($actor) { $user = UserAccount::findByCurrentSession(); - call_template('actor_profile', ['actor' => $actor]); + call_template('actor/profile', ['actor' => $actor]); echo '<hr>'; $notes = Note::findAllWithAuthor($actor, 20); if (count($notes) == 0) { @@ -42,7 +42,7 @@ call_template('skeleton', [ } else { foreach ($notes as $n) { if ($n->isViewableBy($user)) - call_template('note', ['note' => $n]); + call_template('note/note', ['note' => $n]); } $countNotShown = Note::countWithAuthor($actor) - count($notes); if ($countNotShown >= 0) { diff --git a/templates/actor_profile_pending_follow.php b/templates/actor/profile_pending_follow.php index 2f49fcd..2f49fcd 100644 --- a/templates/actor_profile_pending_follow.php +++ b/templates/actor/profile_pending_follow.php diff --git a/templates/actor_profile_reset_avatar.php b/templates/actor/profile_reset_avatar.php index 86a3507..86a3507 100644 --- a/templates/actor_profile_reset_avatar.php +++ b/templates/actor/profile_reset_avatar.php diff --git a/templates/actor_rss.php b/templates/actor/rss.php index 03fc4f5..03fc4f5 100644 --- a/templates/actor_rss.php +++ b/templates/actor/rss.php diff --git a/templates/follow_requests_page.php b/templates/follow_requests_page.php index f93601c..beb26d5 100644 --- a/templates/follow_requests_page.php +++ b/templates/follow_requests_page.php @@ -4,6 +4,6 @@ call_template('placeholder_text'); } foreach ($actors as $actor) { - call_template('actor_profile', ['actor' => $actor, 'addLink' => true]); + call_template('actor/profile', ['actor' => $actor, 'addLink' => true]); } });
\ No newline at end of file diff --git a/templates/mobilepane_left.php b/templates/mobilepane_left.php index 753383a..29be318 100644 --- a/templates/mobilepane_left.php +++ b/templates/mobilepane_left.php @@ -31,10 +31,10 @@ $settings = GlobalSettings::getInstance(); '/feed/global' => __('timeline.global.shortName'), '/feed/local' => __('timeline.local.shortName'), ]; - call_template('navigation_links', ['links' => $links]); + call_template('navigation/header_links', ['links' => $links]); - call_template('write_note_form', ['actor' => $user->actor]); - call_template('left_side_navigation'); + call_template('note/write_form', ['actor' => $user->actor]); + call_template('navigation/left_side'); ?> <p class="versionInfo"><?= sprintf(__('version'), get_version()) ?></p> </main> diff --git a/templates/navigation_links.php b/templates/navigation/header_links.php index 1540491..1540491 100644 --- a/templates/navigation_links.php +++ b/templates/navigation/header_links.php diff --git a/templates/left_side_navigation.php b/templates/navigation/left_side.php index 5d7f368..219e7a1 100644 --- a/templates/left_side_navigation.php +++ b/templates/navigation/left_side.php @@ -38,4 +38,4 @@ if ($user != null) { ]; } -call_template('side_navigation', ['links' => $links]); +call_template('navigation/side_links', ['links' => $links]); diff --git a/templates/side_navigation.php b/templates/navigation/side_links.php index 94bff5e..94bff5e 100644 --- a/templates/side_navigation.php +++ b/templates/navigation/side_links.php diff --git a/templates/note_attachment.php b/templates/note/attachment.php index c139a00..c139a00 100644 --- a/templates/note_attachment.php +++ b/templates/note/attachment.php diff --git a/templates/attachment_pill.php b/templates/note/attachment_pill.php index 6fff74d..6fff74d 100644 --- a/templates/attachment_pill.php +++ b/templates/note/attachment_pill.php diff --git a/templates/note_link_preview.php b/templates/note/link_preview.php index 1525642..1525642 100644 --- a/templates/note_link_preview.php +++ b/templates/note/link_preview.php diff --git a/templates/note.php b/templates/note/note.php index c80eace..7cef342 100644 --- a/templates/note.php +++ b/templates/note/note.php @@ -22,7 +22,7 @@ $pathToSelf = $note->getLocalUiHref(); <article class="note <?= ($selected ?? false) ? 'selected' : '' ?>"> <a href="/@/<?= $note->author->getFullHandle() ?>"> - <?php call_template('actor_avatar', ['actor' => $note->author]); ?> + <?php call_template('actor/avatar', ['actor' => $note->author]); ?> </a> <div> @@ -91,7 +91,7 @@ $pathToSelf = $note->getLocalUiHref(); <?php if (count($note->attachments) > 0): ?> <div class="attachments"> <?php foreach ($note->attachments as $attachment) { - call_template('note_attachment', ['attachment' => $attachment]); + call_template('note/attachment', ['attachment' => $attachment]); } ?> </div> <?php endif; ?> @@ -99,7 +99,7 @@ $pathToSelf = $note->getLocalUiHref(); <?php $i = 0; foreach ($note->getLinkPreviews() as $preview) { - call_template("note_link_preview", ['preview' => $preview]); + call_template('note/link_preview', ['preview' => $preview]); if (++$i > $MAX_PREVIEW_CARDS) break; } @@ -127,7 +127,7 @@ $pathToSelf = $note->getLocalUiHref(); 'disabled' => $actionsDisabled ]); } - call_template('reply_button', [ + call_template('note/reply_button', [ 'note' => $note, 'count' => $note->countReplies(), 'disabled' => $actionsDisabled @@ -171,6 +171,6 @@ $pathToSelf = $note->getLocalUiHref(); </div> </div> - <?php call_template('reply_form', ['note' => $note]); ?> + <?php call_template('note/reply_form', ['note' => $note]); ?> </div> </article>
\ No newline at end of file diff --git a/templates/reply_button.php b/templates/note/reply_button.php index dadc121..dadc121 100644 --- a/templates/reply_button.php +++ b/templates/note/reply_button.php diff --git a/templates/reply_form.php b/templates/note/reply_form.php index 2d8cfc3..2d8cfc3 100644 --- a/templates/reply_form.php +++ b/templates/note/reply_form.php diff --git a/templates/write_note_form.php b/templates/note/write_form.php index 394f7ba..add00ec 100644 --- a/templates/write_note_form.php +++ b/templates/note/write_form.php @@ -8,7 +8,7 @@ <?= ($_SERVER['REQUEST_METHOD'] == 'GET') ? 'hx-preserve' : '' ?>> <div class="row miniProfile"> <a href="/@/<?= $actor->handle ?>"> - <?php call_template('actor_avatar', ['actor' => $actor]); ?> + <?php call_template('actor/avatar', ['actor' => $actor]); ?> </a> <div class="basicInfo"> <a class="displayName" href="/@/<?= $actor->handle ?>"><?= htmlspecialchars($actor->displayName) ?></a> @@ -31,7 +31,7 @@ </div> <div class="row"> <label class="standalone"><?= __('writeNote.attachments.label') ?></label> - <?php call_template('attachment_pill'); ?> + <?php call_template('note/attachment_pill'); ?> </div> <div class="row"> <label for="noteScope"><?= __('writeNote.scope.label') ?></label> diff --git a/templates/pages_list_item.php b/templates/pages/list_item.php index 7944956..3d4d2e2 100644 --- a/templates/pages_list_item.php +++ b/templates/pages/list_item.php @@ -3,7 +3,7 @@ $page = $note->getPage(); ?> <a class="pageItem" href="<?= htmlspecialchars($note->getLocalUiHref(true)) ?>"> - <?= call_template('actor_avatar', ['actor' => $note->author]) ?> + <?= call_template('actor/avatar', ['actor' => $note->author]) ?> <div> <div class="title"><?= htmlspecialchars($page->title) ?></div> <div class="author"><?= htmlspecialchars($note->author->displayName) ?></div> diff --git a/templates/pages_list_page.php b/templates/pages/list_page.php index 2dd1af2..e347e18 100644 --- a/templates/pages_list_page.php +++ b/templates/pages/list_page.php @@ -9,7 +9,7 @@ call_template('skeleton', ['pageTitle' => __('note.page.list.pageTitle')], funct $notes = Note::findAllWithExtension(Note::EXTENSION_PAGES, 20); foreach ($notes as $note) { - call_template('pages_list_item', ['note' => $note]); + call_template('pages/list_item', ['note' => $note]); } if (count($notes) == 0) { call_template('placeholder_text'); diff --git a/templates/pages_new_form.php b/templates/pages/new_form.php index a8dde16..a8dde16 100644 --- a/templates/pages_new_form.php +++ b/templates/pages/new_form.php diff --git a/templates/pages_new_page.php b/templates/pages/new_page.php index e047b99..9bb44b4 100644 --- a/templates/pages_new_page.php +++ b/templates/pages/new_page.php @@ -1,4 +1,4 @@ <?php call_template('skeleton', ['pageTitle' => __('note.page.new.pageTitle')], function () { - call_template('pages_new_form'); + call_template('pages/new_form'); });
\ No newline at end of file diff --git a/templates/note_page.php b/templates/pages/page.php index 647c64e..bc17664 100644 --- a/templates/note_page.php +++ b/templates/pages/page.php @@ -13,7 +13,7 @@ call_template('skeleton', ['pageTitle' => $page->title, 'renderTitleHeading' => <article lang="<?= htmlspecialchars($note->language) ?>"> <h1><?= htmlspecialchars($page->title) ?></h1> <a class="pageAuthor" href="/@/<?= htmlspecialchars($note->author->getFullHandle()) ?>"> - <?php call_template('actor_avatar', ['actor' => $note->author]); ?> + <?php call_template('actor/avatar', ['actor' => $note->author]); ?> <span><?= __f( 'note.page.author', '<span class="displayName">' . htmlspecialchars($note->author->displayName) . '</span>' diff --git a/templates/skeleton.php b/templates/skeleton.php index 5848054..62090bd 100644 --- a/templates/skeleton.php +++ b/templates/skeleton.php @@ -53,7 +53,7 @@ $settings = GlobalSettings::getInstance(); '/feed/global' => __('timeline.global.shortName'), '/feed/local' => __('timeline.local.shortName'), ]); - call_template('navigation_links', ['links' => $links]); + call_template('navigation/header_links', ['links' => $links]); ?> <span id="siteTitle"><?= $settings->get('instance.name') ?></span> <img id="loadingIndicator" class="htmx-indicator" src="/static/tail-spin.svg"> @@ -63,12 +63,12 @@ $settings = GlobalSettings::getInstance(); <?php endif; ?> <?php if ($user == null): - call_template('navigation_links', ['links' => [ + call_template('navigation/header_links', ['links' => [ '/login' => __('navigation.login') ]]); else: ?> <a href="/@/<?= $user->actor->handle ?>" id="currentUserInfo"> - <?php call_template('actor_avatar', ['actor' => $user->actor]) ?> + <?php call_template('actor/avatar', ['actor' => $user->actor]) ?> <?= htmlspecialchars($user->actor->displayName) ?> </a> <?php endif; ?> @@ -79,9 +79,9 @@ $settings = GlobalSettings::getInstance(); <section id="leftPane"> <?php if ($user != null) { - call_template('write_note_form', ['actor' => $user->actor]); + call_template('note/write_form', ['actor' => $user->actor]); } - call_template('left_side_navigation'); + call_template('navigation/left_side'); ?> <p class="versionInfo"><?= sprintf(__('version'), get_version()) ?></p> </section> diff --git a/templates/thread_page.php b/templates/thread_page.php index 5237f6c..ac2e640 100644 --- a/templates/thread_page.php +++ b/templates/thread_page.php @@ -17,7 +17,7 @@ call_template('skeleton', [ $user = UserAccount::findByCurrentSession(); foreach ($notes as $n) { if (!($user != null && $user->actor->blocks($n->author)) && $n->isViewableBy($user)) { - call_template('note', ['note' => $n, 'selected' => $n == $targetNote]); + call_template('note/note', ['note' => $n, 'selected' => $n == $targetNote]); } } });
\ No newline at end of file |
