castopod/app/Views/home.php
Yassine Doghri f3b2c8b84f feat(episodes): add create form and view pages for episode
- 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
2020-10-15 14:40:47 +00:00

25 lines
959 B
PHP

<?= $this->extend('layouts/default') ?>
<?= $this->section('content') ?>
<h1 class="mb-2 text-xl"><?= lang('Home.all_podcasts') ?> (<?= count(
$podcasts
) ?>)</h1>
<section class="flex flex-wrap">
<?php if ($podcasts): ?>
<?php foreach ($podcasts as $podcast): ?>
<a href="<?= route_to('podcasts_view', '@' . $podcast->name) ?>">
<article class="w-48 p-2 mb-4 mr-4 border shadow-sm hover:bg-gray-100 hover:shadow">
<img alt="<?= $podcast->title ?>" src="<?= $podcast->image ?>" class="object-cover w-full h-40 mb-2" />
<h2 class="font-semibold leading-tight"><?= $podcast->title ?></h2>
<p class="text-gray-600">@<?= $podcast->name ?></p>
</article>
</a>
<?php endforeach; ?>
<?php else: ?>
<p class="italic"><?= lang('Home.no_podcast') ?></p>
<?php endif; ?>
</section>
<?= $this->endSection() ?>