2021-04-02 17:20:02 +00:00
|
|
|
|
<?= $this->extend('podcast/_layout_authenticated') ?>
|
|
|
|
|
|
|
|
|
|
<?= $this->section('meta-tags') ?>
|
|
|
|
|
<title><?= $episode->title ?></title>
|
|
|
|
|
<meta name="description" content="<?= htmlspecialchars(
|
|
|
|
|
$episode->description,
|
|
|
|
|
) ?>" />
|
|
|
|
|
<link rel="canonical" href="<?= $episode->link ?>" />
|
|
|
|
|
<meta property="og:title" content="<?= $episode->title ?>" />
|
|
|
|
|
<meta property="og:description" content="<?= $episode->description ?>" />
|
|
|
|
|
<meta property="og:locale" content="<?= $podcast->language_code ?>" />
|
|
|
|
|
<meta property="og:site_name" content="<?= $podcast->title ?>" />
|
|
|
|
|
<meta property="og:url" content="<?= current_url() ?>" />
|
|
|
|
|
<meta property="og:image" content="<?= $episode->image->large_url ?>" />
|
2021-09-08 15:51:33 +00:00
|
|
|
|
<meta property="og:image:width" content="<?= config('Images')
|
|
|
|
|
->largeSize ?>" />
|
|
|
|
|
<meta property="og:image:height" content="<?= config('Images')
|
|
|
|
|
->largeSize ?>" />
|
2021-04-02 17:20:02 +00:00
|
|
|
|
<meta property="og:description" content="$description" />
|
|
|
|
|
<meta property="article:published_time" content="<?= $episode->published_at ?>" />
|
|
|
|
|
<meta property="article:modified_time" content="<?= $episode->updated_at ?>" />
|
2021-05-03 17:39:58 +00:00
|
|
|
|
<meta property="og:audio" content="<?= $episode->audio_file_opengraph_url ?>" />
|
|
|
|
|
<meta property="og:audio:type" content="<?= $episode->audio_file_mimetype ?>" />
|
2021-04-02 17:20:02 +00:00
|
|
|
|
<link rel="alternate" type="application/json+oembed" href="<?= base_url(
|
2021-09-08 15:51:33 +00:00
|
|
|
|
route_to('episode-oembed-json', $podcast->handle, $episode->slug),
|
|
|
|
|
) ?>" title="<?= $episode->title ?> oEmbed json" />
|
2021-04-02 17:20:02 +00:00
|
|
|
|
<link rel="alternate" type="text/xml+oembed" href="<?= base_url(
|
2021-09-08 15:51:33 +00:00
|
|
|
|
route_to('episode-oembed-xml', $podcast->handle, $episode->slug),
|
|
|
|
|
) ?>" title="<?= $episode->title ?> oEmbed xml" />
|
2021-04-02 17:20:02 +00:00
|
|
|
|
<meta name="twitter:title" content="<?= $episode->title ?>" />
|
|
|
|
|
<meta name="twitter:description" content="<?= $episode->description ?>" />
|
|
|
|
|
<meta name="twitter:image" content="<?= $episode->image->large_url ?>" />
|
|
|
|
|
<meta name="twitter:card" content="player" />
|
|
|
|
|
<meta property="twitter:audio:partner" content="<?= $podcast->publisher ?>" />
|
|
|
|
|
<meta property="twitter:audio:artist_name" content="<?= $podcast->owner_name ?>" />
|
2021-05-12 14:00:25 +00:00
|
|
|
|
<meta name="twitter:player" content="<?= $episode->getEmbeddablePlayerUrl(
|
2021-09-08 15:51:33 +00:00
|
|
|
|
'light',
|
|
|
|
|
) ?>" />
|
2021-04-02 17:20:02 +00:00
|
|
|
|
<meta name="twitter:player:width" content="600" />
|
|
|
|
|
<meta name="twitter:player:height" content="200" />
|
|
|
|
|
<?= $this->endSection() ?>
|
|
|
|
|
|
|
|
|
|
<?= $this->section('content') ?>
|
|
|
|
|
<div class="max-w-2xl mx-auto">
|
|
|
|
|
<a href="<?= route_to(
|
|
|
|
|
'podcast-episodes',
|
2021-07-26 13:10:46 +00:00
|
|
|
|
$podcast->handle,
|
2021-04-02 17:20:02 +00:00
|
|
|
|
) ?>" class="inline-flex items-center px-4 py-2 mb-2 text-sm"><?= icon(
|
2021-09-08 15:51:33 +00:00
|
|
|
|
'arrow-left',
|
|
|
|
|
'mr-2 mb- text-lg',
|
|
|
|
|
) . lang('Episode.back_to_episodes', [
|
|
|
|
|
'podcast' => $podcast->title,
|
|
|
|
|
]) ?></a>
|
2021-04-02 17:20:02 +00:00
|
|
|
|
<header class="flex flex-col px-6 mb-4 rounded-b-xl">
|
|
|
|
|
<div class="flex flex-wrap items-start">
|
|
|
|
|
<img src="<?= $episode->image
|
2021-09-08 15:51:33 +00:00
|
|
|
|
->medium_url ?>" alt="<?= $episode->title ?>" class="mb-4 mr-6 rounded-xl w-52" />
|
2021-04-02 17:20:02 +00:00
|
|
|
|
<div class="flex flex-col items-start flex-1 mb-4" style="min-width: 14rem">
|
|
|
|
|
<h1 class="text-xl font-bold leading-none font-display line-clamp-2"><?= $episode->title ?></h1>
|
|
|
|
|
<?= episode_numbering(
|
2021-09-08 15:51:33 +00:00
|
|
|
|
$episode->number,
|
|
|
|
|
$episode->season_number,
|
|
|
|
|
'text-gray-700',
|
|
|
|
|
) ?>
|
2021-04-02 17:20:02 +00:00
|
|
|
|
<div class="mb-4 text-xs">
|
2021-08-09 15:56:59 +00:00
|
|
|
|
<?= relative_time($episode->published_at) ?>
|
2021-04-02 17:20:02 +00:00
|
|
|
|
<span class="mx-1">•</span>
|
2021-05-03 17:39:58 +00:00
|
|
|
|
<time datetime="PT<?= $episode->audio_file_duration ?>S">
|
|
|
|
|
<?= format_duration($episode->audio_file_duration) ?>
|
2021-04-02 17:20:02 +00:00
|
|
|
|
</time>
|
|
|
|
|
</div>
|
2021-05-18 17:16:36 +00:00
|
|
|
|
<?= location_link($episode->location, 'text-sm mb-4') ?>
|
|
|
|
|
<?= person_list($episode->persons) ?>
|
2021-08-09 10:28:16 +00:00
|
|
|
|
<?= play_episode_button($episode->id, $episode->image->thumbnail_url, $episode->title, $podcast->title, $episode->audio_file_web_url, $episode->audio_file_mimetype) ?>
|
2021-04-02 17:20:02 +00:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</header>
|
|
|
|
|
|
|
|
|
|
<div class="tabset">
|
2021-08-13 11:07:29 +00:00
|
|
|
|
<input type="radio" name="tabset" id="comments" aria-controls="comments" checked="checked" />
|
|
|
|
|
<label for="comments"><?= lang('Episode.comments') . ' (' . $episode->comments_count . ')' ?></label>
|
|
|
|
|
|
|
|
|
|
<input type="radio" name="tabset" id="activity" aria-controls="activity" />
|
2021-09-08 15:51:33 +00:00
|
|
|
|
<label for="activity"><?= lang('Episode.activity') . ' (' . $episode->posts_count . ')' ?></label>
|
2021-04-02 17:20:02 +00:00
|
|
|
|
|
|
|
|
|
<input type="radio" name="tabset" id="description" aria-controls="description" />
|
|
|
|
|
<label for="description"><?= lang('Episode.description') ?></label>
|
|
|
|
|
|
|
|
|
|
<div class="tab-panels">
|
2021-08-13 11:07:29 +00:00
|
|
|
|
<section id="comments" class="space-y-6 tab-panel">
|
|
|
|
|
<?= form_open(route_to('comment-attempt-create', $podcast->id, $episode->id), [
|
2021-09-08 15:51:33 +00:00
|
|
|
|
'class' => 'flex p-4',
|
|
|
|
|
]) ?>
|
2021-08-13 11:07:29 +00:00
|
|
|
|
<?= csrf_field() ?>
|
|
|
|
|
|
|
|
|
|
<?= view('_message_block') ?>
|
|
|
|
|
|
|
|
|
|
<img src="<?= interact_as_actor()
|
2021-09-08 15:51:33 +00:00
|
|
|
|
->avatar_image_url ?>" alt="<?= interact_as_actor()
|
|
|
|
|
->display_name ?>" class="w-12 h-12 mr-4 rounded-full" />
|
2021-08-13 11:07:29 +00:00
|
|
|
|
<div class="flex flex-col flex-1 min-w-0">
|
|
|
|
|
<?= form_textarea(
|
|
|
|
|
[
|
|
|
|
|
'id' => 'message',
|
|
|
|
|
'name' => 'message',
|
|
|
|
|
'class' => 'form-textarea mb-2',
|
|
|
|
|
'required' => 'required',
|
|
|
|
|
'placeholder' => lang(
|
|
|
|
|
'Comment.form.episode_message_placeholder',
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
old('message', '', false),
|
|
|
|
|
[
|
|
|
|
|
'rows' => 2,
|
|
|
|
|
],
|
|
|
|
|
) ?>
|
|
|
|
|
|
|
|
|
|
<?= button(
|
|
|
|
|
lang('Comment.form.submit'),
|
|
|
|
|
'',
|
2021-09-08 15:51:33 +00:00
|
|
|
|
[
|
|
|
|
|
'variant' => 'primary',
|
|
|
|
|
'size' => 'small',
|
|
|
|
|
],
|
|
|
|
|
[
|
|
|
|
|
'type' => 'submit',
|
|
|
|
|
'class' => 'self-end',
|
|
|
|
|
],
|
2021-08-13 11:07:29 +00:00
|
|
|
|
) ?>
|
|
|
|
|
</div>
|
|
|
|
|
<?= form_close() ?>
|
|
|
|
|
<?php foreach ($episode->comments as $comment): ?>
|
2021-09-08 15:51:33 +00:00
|
|
|
|
<?= view('podcast/_partials/comment_authenticated', [
|
|
|
|
|
'comment' => $comment,
|
|
|
|
|
]) ?>
|
2021-08-13 11:07:29 +00:00
|
|
|
|
<?php endforeach; ?>
|
|
|
|
|
</section>
|
2021-04-02 17:20:02 +00:00
|
|
|
|
<section id="activity" class="space-y-8 tab-panel">
|
2021-08-13 11:07:29 +00:00
|
|
|
|
<?= form_open(route_to('post-attempt-create', $podcast->handle), [
|
2021-04-02 17:20:02 +00:00
|
|
|
|
'class' => 'flex p-4 bg-white shadow rounded-xl',
|
|
|
|
|
]) ?>
|
|
|
|
|
<?= csrf_field() ?>
|
|
|
|
|
|
|
|
|
|
<?= view('_message_block') ?>
|
|
|
|
|
|
|
|
|
|
<img src="<?= interact_as_actor()
|
2021-09-08 15:51:33 +00:00
|
|
|
|
->avatar_image_url ?>" alt="<?= interact_as_actor()
|
|
|
|
|
->display_name ?>" class="w-12 h-12 mr-4 rounded-full" />
|
2021-04-02 17:20:02 +00:00
|
|
|
|
<div class="flex flex-col flex-1 min-w-0">
|
|
|
|
|
<?= form_textarea(
|
|
|
|
|
[
|
|
|
|
|
'id' => 'message',
|
|
|
|
|
'name' => 'message',
|
|
|
|
|
'class' => 'form-textarea mb-2',
|
|
|
|
|
'required' => 'required',
|
|
|
|
|
'placeholder' => lang(
|
2021-08-13 11:07:29 +00:00
|
|
|
|
'Post.form.episode_message_placeholder',
|
2021-04-02 17:20:02 +00:00
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
old('message', '', false),
|
|
|
|
|
[
|
|
|
|
|
'rows' => 2,
|
|
|
|
|
],
|
|
|
|
|
) ?>
|
|
|
|
|
<?= form_input([
|
|
|
|
|
'id' => 'episode_url',
|
|
|
|
|
'name' => 'episode_url',
|
|
|
|
|
'value' => $episode->link,
|
|
|
|
|
'type' => 'hidden',
|
|
|
|
|
]) ?>
|
|
|
|
|
<?= button(
|
2021-08-13 11:07:29 +00:00
|
|
|
|
lang('Post.form.submit'),
|
2021-05-06 14:00:48 +00:00
|
|
|
|
'',
|
2021-09-08 15:51:33 +00:00
|
|
|
|
[
|
|
|
|
|
'variant' => 'primary',
|
|
|
|
|
'size' => 'small',
|
|
|
|
|
],
|
|
|
|
|
[
|
|
|
|
|
'type' => 'submit',
|
|
|
|
|
'class' => 'self-end',
|
|
|
|
|
],
|
2021-04-02 17:20:02 +00:00
|
|
|
|
) ?>
|
|
|
|
|
</div>
|
|
|
|
|
<?= form_close() ?>
|
|
|
|
|
<hr class="my-4 border border-pine-100">
|
2021-08-13 11:07:29 +00:00
|
|
|
|
<?php foreach ($episode->posts as $post): ?>
|
|
|
|
|
<?= view('podcast/_partials/post_authenticated', [
|
|
|
|
|
'post' => $post,
|
2021-04-02 17:20:02 +00:00
|
|
|
|
]) ?>
|
|
|
|
|
<?php endforeach; ?>
|
|
|
|
|
</section>
|
|
|
|
|
<section id="description" class="prose tab-panel">
|
|
|
|
|
<?= $episode->getDescriptionHtml('-+Website+-') ?>
|
|
|
|
|
</section>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<?= $this->endSection()
|
|
|
|
|
?>
|