fix broken track selection
This commit is contained in:
parent
6992cedb14
commit
2759e9cb27
|
@ -62,6 +62,7 @@ collections:
|
||||||
tracks:
|
tracks:
|
||||||
output: true
|
output: true
|
||||||
permalink: /albums/:path/
|
permalink: /albums/:path/
|
||||||
|
sort_by: common.year
|
||||||
authors:
|
authors:
|
||||||
output: false
|
output: false
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,11 @@ layout: default
|
||||||
|
|
||||||
{% include relBase.html %}
|
{% include relBase.html %}
|
||||||
<!-- Banner -->
|
<!-- Banner -->
|
||||||
|
{% for album in site.albums %}
|
||||||
|
{% if album.slug == page.albumSlug %}
|
||||||
|
{% assign onetracker = album.tracks | size %}
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
<div id="trackArt">
|
<div id="trackArt">
|
||||||
<section>
|
<section>
|
||||||
|
@ -25,7 +29,12 @@ layout: default
|
||||||
<div id="trackInfo">
|
<div id="trackInfo">
|
||||||
<section>
|
<section>
|
||||||
<p>{% for style in page.common.genre %}{{ style }}{% endfor %} by <strong>{{ page.common.artist }}</strong></p>
|
<p>{% for style in page.common.genre %}{{ style }}{% endfor %} by <strong>{{ page.common.artist }}</strong></p>
|
||||||
<p>{{ page.common.year }}</p>
|
{% for post in site.posts %}
|
||||||
|
{% if post.album == page.albumSlug %}
|
||||||
|
<p>From the {{ page.common.year }} {% if onetracker > 1 %}release{% else %}single{% endif %} <a href="{{ relBase }}{{ post.url }}">"{{ page.common.album }}"</a></p>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
<p><strong>{% assign round_seconds = page.format.duration | round %}{% assign minutes = round_seconds | divided_by: 60 %}{% assign leftover_seconds = minutes | times: 60 %}{{ minutes }}:{% assign seconds_without_zero = round_seconds | minus: leftover_seconds %}{% if seconds_without_zero < 10 %}0{% endif %}{{ seconds_without_zero }}</strong></p>
|
<p><strong>{% assign round_seconds = page.format.duration | round %}{% assign minutes = round_seconds | divided_by: 60 %}{% assign leftover_seconds = minutes | times: 60 %}{{ minutes }}:{% assign seconds_without_zero = round_seconds | minus: leftover_seconds %}{% if seconds_without_zero < 10 %}0{% endif %}{{ seconds_without_zero }}</strong></p>
|
||||||
|
|
||||||
|
|
||||||
|
@ -84,7 +93,7 @@ layout: default
|
||||||
<div class="post-nav">
|
<div class="post-nav">
|
||||||
|
|
||||||
{% if page.previous.url %}
|
{% if page.previous.url %}
|
||||||
<h4><a href="{{page.previous.url}}" alt="Read {{page.previous.title}}" title="Read {{page.previous.title}}"><span
|
<h4><a href="{{ relBase }}{{ page.previous.url }}" alt="Read {{ page.previous.title }}" title="Read {{ page.previous.title }}"><span
|
||||||
class="fas fa-arrow-left"></span> Previous</a></h4>
|
class="fas fa-arrow-left"></span> Previous</a></h4>
|
||||||
<h3>{{ page.previous.common.title }}</h3>
|
<h3>{{ page.previous.common.title }}</h3>
|
||||||
<p>{{ page.previous.description }}</p>
|
<p>{{ page.previous.description }}</p>
|
||||||
|
@ -129,22 +138,21 @@ layout: default
|
||||||
|
|
||||||
<div id="tracks">
|
<div id="tracks">
|
||||||
{% if page.previous.url %}
|
{% if page.previous.url %}
|
||||||
<a id="btnPrev" href="{{page.previous.url}}"><span class="fas fa-fast-backward"></span></a>
|
<a id="btnPrev" href="{{ relBase }}{{ page.previous.url }}"><span class="fas fa-fast-backward"></span></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if page.next.url %}
|
{% if page.next.url %}
|
||||||
<a id="btnNext"href="{{page.next.url}}"><span class="fas fa-fast-forward"></span></a>
|
<a id="btnNext" href="{{ relBase }}{{ page.next.url }}"><span class="fas fa-fast-forward"></span></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
<p id="npTitle" style="font-weight: bold;">{{ page.common.title }} </p>
|
||||||
|
|
||||||
<p class="right" id="npTitle" style="font-weight: bold;">{{ page.common.title }} </a></p>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function loadUrl(newLocation) {
|
function loadUrl(newLocation) {
|
||||||
window.location = newLocation;
|
window.location = newLocation;
|
||||||
|
@ -160,7 +168,7 @@ layout: default
|
||||||
// only functional if "loop" is removed
|
// only functional if "loop" is removed
|
||||||
mu.pause();
|
mu.pause();
|
||||||
mu.currentTime = 0;
|
mu.currentTime = 0;
|
||||||
loadUrl("{{ relBase }}/albums/{{ page.nextTrack.slug }}/"); return false;
|
loadUrl("{{ relBase }}{{ page.next.url }}"); return false;
|
||||||
});
|
});
|
||||||
mu.onplaying = function() {
|
mu.onplaying = function() {
|
||||||
pauseButton.innerHTML = "Pause";
|
pauseButton.innerHTML = "Pause";
|
||||||
|
|
Loading…
Reference in a new issue