From a9d285c4647ee789d934eb52f8c09caac58cd664 Mon Sep 17 00:00:00 2001 From: Set Hallstrom Date: Tue, 28 Jul 2020 11:59:32 +0200 Subject: [PATCH] remove hardcoded fontstyle and fix track duration --- _layouts/album.html | 2 +- _layouts/post.html | 6 +++--- _layouts/track.html | 6 +++--- discography.html | 12 +++++++----- index.html | 6 +++--- 5 files changed, 17 insertions(+), 15 deletions(-) diff --git a/_layouts/album.html b/_layouts/album.html index 950556d..c8f0133 100644 --- a/_layouts/album.html +++ b/_layouts/album.html @@ -104,7 +104,7 @@ lang: en -
+
{% for post in site.posts %} {% if post.album == page.slug %} {{ post.content }} diff --git a/_layouts/post.html b/_layouts/post.html index 305a16b..068f5ba 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -94,14 +94,14 @@
{{ track.common.track.no }}.
-
{% assign round_seconds = track.format.duration | round %}{% assign minutes = round_seconds | divided_by: 60 %}{% assign leftover_seconds = minutes | times: 60 %}{{ minutes }}:{{ round_seconds | minus: leftover_seconds }}
+
{% 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 }}
{% endfor %}
-
+
{{ content }}
@@ -120,7 +120,7 @@

{{ track.common.title }}

- {% assign round_seconds = track.format.duration | round %}{% assign minutes = round_seconds | divided_by: 60 %}{% assign leftover_seconds = minutes | times: 60 %}{{ minutes }}:{{ round_seconds | minus: leftover_seconds }} + {% 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 }}
{{ track.common.genre }}
{{ track.common.year }}

diff --git a/_layouts/track.html b/_layouts/track.html index 6addafe..61bec84 100644 --- a/_layouts/track.html +++ b/_layouts/track.html @@ -56,15 +56,15 @@ layout: default
{% if page.all.UNSYNCEDLYRICS and page.all.USLT %} -

+

{{ page.all.USLT.text | newline_to_br }}

{% elsif page.all.USLT and page.all.UNSYNCEDLYRICS == nil %} -

+

{{ page.all.USLT.text | newline_to_br }}

{% elsif page.all.UNSYNCEDLYRICS and page.all.USLT == nil %} -

+

{{ page.all.UNSYNCEDLYRICS | newline_to_br }}

{% endif %} diff --git a/discography.html b/discography.html index a03581f..66858f4 100644 --- a/discography.html +++ b/discography.html @@ -41,18 +41,20 @@ image: /images/pages/jack-hamilton-CMnNiQBkwBI-unsplash.jpg

{{ album.date | date: '%Y' }}

- - {% for track in album.tracks %} -

+ {% for release in site.albums %} + {% if release.slug == album.album %} + {% for track in release.tracks %} +

{{ track.common.track.no }}. {{ track.common.title }}
{% 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 }}{% if track.common.genre != null %} | - {{ track.common.genre }} {% endif %} + {{ track.common.genre }} {% endif %}

{% endfor %} - + {% endif %} + {% endfor %}
  • Cheggit! diff --git a/index.html b/index.html index a0c6456..293cc7c 100644 --- a/index.html +++ b/index.html @@ -66,10 +66,10 @@ logo_image: /siteicon.png

    {{ album.date | date: '%Y' }}

    {% for track in album.tracks %} -

    +

    {{ track.common.track.no }}. {{ track.common.title }}
    {% 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 }} | - {{ track.common.genre }} + {{ track.common.genre }}

    @@ -106,7 +106,7 @@ logo_image: /siteicon.png {% assign sorted = site.posts | sort: 'date' | reverse %} -{% for album in sorted | offset: '1' %} +{% for album in sorted offset: '1' %} {% if album.category == 'releases' %}