remove hardcoded fontstyle and fix track duration

This commit is contained in:
Set Hallstrom 2020-07-28 11:59:32 +02:00
parent 1ccae56170
commit a9d285c464
5 changed files with 17 additions and 15 deletions

View file

@ -104,7 +104,7 @@ lang: en
</div> </div>
</div> </div>
<div class="content" style="font-family: monospace;font-size: 16px;margin-top:60px;"> <div class="content" style="font-size: 16px;margin-top:60px;">
{% for post in site.posts %} {% for post in site.posts %}
{% if post.album == page.slug %} {% if post.album == page.slug %}
{{ post.content }} {{ post.content }}

View file

@ -94,14 +94,14 @@
<div class="plItem"> <div class="plItem">
<div class="plNum">{{ track.common.track.no }}.</div> <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="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 }}:{{ round_seconds | minus: leftover_seconds }}</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> </div>
{% endfor %} {% endfor %}
</div> </div>
</div> </div>
<div class="content editable" style="font-family: monospace;font-size: 16px;margin-top:60px;"> <div class="content editable" style="font-size: 16px;margin-top:60px;">
{{ content }} {{ content }}
</div> </div>
</div> </div>
@ -120,7 +120,7 @@
<div class="content"> <div class="content">
<h3>{{ track.common.title }}</h3> <h3>{{ track.common.title }}</h3>
<p> <p>
{% 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 }}
<br /><strong>{{ track.common.genre }}</strong> <br /><strong>{{ track.common.genre }}</strong>
<br />{{ track.common.year }}</p> <br />{{ track.common.year }}</p>

View file

@ -56,15 +56,15 @@ layout: default
<!-- Content --> <!-- Content -->
<div class="content"> <div class="content">
{% if page.all.UNSYNCEDLYRICS and page.all.USLT %} {% if page.all.UNSYNCEDLYRICS and page.all.USLT %}
<p style="font-family: monospace;font-size:16px;"> <p style="font-size:16px;">
{{ page.all.USLT.text | newline_to_br }} {{ page.all.USLT.text | newline_to_br }}
</p> </p>
{% elsif page.all.USLT and page.all.UNSYNCEDLYRICS == nil %} {% elsif page.all.USLT and page.all.UNSYNCEDLYRICS == nil %}
<p style="font-family: monospace;font-size:16px;"> <p style="font-size:16px;">
{{ page.all.USLT.text | newline_to_br }} {{ page.all.USLT.text | newline_to_br }}
</p> </p>
{% elsif page.all.UNSYNCEDLYRICS and page.all.USLT == nil %} {% elsif page.all.UNSYNCEDLYRICS and page.all.USLT == nil %}
<p style="font-family: monospace;font-size:16px;"> <p style="font-size:16px;">
{{ page.all.UNSYNCEDLYRICS | newline_to_br }} {{ page.all.UNSYNCEDLYRICS | newline_to_br }}
</p> </p>
{% endif %} {% endif %}

View file

@ -41,18 +41,20 @@ image: /images/pages/jack-hamilton-CMnNiQBkwBI-unsplash.jpg
<p>{{ album.date | date: '%Y' }}</p> <p>{{ album.date | date: '%Y' }}</p>
{% for release in site.albums %}
{% for track in album.tracks %} {% if release.slug == album.album %}
<p style="margin-bottom: 30px; font-family: monospace;font-size: 14px"> {% for track in release.tracks %}
<p style="margin-bottom: 30px; font-size: 14px">
<strong>{{ track.common.track.no }}. {{ track.common.title }}</strong><br /> <strong>{{ track.common.track.no }}. {{ track.common.title }}</strong><br />
<span>{% 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 }}</span>{% if track.common.genre != null %} | <span>{% 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 }}</span>{% if track.common.genre != null %} |
<span style="font-family: monospace;font-size: 14px">{{ track.common.genre }} </span>{% endif %} <span style="font-size: 14px">{{ track.common.genre }} </span>{% endif %}
</p> </p>
{% endfor %} {% endfor %}
{% endif %}
{% endfor %}
<br /> <br />
<ul class="actions stacked"> <ul class="actions stacked">
<li><a href="{{ album.url }}" class="button small {% if post.category == 'releases' %}icon solid fa-volume-up{% endif %}">Cheggit!</a> <li><a href="{{ album.url }}" class="button small {% if post.category == 'releases' %}icon solid fa-volume-up{% endif %}">Cheggit!</a>

View file

@ -66,10 +66,10 @@ logo_image: /siteicon.png
<p>{{ album.date | date: '%Y' }}</p> <p>{{ album.date | date: '%Y' }}</p>
{% for track in album.tracks %} {% for track in album.tracks %}
<p style="margin-bottom: 30px; font-family: monospace;font-size: 14px"> <p style="margin-bottom: 30px;font-size: 14px">
<strong>{{ track.common.track.no }}. {{ track.common.title }}</strong><br /> <strong>{{ track.common.track.no }}. {{ track.common.title }}</strong><br />
<span>{% 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 }}</span> | <span>{% 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 }}</span> |
<span style="font-family: monospace;font-size: 14px">{{ track.common.genre }} </span> <span style="font-size: 14px">{{ track.common.genre }} </span>
</p> </p>
@ -106,7 +106,7 @@ logo_image: /siteicon.png
{% assign sorted = site.posts | sort: 'date' | reverse %} {% assign sorted = site.posts | sort: 'date' | reverse %}
{% for album in sorted | offset: '1' %} {% for album in sorted offset: '1' %}
{% if album.category == 'releases' %} {% if album.category == 'releases' %}
<section <section
class="spotlight style5 orient-{% cycle 'left', 'right' %} content-align-{% cycle 'right', 'left' %} image-position-center onscroll-image-fade-in" class="spotlight style5 orient-{% cycle 'left', 'right' %} content-align-{% cycle 'right', 'left' %} image-position-center onscroll-image-fade-in"