Add alt text to all photos

This commit is contained in:
Bastian Allgeier
2022-12-12 13:56:04 +01:00
parent 8381ccb96c
commit ec4ece4000
17 changed files with 247 additions and 5 deletions

View File

@@ -27,7 +27,9 @@
<a href="<?= $project->url() ?>">
<figure>
<span class="img" style="--w:4;--h:5">
<?= ($cover = $project->cover()) ? $cover->crop(400, 500) : null ?>
<?php if ($cover = $project->cover()): ?>
<img src="<?= $cover->crop(400, 500)->url() ?>" alt="<?= $cover->alt()->esc() ?>">
<?php endif ?>
</span>
<figcaption class="img-caption">
<?= $project->title()->esc() ?>