feat: add placeholder for images with invalid src

This commit is contained in:
Devin Haska 2024-03-22 16:27:45 -07:00
parent 2baba97451
commit 0e3ef370c7
3 changed files with 30 additions and 3 deletions

View file

@ -19,8 +19,11 @@ title: /now
<a href="{{ album.url }}"
target="_blank"
rel="external noreferrer noopener">
<p class="[ visually-hidden ]">{{ album.artist }} - {{ album.album }}</p>
{% image album.imageUrl, "" %}
{% set textContent %}
{{ album.artist }} - {{ album.album }}
{% endset %}
<p class="[ visually-hidden ]">{{ textContent }}</p>
{% image album.imageUrl, "", "", "", textContent %}
</a>
</li>
{% endfor %}
@ -32,8 +35,11 @@ title: /now
<a href="{{ movie.url }}"
target="_blank"
rel="external noreferrer noopener">
{% set textContent %}
{{ movie.title }}
{% endset %}
<p class="[ visually-hidden ]">{{ movie.title }}</p>
{% image movie.imgSrc, "" %}
{% image movie.imgSrc, "", "", "" , textContent %}
</a>
</li>
{% endfor %}