mirror of
https://code.castopod.org/adaures/castopod
synced 2025-04-23 01:01:20 +00:00

- add james-heinrich/getid3 library as a dependency to composer.json - update DEPENDENCIES.md file - fix episodes table migration script - add js devDependencies: prettier, @prettier/plugin-php and lint-staged to automatically format staged files before commit - reformat all files to the prettier format - refactor code by separating some logic as helper functions - overwrite existing files when uploading new files with the same name fixes #1
47 lines
1.7 KiB
PHP
47 lines
1.7 KiB
PHP
<?= $this->extend('layouts/default') ?>
|
|
|
|
<?= $this->section('content') ?>
|
|
<header class="py-4 border-b">
|
|
<h1 class="text-2xl"><?= $podcast->title ?></h1>
|
|
<img src="<?= base_url(
|
|
$podcast->image
|
|
) ?>" alt="Podcast cover" class="w-40 h-40 mb-6" />
|
|
<a class="inline-flex px-4 py-2 border hover:bg-gray-100" href="<?= route_to(
|
|
'episodes_create',
|
|
'@' . $podcast->name
|
|
) ?>">New Episode</a>
|
|
</header>
|
|
|
|
<section class="flex flex-col py-4">
|
|
<h2 class="mb-4 text-xl"><?= lang(
|
|
'Podcasts.list_of_episodes'
|
|
) ?> (<?= count($episodes) ?>)</h2>
|
|
<?php if ($episodes): ?>
|
|
<?php foreach ($episodes as $episode): ?>
|
|
<article class="flex w-full max-w-lg p-4 mb-4 border shadow">
|
|
<img src="<?= base_url(
|
|
$episode->image ? $episode->image : $podcast->image
|
|
) ?>" alt="<?= $episode->title ?>" class="w-32 h-32 mr-4" />
|
|
<div class="flex flex-col flex-1">
|
|
<a href="<?= route_to(
|
|
'episodes_view',
|
|
'@' . $podcast->name,
|
|
$episode->slug
|
|
) ?>">
|
|
<h3 class="text-xl font-semibold underline hover:no-underline"><?= $episode->title ?></h3>
|
|
</a>
|
|
<audio controls class="mt-auto">
|
|
<source src="<?= $episode->enclosure_url ?>" type="<?= $episode->enclosure_type ?>">
|
|
Your browser does not support the audio tag.
|
|
</audio>
|
|
</div>
|
|
</article>
|
|
<?php endforeach; ?>
|
|
<?php else: ?>
|
|
<p class="italic"><?= lang('Podcasts.no_episode') ?></p>
|
|
<?php endif; ?>
|
|
</section>
|
|
|
|
|
|
<?= $this->endSection() ?>
|