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/actor_profile.php | |
| parent | 61b122e88cc6783b4d0cf5142a22002f8e558c60 (diff) | |
[refactor] move some templates to subdirs
Diffstat (limited to 'templates/actor_profile.php')
| -rw-r--r-- | templates/actor_profile.php | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/templates/actor_profile.php b/templates/actor_profile.php deleted file mode 100644 index dfb0174..0000000 --- a/templates/actor_profile.php +++ /dev/null @@ -1,83 +0,0 @@ -<?php -use Digitigrade\Model\UserAccount; -use Digitigrade\UserSettings; - -$user = UserAccount::findByCurrentSession(); -$actorUser = UserAccount::findByLinkedActor($actor); -?> -<div class="fullProfile"> - <div class="basicInfo"> - - <?php if ($addLink ?? false): ?> - <a href="/@/<?= $actor->getFullHandle() ?>"> - <?php endif; ?> - <?php call_template('actor_avatar', ['actor' => $actor]); ?> - <?php if ($addLink ?? false): ?> - </a> - <?php endif; ?> - - <div> - <div class="displayName"><?= htmlspecialchars($actor->displayName) ?></div> - <div class="pronouns"><?= htmlspecialchars($actor->pronouns) ?></div> - <div class="handle">@<?= $actor->getFullHandle() ?></div> - <div class="joinedDate"><?= sprintf(__('user.profile.createdAt'), $actor->created->format('Y-m-d')) ?> - </div> - </div> - - <div class="profileMiniActions"> - <?php call_template('menu_button', [], function () use ($actor, $user, $actorUser) { ?> - <?php if (!$actor->isLocal && isset($actor->homepage)): ?> - <li> - <a href="<?= $actor->homepage ?>" target="_blank"> - <span class="material-symbols open-in-new"></span> - <span><?= __('user.profile.openRemote') ?></span> - </a> - </li> - <?php endif; ?> - <?php if ($actorUser != null && (new UserSettings($actorUser))->getBool('profile.rssEnabled')): ?> - <?php $lang = get_ui_language(); ?> - <li> - <a href="<?= "/actor/$actor->id/feed/$lang/feed.rss" ?>" target="_blank" type="application/rss+xml"> - <span class="material-symbols rss-feed"></span> - <span><?= __('user.profile.feed.rss') ?></span> - </a> - </li> - <li> - <a href="<?= "/actor/$actor->id/feed/$lang/feed.atom" ?>" target="_blank" type="application/atom+xml"> - <span class="material-symbols orbit-outline"></span> - <span><?= __('user.profile.feed.atom') ?></span> - </a> - </li> - <?php endif; ?> - <?php if ($user != null && $user->actor != $actor): ?> - <li><?php call_template('actor_profile_block_button', ['user' => $user, 'actor' => $actor]) ?></li> - <?php endif; ?> - <?php }); ?> - </div> - - </div> - - <?php if (isset($actor->bio) && $actor->bio != '') { ?> - <pre class="bio"><?= htmlspecialchars($actor->bio) ?></pre> - <?php } else { - call_template('placeholder_text', ['message' => __('user.profile.bio.placeholder')]); - } ?> - - <?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]); ?> - <?php if ($actor->follows($user->actor)): ?> - <?= __('user.profile.followsYou') ?> - <?php endif; ?> - <?php call_template('actor_profile_follow_button', ['actor' => $actor, 'user' => $user]); ?> - </div> - <?php elseif ($actor->id == $user->actor->id): ?> - <div class="profileActions"> - <button class="primary" hx-get="/fragment/profile" hx-target="closest .fullProfile" hx-swap="outerHTML"> - <?= __('form.edit') ?> - </button> - </div> - <?php endif; ?> - -</div>
\ No newline at end of file |
