castopod/app/Views/home.php
Yassine Doghri 02e4441f98 feat: create optimized & resized images upon upload
- resize uploaded image to thumbnail, medium, large, feed, and id3 formats
- set image url formats where adapted in views
- set format sizes and extensions in Images config file for customization
- add validation for image uploads: `min_dims` and `is_image_squared`
- update codeigniter4 and myth-auth php packages to latest develop versions
- update npm packages to latest versions
- update public/.htaccess

closes #6
2020-10-15 14:41:45 +00:00

30 lines
1.0 KiB
PHP

<?= $this->extend('_layout') ?>
<?= $this->section('title') ?>Castopod<?= $this->endSection() ?>
<?= $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('podcast', $podcast->name) ?>">
<article class="w-48 h-full p-2 mb-4 mr-4 border shadow-sm hover:bg-gray-100 hover:shadow">
<img alt="<?= $podcast->title ?>"
src="<?= $podcast->image->thumbnail_url ?>"
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()
?>