You've already forked wp-fedistream
38 lines
1.8 KiB
Twig
38 lines
1.8 KiB
Twig
|
|
{# Track card partial #}
|
||
|
|
<article class="fedistream-card fedistream-card--track">
|
||
|
|
<a href="{{ post.permalink }}" class="fedistream-card__link">
|
||
|
|
<div class="fedistream-card__image fedistream-card__image--square">
|
||
|
|
{% if post.thumbnail %}
|
||
|
|
<img src="{{ post.thumbnail }}" alt="{{ post.title|e('html_attr') }}" loading="lazy">
|
||
|
|
{% elseif post.album_artwork %}
|
||
|
|
<img src="{{ post.album_artwork }}" alt="{{ post.title|e('html_attr') }}" loading="lazy">
|
||
|
|
{% else %}
|
||
|
|
<div class="fedistream-card__placeholder fedistream-card__placeholder--track">
|
||
|
|
<svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 3v10.55c-.59-.34-1.27-.55-2-.55-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4V7h4V3h-6z"/></svg>
|
||
|
|
</div>
|
||
|
|
{% endif %}
|
||
|
|
{% if post.explicit %}
|
||
|
|
<span class="fedistream-card__badge fedistream-card__badge--explicit">E</span>
|
||
|
|
{% endif %}
|
||
|
|
</div>
|
||
|
|
<div class="fedistream-card__content">
|
||
|
|
<h3 class="fedistream-card__title">{{ post.title }}</h3>
|
||
|
|
{% if post.artists %}
|
||
|
|
<p class="fedistream-card__artist">
|
||
|
|
{% for artist in post.artists %}
|
||
|
|
{{ artist.name }}{% if not loop.last %}, {% endif %}
|
||
|
|
{% endfor %}
|
||
|
|
</p>
|
||
|
|
{% endif %}
|
||
|
|
<p class="fedistream-card__meta">
|
||
|
|
{% if post.album_title %}
|
||
|
|
<span class="fedistream-card__album">{{ post.album_title }}</span>
|
||
|
|
{% endif %}
|
||
|
|
{% if post.duration_formatted %}
|
||
|
|
<span class="fedistream-card__duration">{{ post.duration_formatted }}</span>
|
||
|
|
{% endif %}
|
||
|
|
</p>
|
||
|
|
</div>
|
||
|
|
</a>
|
||
|
|
</article>
|