fix broken track selection
This commit is contained in:
parent
6992cedb14
commit
2759e9cb27
|
@ -62,6 +62,7 @@ collections:
|
|||
tracks:
|
||||
output: true
|
||||
permalink: /albums/:path/
|
||||
sort_by: common.year
|
||||
authors:
|
||||
output: false
|
||||
|
||||
|
|
|
@ -4,7 +4,11 @@ layout: default
|
|||
|
||||
{% include relBase.html %}
|
||||
<!-- Banner -->
|
||||
|
||||
{% for album in site.albums %}
|
||||
{% if album.slug == page.albumSlug %}
|
||||
{% assign onetracker = album.tracks | size %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
<div id="trackArt">
|
||||
<section>
|
||||
|
@ -25,7 +29,12 @@ layout: default
|
|||
<div id="trackInfo">
|
||||
<section>
|
||||
<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>
|
||||
|
||||
|
||||
|
@ -84,16 +93,16 @@ layout: default
|
|||
<div class="post-nav">
|
||||
|
||||
{% 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>
|
||||
<h3>{{page.previous.common.title}}</h3>
|
||||
<h3>{{ page.previous.common.title }}</h3>
|
||||
<p>{{ page.previous.description }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="post-nav-next">
|
||||
{% if page.next.url%}
|
||||
<h4><a href="{{page.next.url}}">Next <span class="fas fa-arrow-right"></span></a></h4>
|
||||
<h3>{{page.next.common.title}}</h3>
|
||||
<h4><a href="{{ page.next.url }}">Next <span class="fas fa-arrow-right"></span></a></h4>
|
||||
<h3>{{ page.next.common.title }}</h3>
|
||||
<p>{{ page.next.description }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
@ -129,22 +138,21 @@ layout: default
|
|||
|
||||
<div id="tracks">
|
||||
{% 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 %}
|
||||
|
||||
{% 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 %}
|
||||
</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>
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
function loadUrl(newLocation) {
|
||||
window.location = newLocation;
|
||||
|
@ -160,7 +168,7 @@ layout: default
|
|||
// only functional if "loop" is removed
|
||||
mu.pause();
|
||||
mu.currentTime = 0;
|
||||
loadUrl("{{ relBase }}/albums/{{ page.nextTrack.slug }}/"); return false;
|
||||
loadUrl("{{ relBase }}{{ page.next.url }}"); return false;
|
||||
});
|
||||
mu.onplaying = function() {
|
||||
pauseButton.innerHTML = "Pause";
|
||||
|
|
Loading…
Reference in a new issue