missing img option

This commit is contained in:
2026-04-01 13:46:32 -07:00
parent a233bf644a
commit 08327a456f
2 changed files with 9 additions and 0 deletions

View File

@ -7,6 +7,8 @@
<h2>{{ item.data.shortTitle or item.data.title }}</h2>
{% if item.data.img.src and item.data.img.alt %}
<img src="/img/{{ item.data.img.src }}" alt="{{ item.data.img.alt }}">
{% else %}
<div class="missing-img"></div>
{% endif %}
</a>
</li>

View File

@ -58,4 +58,11 @@ ol#directory {
#directory img {
margin: 0;
border-radius: 0 0 .5rem .5rem;
aspect-ratio: 3 / 2;
}
#directory .missing-img {
width: 100%;
aspect-ratio: 3 / 2;
background-color: rgba(from var(--color-accent) r g b / .3);
}