setto.basspistol.com/_layouts/track.html

199 lines
5.5 KiB
HTML
Raw Normal View History

2020-07-24 14:34:09 +02:00
---
layout: default
---
{% include relBase.html %}
<!-- Banner -->
2020-08-03 21:40:11 +02:00
2020-08-04 10:48:11 +02:00
<div id="trackArt">
2020-08-03 21:40:11 +02:00
<section>
<div class="coverartwrapper">
<div class="coverartwrapped" id="coverart" style="background-image: url({{ site.mediaurl }}/{{ page.slug }}.jpeg);"></div>
2020-07-24 14:34:09 +02:00
</div>
2020-08-03 21:40:11 +02:00
<div class="playbutton">
<a id="mu_pause" class="button">Play!</a>
</div>
<p><strong>{% for style in page.common.genre %}{{ style }}{% endfor %}</strong> by <strong>{{ page.common.artist }}</strong>
<br />{{ page.common.year }}
</p>
2020-07-24 14:34:09 +02:00
</section>
2020-08-03 21:40:11 +02:00
</div>
<!-- Content -->
<div id="trackInfo">
<section>
<h1 style="margin-top:80px">{{ page.common.title }}</h1>
2020-08-04 10:48:11 +02:00
<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>
2020-08-03 21:40:11 +02:00
{% include author.html %}
<div class="noJSalbum">
<h1 style="margin-top:80px">{{ page.common.title }}</h1>
<p><strong>{% for style in page.common.genre %}{{ style }}{% endfor %}</strong> by <strong>{{ page.common.artist }}</strong>
<br />{{ page.common.year }}
</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>
<ul class="actions stacked">
<li><a class="button" target="_blank" rel="noopener" href="{{ site.mediaurl }}/{{ page.albumSlug }}/{{ page.trackSlug }}.mp3"><span class="fas fa-play"></span> Play!</a></li>
</ul>
</div>
2020-07-24 14:34:09 +02:00
<!-- Content -->
2020-08-04 10:48:11 +02:00
2020-08-03 21:40:11 +02:00
{% if page.all.UNSYNCEDLYRICS and page.all.USLT %}
2020-08-04 10:48:11 +02:00
<div class="info">
<p>
{{ page.all.USLT.text | newline_to_br }}
</p>
</div>
2020-08-03 21:40:11 +02:00
{% elsif page.all.USLT and page.all.UNSYNCEDLYRICS == nil %}
2020-08-04 10:48:11 +02:00
<div class="info">
<p>
{{ page.all.USLT.text | newline_to_br }}
</p>
</div>
2020-08-03 21:40:11 +02:00
{% elsif page.all.UNSYNCEDLYRICS and page.all.USLT == nil %}
2020-08-04 10:48:11 +02:00
<div class="info">
<p>
{{ page.all.UNSYNCEDLYRICS | newline_to_br }}
</p>
</div>
2020-08-03 21:40:11 +02:00
{% endif %}
<p>
{{ page.all.Comment }}
</p>
2020-08-04 10:48:11 +02:00
{% for albumurl in site.posts %}
{% if albumurl.album == page.albumSlug %}
<a href="{{ relBase }}{{ albumurl.url }}" class="button">See release page</a>
{% endif %}
{% endfor %}
2020-07-24 14:34:09 +02:00
</section>
2020-07-27 14:37:24 +02:00
{% for post in site.posts %}
{% if post.album == page.albumSlug %}
2020-07-24 14:34:09 +02:00
{% include streamer.html %}
2020-07-27 14:37:24 +02:00
{% endif %}
{% endfor %}
2020-08-03 21:40:11 +02:00
<!-- post Naviation -->
<section class="post-navigation">
{% if page.previous.url or page.next.url %}
2020-07-28 15:50:30 +02:00
2020-08-03 21:40:11 +02:00
<h2>Track Navigation</h2>
2020-07-28 15:50:30 +02:00
2020-08-03 21:40:11 +02:00
<div class="post-nav">
2020-07-28 15:50:30 +02:00
2020-08-03 21:40:11 +02:00
{% if page.previous.url %}
<h4><a href="{{page.previous.url}}" alt="Read {{page.previous.title}}" title="Read {{page.previous.title}}"><span
class="fas fa-arrow-left"></span>&nbsp;Previous</a></h4>
<h3>{{page.previous.common.title}}</h3>
<p>{{ page.previous.description }}</p>
{% endif %}
2020-07-24 14:34:09 +02:00
</div>
2020-08-03 21:40:11 +02:00
<div class="post-nav-next">
{% if page.next.url%}
<h4><a href="{{page.next.url}}">Next&nbsp;<span class="fas fa-arrow-right"></span></a></h4>
<h3>{{page.next.common.title}}</h3>
<p>{{ page.next.description }}</p>
{% endif %}
</div>
{% endif %}
2020-07-24 14:34:09 +02:00
</section>
2020-08-03 21:40:11 +02:00
{% include footer.html %}
<!-- End Post Navigation -->
</div>
2020-07-24 14:34:09 +02:00
<!-- Audio player-->
2020-08-03 21:40:11 +02:00
<div id="fixedPlayer" class="showplayer hideplayer">
<div id="audiowrap">
<div id="audio0">
<audio controls autoplay preload="metadata" data-matomo-title="{{ page.common.title }}">
<source src="{{ site.mediaurl }}/{{ page.slug }}.mp3" type="audio/mpeg" ontimeupdate='updateTrackTime(this);' />
<h1>Your browser isn't ready for so much hotness. Use the download-link instead.</h1>.
</audio>
</div>
</div>
<div id="nowPlay">
<div id="tracks">
{% if page.previous.url %}
<a id="btnPrev" href="{{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>
{% endif %}
</div>
<p class="right" id="npTitle" style="font-weight: bold;">{{ page.common.title }} </a></p>
</div>
</div>
2020-07-24 14:34:09 +02:00
<script type="text/javascript">
function loadUrl(newLocation) {
window.location = newLocation;
return false;
}
var mu = document.getElementsByTagName("audio")[0];
var pauseButton = document.getElementById("mu_pause");
var spincover = document.getElementById("coverart");
2020-08-04 10:48:11 +02:00
var fixedplayer = document.getElementById("fixedPlayer");
2020-07-24 14:34:09 +02:00
mu.addEventListener('ended', function () {
// only functional if "loop" is removed
mu.pause();
mu.currentTime = 0;
loadUrl("{{ relBase }}/albums/{{ page.nextTrack.slug }}/"); return false;
});
mu.onplaying = function() {
pauseButton.innerHTML = "Pause";
2020-08-03 21:40:11 +02:00
fixedplayer.classList.remove("hideplayer");
2020-08-04 10:48:11 +02:00
2020-07-24 14:34:09 +02:00
};
pauseButton.addEventListener("click", function () {
if (mu.paused) {
mu.play();
}
else {
mu.pause();
2020-08-03 21:40:11 +02:00
2020-08-04 10:48:11 +02:00
2020-07-24 14:34:09 +02:00
}
});
2020-08-04 10:48:11 +02:00
mu.addEventListener('playing', function () {
spincover.classList.add("spinnit");
spincover.classList.remove("paused");
2020-07-24 14:34:09 +02:00
});
2020-08-04 10:48:11 +02:00
mu.addEventListener('pause', function () {
spincover.classList.add("paused");
pauseButton.innerHTML = "Resume";
});
2020-07-24 14:34:09 +02:00
2020-07-28 15:50:30 +02:00
</script>