missing img option
This commit is contained in:
@ -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>
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user