This repository has been archived on 2025-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
coryd.dev-eleventy/src/_includes/partials/now/track-chart.liquid
2024-04-15 12:37:32 -07:00

19 lines
No EOL
697 B
Text

{% if data.size > 0 %}
<div class="track__chart">
{% for item in data limit: 10 %}
{%- assign percentage = item.plays | calculatePlayPercentage: mostPlayed -%}
<div class="track__chart--item">
<div class="track__chart--presentation">
<div class="track__chart--count">{{ forloop.index }}.</div>
<div class="track__chart--info">
<div class="track__chart--title">{{ item.title }}</div>
<div class="track__chart--artists">
<a href="{{ item.url }}">{{ item.artist }}</a> • {{ item.plays }} plays
</div>
</div>
</div>
{% render "partials/now/progress-bar.liquid", percentage:percentage %}
</div>
{% endfor %}
</div>
{% endif %}