Files
wp-fedistream/templates/partials/card-playlist.twig
magdev 4a5d7b9f4d feat: Initial release v0.1.0
WP FediStream - Stream music over ActivityPub

Features:
- Custom post types: Artist, Album, Track, Playlist
- Custom taxonomies: Genre, Mood, License
- User roles: Artist, Label
- Admin dashboard with statistics
- Frontend templates and shortcodes
- Audio player with queue management
- ActivityPub integration with actor support
- WooCommerce product types for albums/tracks
- User library with favorites and history
- Notification system (in-app and email)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 23:23:05 +01:00

30 lines
1.8 KiB
Twig

{# Playlist card partial #}
<article class="fedistream-card fedistream-card--playlist">
<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">
{% else %}
<div class="fedistream-card__placeholder fedistream-card__placeholder--playlist">
<svg viewBox="0 0 24 24" fill="currentColor"><path d="M15 6H3v2h12V6zm0 4H3v2h12v-2zM3 16h8v-2H3v2zM17 6v8.18c-.31-.11-.65-.18-1-.18-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3V8h3V6h-5z"/></svg>
</div>
{% endif %}
{% if post.visibility == 'private' %}
<span class="fedistream-card__badge fedistream-card__badge--private">
<svg viewBox="0 0 24 24" fill="currentColor" width="12" height="12"><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6zm9 14H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"/></svg>
</span>
{% endif %}
</div>
<div class="fedistream-card__content">
<h3 class="fedistream-card__title">{{ post.title }}</h3>
<p class="fedistream-card__author">{{ post.author }}</p>
<p class="fedistream-card__meta">
<span class="fedistream-card__count">{{ post.track_count }} {{ post.track_count == 1 ? 'track' : 'tracks' }}</span>
{% if post.duration_formatted %}
<span class="fedistream-card__duration">{{ post.duration_formatted }}</span>
{% endif %}
</p>
</div>
</a>
</article>