You've already forked wp-fedistream
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>
This commit is contained in:
31
templates/partials/card-album.twig
Normal file
31
templates/partials/card-album.twig
Normal file
@@ -0,0 +1,31 @@
|
||||
{# Album card partial #}
|
||||
<article class="fedistream-card fedistream-card--album">
|
||||
<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--album">
|
||||
<svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 14.5c-2.49 0-4.5-2.01-4.5-4.5S9.51 7.5 12 7.5s4.5 2.01 4.5 4.5-2.01 4.5-4.5 4.5zm0-5.5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1z"/></svg>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="fedistream-card__content">
|
||||
<h3 class="fedistream-card__title">{{ post.title }}</h3>
|
||||
{% if post.artist_name %}
|
||||
<p class="fedistream-card__artist">{{ post.artist_name }}</p>
|
||||
{% endif %}
|
||||
<p class="fedistream-card__meta">
|
||||
<span class="fedistream-card__type">{{ post.album_type_label }}</span>
|
||||
{% if post.release_year %}
|
||||
<span class="fedistream-card__year">{{ post.release_year }}</span>
|
||||
{% endif %}
|
||||
</p>
|
||||
{% if post.total_tracks > 0 %}
|
||||
<p class="fedistream-card__stats">
|
||||
{{ post.total_tracks }} {{ post.total_tracks == 1 ? 'track' : 'tracks' }}
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</a>
|
||||
</article>
|
||||
28
templates/partials/card-artist.twig
Normal file
28
templates/partials/card-artist.twig
Normal file
@@ -0,0 +1,28 @@
|
||||
{# 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>
|
||||
29
templates/partials/card-playlist.twig
Normal file
29
templates/partials/card-playlist.twig
Normal file
@@ -0,0 +1,29 @@
|
||||
{# 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>
|
||||
37
templates/partials/card-track.twig
Normal file
37
templates/partials/card-track.twig
Normal file
@@ -0,0 +1,37 @@
|
||||
{# 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>
|
||||
Reference in New Issue
Block a user