revamps
This commit is contained in:
parent
1c3e2d83dc
commit
79682bb286
14 changed files with 180 additions and 194 deletions
|
|
@ -3,129 +3,133 @@ layout: default
|
|||
---
|
||||
{% if page.category == 'releases' %}
|
||||
|
||||
{% include header.html %}
|
||||
|
||||
{% include relBase.html %}
|
||||
|
||||
<header class="hero" style="background-image: url({{ relBase }}{{ page.image }});">
|
||||
<div class="imagecontainer">
|
||||
<h4>{{ page.title }}</h4>
|
||||
</div>
|
||||
<div class="splash">
|
||||
<div class="splash-logo">
|
||||
{% for album in site.albums %}
|
||||
{% if page.album == album.slug %}
|
||||
<div class="coverart">
|
||||
<div class="coverartwrapper">
|
||||
<div id="npImage" class="coverartwrapped"></div>
|
||||
</div>
|
||||
{% assign author_id = page.author | prepend: "/authors/" | append: "/" %}
|
||||
{% assign author = site.authors | where: "url", author_id | first %}
|
||||
<div id="author">
|
||||
<div class="bio">
|
||||
<p class="date">
|
||||
Published the
|
||||
<time datetime="{{ page.date }}">{% include dates.html %}</time>
|
||||
</p>
|
||||
<h6>
|
||||
Share this page:
|
||||
</h6>
|
||||
<ul>
|
||||
<a target="_blank" rel="nofollow noopener" title="Share to facebook" alt="Share to facebook" href="https://touch.facebook.com/sharer.php?u={{ site.url }}{{ page.url | xml_escape }}?pk_campaign=homeshare&quote={{ page.description | xml_escape }}%20By%20{{ site.title | xml_escape }}%20via%20{{ site.url }}" class="icon smaller fab fa-facebook-f"><span class="label">Facebook</span></a>
|
||||
<a target="_blank" rel="nofollow noopener" title="Share to twitter" alt="Share to twitter" href="https://twitter.com/share?url={{ site.url }}{{ page.url | xml_escape }}?pk_campaign=homeshare&text={{ page.description | xml_escape }}%20via%20@{{ site.social.usernames.twitter }}%20&hashtags=#{{ site.social.hashtag }}" class="icon smaller fab fa-twitter"><span class="label">Twitter</span></a>
|
||||
<a target="_blank" rel="nofollow noopener" title="Share to telegram" alt="Share to telgram" href="https://telegram.me/share/url?url={{ site.url }}{{ page.url }}?pk_campaign=homeshare&text={{ page.description | xml_escape }}%20via%20@{{ site.social.usernames.telegram }}" class="icon smaller fab fa-telegram"><span class="label ">Telegram</span></a>
|
||||
<a target="_blank" rel="nofollow noopener" title="Share to reddit" alt="Share to reddit" href="https://reddit.com/submit/?url={{ site.url }}{{ page.url }}?pk_campaign=homeshare&title={{ page.description | xml_escape }}%20By%20{{ site.title | xml_escape }}" class="icon smaller fab fa-reddit"><span class="label">Reddit</span></a>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}{% endfor %}
|
||||
</div>
|
||||
<div class="description">
|
||||
|
||||
<h1>{{ page.title }}</h1>
|
||||
<p>{{ page.description }}</p>
|
||||
|
||||
{% for album in site.albums %}
|
||||
{% if page.album == album.slug %}
|
||||
{% assign onetracker = album.tracks | size %}
|
||||
<div class="player-wrap">
|
||||
|
||||
<div id="plwrap">
|
||||
<h4>Track list</h4>
|
||||
<ul id="plList">
|
||||
{% for track in album.tracks %}
|
||||
<li class="" {% if onetracker == 1 %}style="border-radius: 5px;"{% endif %}>
|
||||
<div class="plItem">
|
||||
<div class="plNum">{{ track.common.track.no }}.</div>
|
||||
<div class="plTitle">{{ track.common.title }}</div>
|
||||
<div class="plLength">
|
||||
{% assign round_seconds = track.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 }}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="noJSalbum">
|
||||
<div class="coverartwrapper">
|
||||
<div class="coverartwrapped" style="background-image: url({{ page.image }});"></div>
|
||||
</div>
|
||||
{% for track in album.tracks %}
|
||||
|
||||
<div class="plItem">
|
||||
<div class="plNum">{{ track.common.track.no }}.</div>
|
||||
<div class="plTitle"><a href="{{ site.mediaurl }}/{{ track.albumSlug }}/{{ track.trackSlug }}.mp3" target="_blank"
|
||||
rel="noopener">{{ track.common.title }} </a></div>
|
||||
<div class="plLength">
|
||||
{% assign round_seconds = track.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 }}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
function generateRandomPosts()
|
||||
{
|
||||
$.getJSON("/posts.json", function(data) {
|
||||
console.log("[posts.json loaded for random posts]");
|
||||
|
||||
var postsCount = data.length;
|
||||
var posts = data;
|
||||
|
||||
var randomIndexUsed = [];
|
||||
var counter = 0;
|
||||
var numberOfPosts = 1;
|
||||
|
||||
var divRandomPosts = $("#random_posts");
|
||||
|
||||
while (counter < numberOfPosts)
|
||||
{
|
||||
var randomIndex = Math.floor(Math.random() * postsCount);
|
||||
|
||||
if (randomIndexUsed.indexOf(randomIndex) == "-1")
|
||||
{
|
||||
var postHREF = posts[randomIndex].href;
|
||||
var postTitle = posts[randomIndex].title;
|
||||
|
||||
if (counter == (numberOfPosts - 1))
|
||||
{
|
||||
divRandomPosts.append('<a class="button" href="' + postHREF + '">🔥</a>');
|
||||
}
|
||||
else
|
||||
{
|
||||
divRandomPosts.append('<a class="button" href="' + postHREF + '">🔥</a>');
|
||||
}
|
||||
|
||||
randomIndexUsed.push(randomIndex);
|
||||
|
||||
counter++;
|
||||
}
|
||||
function generateRandomPosts() {
|
||||
$.getJSON("/posts.json", function (data) {
|
||||
console.log("[posts.json loaded for random posts]");
|
||||
var postsCount = data.length;
|
||||
var posts = data;
|
||||
var randomIndexUsed = [];
|
||||
var counter = 0;
|
||||
var numberOfPosts = 1;
|
||||
var divRandomPosts = $("#random_posts");
|
||||
while (counter < numberOfPosts) {
|
||||
var randomIndex = Math.floor(Math.random() * postsCount);
|
||||
if (randomIndexUsed.indexOf(randomIndex) == "-1") {
|
||||
var postHREF = posts[randomIndex].href;
|
||||
var postTitle = posts[randomIndex].title;
|
||||
if (counter == (numberOfPosts - 1)) {
|
||||
divRandomPosts.append('<a class="button" href="' + postHREF + '">🔥</a>');
|
||||
}
|
||||
});
|
||||
else {
|
||||
divRandomPosts.append('<a class="button" href="' + postHREF + '">🔥</a>');
|
||||
}
|
||||
randomIndexUsed.push(randomIndex);
|
||||
counter++;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
generateRandomPosts();
|
||||
$(document).ready(function () {
|
||||
generateRandomPosts();
|
||||
});
|
||||
|
||||
</script>
|
||||
<section id="play">
|
||||
<div class="album-player">
|
||||
|
||||
<!-- HERE BEGINS MADNESS -->
|
||||
|
||||
{% for album in site.albums %}
|
||||
{% if page.album == album.slug %}
|
||||
{% assign onetracker = album.tracks | size %}
|
||||
<div class="player-wrap">
|
||||
|
||||
<div id="plwrap">
|
||||
<h2>Track list</h2>
|
||||
<ul id="plList">
|
||||
{% for track in album.tracks %}
|
||||
<li class="" {% if onetracker == 1 %}style="border-radius: 5px;"{% endif %}>
|
||||
<div class="plItem">
|
||||
<div class="plNum">{{ track.common.track.no }}.</div>
|
||||
<div class="plTitle">{{ track.common.title }}</div>
|
||||
<div class="plLength">
|
||||
{% assign round_seconds = track.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 }}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
<h2 style="text-align: center;"><a href="#support" class="button">🙏 Support</a></h2>
|
||||
</div>
|
||||
<div class="noJSalbum">
|
||||
<div class="coverartwrapper">
|
||||
<div class="coverartwrapped" style="background-image: url({{ page.image }});"></div>
|
||||
</div>
|
||||
{% for track in album.tracks %}
|
||||
|
||||
<div class="plItem">
|
||||
<div class="plNum">{{ track.common.track.no }}.</div>
|
||||
<div class="plTitle"><a href="{{ site.mediaurl }}/{{ track.albumSlug }}/{{ track.trackSlug }}.mp3" target="_blank"
|
||||
rel="noopener">{{ track.common.title }} </a></div>
|
||||
<div class="plLength">
|
||||
{% assign round_seconds = track.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 }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="coverart">
|
||||
<div class="coverartwrapper">
|
||||
<div id="npImage" class="coverartwrapped"></div>
|
||||
</div>
|
||||
|
||||
{% assign author_id = page.author | prepend: "/authors/" | append: "/" %}
|
||||
{% assign author = site.authors | where: "url", author_id | first %}
|
||||
<div id="author">
|
||||
<div class="bio">
|
||||
<p class="date">
|
||||
Published the
|
||||
<time datetime="{{ page.date }}">{% include dates.html %}</time>
|
||||
</p>
|
||||
<h6>
|
||||
Share this page:
|
||||
</h6>
|
||||
<ul>
|
||||
<a target="_blank" rel="nofollow noopener" title="Share to facebook" alt="Share to facebook" href="https://touch.facebook.com/sharer.php?u={{ site.url }}{{ page.url | xml_escape }}?pk_campaign=homeshare&quote={{ page.description | xml_escape }}%20By%20{{ site.title | xml_escape }}%20via%20{{ site.url }}" class="icon smaller fab fa-facebook-f"><span class="label">Facebook</span></a>
|
||||
<a target="_blank" rel="nofollow noopener" title="Share to twitter" alt="Share to twitter" href="https://twitter.com/share?url={{ site.url }}{{ page.url | xml_escape }}?pk_campaign=homeshare&text={{ page.description | xml_escape }}%20via%20@{{ site.social.usernames.twitter }}%20&hashtags=#{{ site.social.hashtag }}" class="icon smaller fab fa-twitter"><span class="label">Twitter</span></a>
|
||||
<a target="_blank" rel="nofollow noopener" title="Share to telegram" alt="Share to telgram" href="https://telegram.me/share/url?url={{ site.url }}{{ page.url }}?pk_campaign=homeshare&text={{ page.description | xml_escape }}%20via%20@{{ site.social.usernames.telegram }}" class="icon smaller fab fa-telegram"><span class="label ">Telegram</span></a>
|
||||
<a target="_blank" rel="nofollow noopener" title="Share to reddit" alt="Share to reddit" href="https://reddit.com/submit/?url={{ site.url }}{{ page.url }}?pk_campaign=homeshare&title={{ page.description | xml_escape }}%20By%20{{ site.title | xml_escape }}" class="icon smaller fab fa-reddit"><span class="label">Reddit</span></a>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="info">
|
||||
<div class="container">
|
||||
{{ content }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue