2021-11-05 15:36:34 +01:00
|
|
|
<article class="relative z-10 w-full shadow bg-elevated sm:rounded-conditional-2xl">
|
2021-10-22 16:35:11 +02:00
|
|
|
<header class="flex px-6 py-4 gap-x-2">
|
2021-08-13 13:07:29 +02:00
|
|
|
<img src="<?= $post->actor
|
2021-10-22 16:35:11 +02:00
|
|
|
->avatar_image_url ?>" alt="<?= $post->actor->display_name ?>" class="w-10 h-10 rounded-full" />
|
2021-08-13 13:07:29 +02:00
|
|
|
<div class="flex flex-col min-w-0">
|
|
|
|
<a href="<?= $post->actor
|
2021-09-08 17:51:33 +02:00
|
|
|
->uri ?>" class="flex items-baseline hover:underline" <?= $post
|
2021-08-13 13:07:29 +02:00
|
|
|
->actor->is_local
|
|
|
|
? ''
|
|
|
|
: 'target="_blank" rel="noopener noreferrer"' ?>>
|
|
|
|
<span class="mr-2 font-semibold truncate"><?= $post->actor
|
2021-09-08 17:51:33 +02:00
|
|
|
->display_name ?></span>
|
2021-11-05 15:36:34 +01:00
|
|
|
<span class="text-sm truncate text-skin-muted">@<?= $post->actor
|
2021-09-08 17:51:33 +02:00
|
|
|
->username .
|
2021-08-13 13:07:29 +02:00
|
|
|
($post->actor->is_local
|
|
|
|
? ''
|
|
|
|
: '@' . $post->actor->domain) ?></span>
|
|
|
|
</a>
|
|
|
|
<a href="<?= route_to('post', $podcast->handle, $post->id) ?>"
|
2021-11-05 15:36:34 +01:00
|
|
|
class="text-xs text-skin-muted">
|
2021-08-13 13:07:29 +02:00
|
|
|
<?= relative_time($post->published_at) ?>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</header>
|
2021-10-13 17:43:40 +02:00
|
|
|
<?php if (substr_count($post->message, "\n") >= 3 || strlen($post->message) > 250): ?>
|
|
|
|
<ReadMore id="<?= $index ?>" class="px-6 mb-4 post-content"><?= $post->message_html ?></ReadMore>
|
|
|
|
<?php else: ?>
|
|
|
|
<div class="px-6 mb-4 post-content"><?= $post->message_html ?></div>
|
|
|
|
<?php endif; ?>
|
2021-08-13 13:07:29 +02:00
|
|
|
<?php if ($post->episode_id): ?>
|
2021-10-13 17:43:40 +02:00
|
|
|
<?= view('episode/_partials/preview_card', [
|
|
|
|
'index' => $index,
|
2021-08-13 13:07:29 +02:00
|
|
|
'episode' => $post->episode,
|
2021-10-13 17:43:40 +02:00
|
|
|
]) ?>
|
2021-11-05 15:36:34 +01:00
|
|
|
<?php elseif ($post->preview_card): ?>
|
2021-10-13 17:43:40 +02:00
|
|
|
<?= view('post/_partials/preview_card', [
|
2021-08-13 13:07:29 +02:00
|
|
|
'preview_card' => $post->preview_card,
|
|
|
|
]) ?>
|
|
|
|
<?php endif; ?>
|
2021-10-13 17:43:40 +02:00
|
|
|
<?= $this->include('post/_partials/actions') ?>
|
2021-08-13 13:07:29 +02:00
|
|
|
</article>
|