You've already forked wp-fedistream
29 lines
1.4 KiB
Twig
29 lines
1.4 KiB
Twig
|
|
{# Artist card partial #}
|
||
|
|
<article class="fedistream-card fedistream-card--artist">
|
||
|
|
<a href="{{ post.permalink }}" class="fedistream-card__link">
|
||
|
|
<div class="fedistream-card__image">
|
||
|
|
{% if post.thumbnail %}
|
||
|
|
<img src="{{ post.thumbnail }}" alt="{{ post.title|e('html_attr') }}" loading="lazy">
|
||
|
|
{% else %}
|
||
|
|
<div class="fedistream-card__placeholder fedistream-card__placeholder--artist">
|
||
|
|
<svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>
|
||
|
|
</div>
|
||
|
|
{% endif %}
|
||
|
|
</div>
|
||
|
|
<div class="fedistream-card__content">
|
||
|
|
<h3 class="fedistream-card__title">{{ post.title }}</h3>
|
||
|
|
<p class="fedistream-card__meta">
|
||
|
|
<span class="fedistream-card__type">{{ post.artist_type_label }}</span>
|
||
|
|
{% if post.location %}
|
||
|
|
<span class="fedistream-card__location">{{ post.location }}</span>
|
||
|
|
{% endif %}
|
||
|
|
</p>
|
||
|
|
{% if post.album_count is defined and post.album_count > 0 %}
|
||
|
|
<p class="fedistream-card__stats">
|
||
|
|
{{ post.album_count }} {{ post.album_count == 1 ? 'album' : 'albums' }}
|
||
|
|
</p>
|
||
|
|
{% endif %}
|
||
|
|
</div>
|
||
|
|
</a>
|
||
|
|
</article>
|