plays-hub/app/views/statistics/_longest_streak.html.erb

13 lines
734 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<div class="dashboard-widget dashboard-longest-streak">
<% if streak %>
<h3 class="widget-title">Longest Listening Streak</h3>
<div class="widget-content">
<div><strong>Streak:</strong> <%= streak[:length] %> days (<%= streak[:start_date].strftime('%b %d, %Y') %> <%= streak[:end_date].strftime('%b %d, %Y') %>)</div>
<div><strong>Total Plays:</strong> <%= streak[:total_plays] %></div>
<div><strong>Most Played Song:</strong> <%= streak[:most_played_song] || 'N/A' %> <%= "(#{streak[:most_played_song_count]} plays)" if streak[:most_played_song] %></div>
</div>
<% else %>
<div style="color: #888;">No listening streak yet. Start playing to build your first streak!</div>
<% end %>
</div>