basspistol.com/_layouts/track.html

175 lines
7.4 KiB
HTML
Raw Normal View History

2019-04-01 23:16:35 +02:00
---
2020-07-09 10:15:00 +02:00
layout: default
2019-04-01 23:16:35 +02:00
---
2020-07-09 10:15:00 +02:00
2019-12-16 12:12:57 +01:00
{% include relBase.html %}
2020-07-09 10:15:00 +02:00
<!-- Banner -->
<section
2020-07-28 12:11:59 +02:00
class="banner onload-image-fade-in onload-content-fade-right style3 fullscreen content-align-center image-position-center" style="background-image:url('{{ site.mediaurl }}/{{ page.slug }}.jpeg');background-size: cover; background-repeat: no-repeat;">
2020-07-15 14:57:40 +02:00
<div style="z-index:0;position:absolute; top:0; left:0; width:100%;min-height:100%;background-color: rgba(13, 13 ,13, 0.5);"></div>
2020-07-28 12:11:59 +02:00
<div id="mainwrap" class="content" style="z-index:1">
2020-07-09 10:15:00 +02:00
<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 }}
2020-07-09 10:15:00 +02:00
</p>
<p><strong><span id="tracktime"></span></strong><span id="{{ page.common.title | slugify | remove: '-' }}"></span></strong></p>
2020-07-09 10:15:00 +02:00
<script type="text/javascript">
var {{ page.common.title | slugify | remove: '-' }}timestamp = {{ page.format.duration | round }};
var {{ page.common.title | slugify | remove: '-' }}hours = Math.floor({{ page.common.title | slugify | remove: '-' }}timestamp / 60 / 60);
var {{ page.common.title | slugify | remove: '-' }}minutes = Math.floor({{ page.common.title | slugify | remove: '-' }}timestamp / 60) - ({{ page.common.title | slugify | remove: '-' }}hours * 60);
var {{ page.common.title | slugify | remove: '-' }}seconds = {{ page.common.title | slugify | remove: '-' }}timestamp % 60;
var {{ page.common.title | slugify | remove: '-' }}formatted = {{ page.common.title | slugify | remove: '-' }}hours.toString().padStart(2, '0') + ':' + {{ page.common.title | slugify | remove: '-' }}minutes.toString().padStart(2, '0') + ':' + {{ page.common.title | slugify | remove: '-' }}seconds.toString().padStart(2, '0');
var theSpan = document.getElementById("{{ page.common.title | slugify | remove: '-' }}");
theSpan.innerHTML = {{ page.common.title | slugify | remove: '-' }}formatted;
</script>
<ul class="actions stacked">
2020-07-29 13:52:06 +02:00
<li><button id="mu_pause" class="button small icon solid fa-play">Play!</button></li>
2020-07-09 10:15:00 +02:00
</ul>
</div>
2020-07-28 12:11:59 +02:00
<div id="noJSalbum" class="content" style="z-index:1">
<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">
2020-07-29 13:52:06 +02:00
<li><a class="button small icon solid fa-play" target="_blank" rel="noopener" href="{{ site.mediaurl }}/{{ page.albumSlug }}/{{ page.trackSlug }}.mp3">Play dat!</a></li>
2020-07-28 12:11:59 +02:00
</ul>
</div>
2020-07-09 10:15:00 +02:00
<div class="image">
2020-07-28 12:11:59 +02:00
<img src="{{ site.mediaurl }}/{{ page.slug }}.jpeg" alt="{{ page.title }} logo" id="coverart" />
2020-07-09 10:15:00 +02:00
</div>
</section>
2020-07-10 16:54:52 +02:00
2020-07-09 10:15:00 +02:00
<!-- Content -->
<section class="wrapper style1 align-center">
<div class="inner" style="padding-top:40px">
<div class="index align-left">
<section style="padding-top:40px">
{% include author.html %}
<!-- Content -->
<div class="content">
2020-07-28 12:11:59 +02:00
{% if page.all.UNSYNCEDLYRICS and page.all.USLT %}
<p style="font-size:16px;">
{{ page.all.USLT.text | newline_to_br }}
</p>
{% elsif page.all.USLT and page.all.UNSYNCEDLYRICS == nil %}
<p style="font-size:16px;">
{{ page.all.USLT.text | newline_to_br }}
</p>
{% elsif page.all.UNSYNCEDLYRICS and page.all.USLT == nil %}
2020-07-28 12:09:08 +02:00
<p style="font-size:16px;">
2020-07-09 10:15:00 +02:00
{{ page.all.UNSYNCEDLYRICS | newline_to_br }}
</p>
2020-07-28 12:11:59 +02:00
{% endif %}
<p>
2020-07-09 10:15:00 +02:00
{{ page.all.Comment }}
</p>
</div>
</section>
</div>
</div>
</section>
2020-07-28 12:11:59 +02:00
{% for post in site.posts %}
{% if post.album == page.albumSlug %}
2020-07-09 10:15:00 +02:00
{% include streamer.html %}
2020-07-28 12:11:59 +02:00
{% endif %}
{% endfor %}
2020-07-09 10:15:00 +02:00
<!-- Page navigation -->
<section class="wrapper style1 align-center">
<div class="inner">
<div class="index align-left">
<!-- Author -->
<section>
<!-- Content -->
<div class="content">
<!-- post Naviation -->
<div style="text-align: center;">
<h3>Play more songs grom this release</h3>
</div>
<div class="post-nav">
<div>
2020-07-28 15:51:46 +02:00
2020-07-28 16:12:32 +02:00
<h4><a href="{{ relBase }}/tracks/{{ page.previousTrack.slug }}/" alt="Read {{ page.previousTrack.common.title }}" title="Read {{ page.previousTrack.common.title }}"><i class="fas fa-arrow-left"></i></a> <a
href="{{ relBase }}/tracks/{{ page.previousTrack.slug }}/">&nbsp;{{ page.previousTrack.common.title }}</a>
2020-07-09 10:15:00 +02:00
</h4>
2020-07-28 15:51:46 +02:00
2020-07-09 10:15:00 +02:00
</div>
<div class="post-nav-next">
2020-07-28 15:51:46 +02:00
2020-07-28 16:12:32 +02:00
<h4><a href="{{ relBase }}/tracks/{{ page.nextTrack.slug }}/">&nbsp;{{ page.nextTrack.common.title }}</a> <a
href="{{ relBase }}/tracks/{{ page.nextTrack.slug }}/" alt="Read {{ page.nextTrack.common.title }}" title="Read {{ page.nextTrack.common.title }}"><i class="fas fa-arrow-right"></i></a></h4>
2020-07-28 15:51:46 +02:00
2020-07-09 10:15:00 +02:00
</div>
</div>
<!-- End Post Navigation -->
</div>
</section>
2019-04-01 23:16:35 +02:00
</div>
</div>
2020-07-09 10:15:00 +02:00
</section>
<!-- Audio player-->
2020-07-11 16:18:43 +02:00
<audio autoplay preload="metadata" data-matomo-title="{{ page.common.title }}">
2020-07-28 12:11:59 +02:00
<source src="{{ site.mediaurl }}/{{ page.slug }}.mp3" type="audio/mpeg" ontimeupdate='updateTrackTime(this);' />
2020-07-09 10:15:00 +02:00
<h1>Your browser isn't ready for so much hotness. Use the download-link instead.</h1>.
</audio>
{% include footer.html %}
<script type="text/javascript">
function loadUrl(newLocation) {
2019-04-01 23:16:35 +02:00
window.location = newLocation;
return false;
2020-07-09 10:15:00 +02:00
}
var mu = document.getElementsByTagName("audio")[0];
var pauseButton = document.getElementById("mu_pause");
var spincover = document.getElementById("coverart");
mu.addEventListener('ended', function () {
2019-04-01 23:16:35 +02:00
// only functional if "loop" is removed
mu.pause();
2020-07-09 10:15:00 +02:00
mu.currentTime = 0;
2020-07-28 16:12:32 +02:00
loadUrl("{{ relBase }}/tracks/{{ page.nextTrack.slug }}/"); return false;
2020-07-09 10:15:00 +02:00
});
mu.onplaying = function() {
pauseButton.innerHTML = "Pause";
pauseButton.classList.remove("fa-play");
pauseButton.classList.add("fa-pause");
spincover.classList.add("spinnit");
spincover.classList.remove("paused");
};
2019-04-01 23:16:35 +02:00
2020-07-09 10:15:00 +02:00
pauseButton.addEventListener("click", function () {
2019-04-01 23:16:35 +02:00
if (mu.paused) {
2020-07-09 10:15:00 +02:00
mu.play();
2019-04-01 23:16:35 +02:00
}
2020-07-09 10:15:00 +02:00
else {
mu.pause();
pauseButton.innerHTML = "Resume";
pauseButton.classList.add("fa-play");
pauseButton.classList.remove("fa-pause");
spincover.classList.add("paused");
}
});
mu.addEventListener('timeupdate', function () {
var timestamp = Math.floor(mu.currentTime);
var hours = Math.floor(timestamp / 60 / 60);
var minutes = Math.floor(timestamp / 60) - (hours * 60);
var seconds = timestamp % 60;
var formatted = hours.toString().padStart(2, '0') + ':' + minutes.toString().padStart(2, '0') + ':' + seconds.toString().padStart(2, '0');
var thecurrentSpan = document.getElementById("tracktime");
thecurrentSpan.innerHTML = formatted + ' / ';
});
2019-04-01 23:16:35 +02:00
2020-07-28 15:51:46 +02:00
</script>