feat: dedicated music page
This commit is contained in:
parent
3d08ecfa7a
commit
a43598263b
38 changed files with 475 additions and 103 deletions
30
src/pages/main/music/tracks/3-months.html
Normal file
30
src/pages/main/music/tracks/3-months.html
Normal file
|
@ -0,0 +1,30 @@
|
|||
---
|
||||
title: Tracks • 3 months
|
||||
layout: default
|
||||
pagination:
|
||||
data: music.threeMonth.tracks
|
||||
size: 50
|
||||
permalink: "/music/tracks/three-months/{% if pagination.pageNumber > 0 %}{{ pagination.pageNumber | plus: 1 }}/{% endif %}index.html"
|
||||
---
|
||||
<p><a class="link-icon flex-centered" href="/music">{% tablericon "arrow-left" "Go back" %} Go back</a></p>
|
||||
<h2 class="page-header">{{ title }}</h2>
|
||||
<p>I've listened to <strong class="highlight-text">{{ music.threeMonth.tracks.size }} tracks</strong> over the last 3 months and most of what I've listened to has been <strong class="highlight-text">{{ music.threeMonth.genres | genresToString: 5 }}</strong>.</p>
|
||||
<hr class="large-spacing" />
|
||||
<div class="music-chart">
|
||||
{% for item in pagination.items %}
|
||||
{%- assign percentage = item.plays | calculatePlayPercentage: music.threeMonth.tracks[0].plays -%}
|
||||
<div class="item">
|
||||
<div class="presentation">
|
||||
<div class="count">{{ forloop.index }}.</div>
|
||||
<div class="info">
|
||||
<div class="title">
|
||||
<a href="{{ item.url }}">{{ item.title }}</a>
|
||||
</div>
|
||||
<div class="subtext">{{ item.artist }} • {{ item.plays }} plays</div>
|
||||
</div>
|
||||
</div>
|
||||
{% render "partials/now/progress-bar.liquid", percentage:percentage %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% render "partials/widgets/paginator.liquid", pagination:pagination %}
|
Reference in a new issue