2021-10-18 16:44:07 +00:00
|
|
|
<article class="relative z-10 w-full bg-white shadow rounded-conditional-2xl">
|
2021-04-02 17:20:02 +00:00
|
|
|
<p class="inline-flex px-6 pt-4 text-xs text-gray-700"><?= icon(
|
2021-09-08 15:51:33 +00:00
|
|
|
'repeat',
|
|
|
|
'text-lg mr-2 text-gray-400',
|
|
|
|
) .
|
2021-08-13 11:07:29 +00:00
|
|
|
lang('Post.actor_shared', [
|
|
|
|
'actor' => $post->actor->display_name,
|
2021-04-02 17:20:02 +00:00
|
|
|
]) ?></p>
|
2021-10-22 14:35:11 +00:00
|
|
|
<header class="flex px-6 py-4 gap-x-2">
|
2021-08-13 11:07:29 +00:00
|
|
|
<img src="<?= $post->actor
|
2021-10-22 14:35:11 +00:00
|
|
|
->avatar_image_url ?>" alt="<?= $post->display_name ?>" class="w-10 h-10 rounded-full" />
|
2021-04-02 17:20:02 +00:00
|
|
|
<div class="flex flex-col min-w-0">
|
2021-08-13 11:07:29 +00:00
|
|
|
<a href="<?= $post->actor
|
2021-09-08 15:51:33 +00:00
|
|
|
->uri ?>" class="flex items-baseline hover:underline" <?= $post
|
|
|
|
->actor->is_local
|
2021-05-06 14:00:48 +00:00
|
|
|
? ''
|
|
|
|
: 'target="_blank" rel="noopener noreferrer"' ?>>
|
2021-08-13 11:07:29 +00:00
|
|
|
<span class="mr-2 font-semibold truncate"><?= $post->actor
|
2021-09-08 15:51:33 +00:00
|
|
|
->display_name ?></span>
|
2021-08-13 11:07:29 +00:00
|
|
|
<span class="text-sm text-gray-500 truncate">@<?= $post->actor
|
2021-09-08 15:51:33 +00:00
|
|
|
->username .
|
2021-08-13 11:07:29 +00:00
|
|
|
($post->actor->is_local
|
2021-05-06 14:00:48 +00:00
|
|
|
? ''
|
2021-08-13 11:07:29 +00:00
|
|
|
: '@' . $post->actor->domain) ?></span>
|
2021-04-02 17:20:02 +00:00
|
|
|
</a>
|
2021-08-13 11:07:29 +00:00
|
|
|
<a href="<?= route_to('post', $podcast->handle, $post->id) ?>"
|
2021-04-02 17:20:02 +00:00
|
|
|
class="text-xs text-gray-500">
|
2021-08-13 11:07:29 +00:00
|
|
|
<?= relative_time($post->published_at) ?>
|
2021-04-02 17:20:02 +00:00
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</header>
|
2021-08-13 11:07:29 +00:00
|
|
|
<div class="px-6 mb-4 post-content"><?= $post->message_html ?></div>
|
|
|
|
<?php if ($post->episode_id): ?>
|
2021-10-13 15:43:40 +00:00
|
|
|
<?= view('episode/_partials/preview_card', [
|
2021-10-22 15:36:25 +00:00
|
|
|
'index' => $index,
|
2021-08-13 11:07:29 +00:00
|
|
|
'episode' => $post->episode,
|
2021-04-02 17:20:02 +00:00
|
|
|
]) ?>
|
2021-10-13 15:43:40 +00:00
|
|
|
<?php elseif ($post->preview_card_id): ?>
|
|
|
|
<?= view('post/_partials/preview_card', [
|
2021-08-13 11:07:29 +00:00
|
|
|
'preview_card' => $post->preview_card,
|
2021-04-16 16:31:09 +00:00
|
|
|
]) ?>
|
2021-04-02 17:20:02 +00:00
|
|
|
<?php endif; ?>
|
2021-10-13 15:43:40 +00:00
|
|
|
<?= $this->include('post/_partials/actions') ?>
|
2021-04-02 17:20:02 +00:00
|
|
|
</article>
|