dynamise share links

This commit is contained in:
sakrecoer 2020-10-16 13:07:34 +02:00
parent b3fd04e19a
commit b255d4052f
3 changed files with 73 additions and 31 deletions

View file

@ -43,7 +43,12 @@ social:
- https://twitter.com/ToSettoSetto
- https://instagram.com/ToSettoSetto
- https://mastodon.art/@tosettosetto
- https://pixfed.com/tosettosetoo
- https://www.facebook.com/徒-setto-セット-100627981795265
usernames:
twitter: ToSettoSetto
telegram: tosettosetto
hashtag: basspistol
## Matomo
matomo_site_id: '11'
matomo_container: 'kJUGWiO2'

View file

@ -22,18 +22,10 @@
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 }}&quest;pk_campaign=homeshare&amp;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 }}&quest;pk_campaign=homeshare&amp;text={{ page.description | xml_escape }}%20via%20&#64;tosettosetto%20&amp;hashtags=tosettosetto"
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 }}&quest;pk_campaign=homeshare&amp;text={{ page.description | xml_escape }}%20via%20&#64;tosettosetto"
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 }}&quest;pk_campaign=homeshare&amp;title={{ page.description | xml_escape }}%20by%20{{ site.title xml_escape }}"
class="icon smaller fab fa-reddit"><span class="label">Reddit</span></a>
<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 }}&quest;pk_campaign=homeshare&amp;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 }}&quest;pk_campaign=homeshare&amp;text={{ page.description | xml_escape }}%20via%20&#64;{{ site.social.usernames.twitter }}%20&amp;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 }}&quest;pk_campaign=homeshare&amp;text={{ page.description | xml_escape }}%20via%20&#64;{{ 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 }}&quest;pk_campaign=homeshare&amp;title={{ page.description | xml_escape }}%20By%20{{ site.title | xml_escape }}" class="icon smaller fab fa-reddit"><span class="label">Reddit</span></a>
</ul>

View file

@ -1,7 +1,6 @@
---
layout: default
---
{% if page.category == 'releases' %}
<script src="{{ relBase }}/assets/js/jquery-3.5.1.min.js"></script>
{% include header.html %}
@ -20,7 +19,7 @@ layout: default
<h2>Track list</h2>
<ul id="plList">
{% for track in album.tracks %}
<li {% if onetracker == 1 %}style="border-radius: 5px;"{% endif %}>
<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>
@ -41,7 +40,8 @@ layout: default
<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="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>
@ -61,12 +61,11 @@ layout: default
{% assign author = site.authors | where: "url", author_id | first %}
<div id="author">
<div class="bio">
<p><a href="mailto:{{ author.email }}"><strong>{{ author.name }}</strong></a></p>
<p>{{ author.position }}{% if author.gpg != nil %} | <a target="_blank" rel="noopener" href="{{ author.gpg }}">GPG</a>{% endif %}</p>
<p class="date">
Published the
{% include dates.html %}
<time datetime="{{ page.date }}">{% include dates.html %}</time>
</p>
@ -75,13 +74,13 @@ layout: default
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 }}&quest;pk_campaign=homeshare&amp;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 }}&quest;pk_campaign=homeshare&amp;text={{ page.description | xml_escape }}%20via%20&#64;tosettosetto%20&amp;hashtags=#tosettosetto" 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 }}&quest;pk_campaign=homeshare&amp;text={{ page.description | xml_escape }}%20by%20{{ site.title | xml_escape }}%20via%20&#64;tosettosetto" 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 }}&quest;pk_campaign=homeshare&amp;title={{ page.description | xml_escape }}%20by%20{{ site.title | xml_escape }}" class="icon smaller fab fa-reddit"><span class="label">Reddit</span></a>
<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 }}&quest;pk_campaign=homeshare&amp;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 }}&quest;pk_campaign=homeshare&amp;text={{ page.description | xml_escape }}%20via%20&#64;{{ site.social.usernames.twitter }}%20&amp;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 }}&quest;pk_campaign=homeshare&amp;text={{ page.description | xml_escape }}%20via%20&#64;{{ 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 }}&quest;pk_campaign=homeshare&amp;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>
@ -90,6 +89,16 @@ layout: default
<section class="info">
<div class="container">
{{ content }}
{% if page.link or page.chat %}
<p class="center">
{% if page.link %}
<a href="{{ page.link.url }}?ref=TheMusicSyndicateWashere" target="_bank" rel="noopener" class="button">{% if page.link.buttontext %}{{ page.link.buttontext }}{% else %}👀 check it out{% endif %}</a>
{% endif %}
{% if page.chat %}
<a href="{{ page.chat }}" target="_bank" rel="noopener" class="button">📢 Chat with us! (beta)</a>
{% endif %}
</p>
{% endif %}
</div>
</section>
<div id="fixedPlayer" class="showplayer hideplayer">
@ -130,7 +139,32 @@ layout: default
{% 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 }}
| <strong>{{ track.common.genre }}</strong></p>
<p>{{ track.common.year }}</p>
<p><a href="{{ relBase }}/albums/{{ track.slug }}/" class="button">🔊 Play</a></p>
<p><a href="{{ relBase }}/tracks/{{ track.slug }}/" class="button">🔊 Play</a></p>
{% if track.all.UNSYNCEDLYRICS and track.all.USLT %}
<p>
{{ track.all.USLT.text | newline_to_br }}
</p>
{% elsif track.all.USLT and track.all.UNSYNCEDLYRICS == nil %}
<p>
{{ track.all.USLT.text | newline_to_br }}
</p>
{% elsif track.all.UNSYNCEDLYRICS and track.all.USLT == nil %}
<p>
{{ track.all.UNSYNCEDLYRICS | newline_to_br }}
</p>
{% elsif track.all.lyrics %}
<p>
{{ track.all.lyrics | newline_to_br }}
</p>
{% endif %}
</div>
</section>
@ -148,7 +182,9 @@ layout: default
<div class="container">
<div class="post-nav">
{% if page.previous.url %}
<h4><a href="{{ relBase }}{{ page.previous.url }}" alt="Read {{ page.previous.title }}" title="Read {{ page.previous.title }}"><span class="fas fa-arrow-left" style="font-size:3em;text-decoration: none;"></span></a></h4>
<h4><a href="{{ relBase }}{{ page.previous.url }}" alt="Read {{ page.previous.title }}"
title="Read {{ page.previous.title }}"><span class="fas fa-arrow-left"
style="font-size:3em;text-decoration: none;"></span></a></h4>
<h3>{{ page.previous.title }}</h3>
<p>{{ page.previous.description }}</p>
{% endif %}
@ -289,13 +325,21 @@ layout: default
{% include header.html %}
<section class="info" id="read">
<div class="info-pages">
{{ content }}
{% if page.link %}
<p><a href="{{ page.link }}?ref=TheMusicSyndicateWashere" target="_bank" rel="noopener" class="button">👀 Check it out!</a></p>
{{ content }}
{% if page.link or page.chat %}
<p class="center">
{% if page.link %}
<a href="{{ page.link.url }}?ref=TheMusicSyndicateWashere" target="_bank" rel="noopener" class="button">{% if page.link.buttontext %}{{ page.link.buttontext }}{% else %}👀 check it out{% endif %}</a>
{% endif %}
{% if page.chat %}
<a href="{{ page.chat }}" target="_bank" rel="noopener" class="button">📢 Chat with us! (beta)</a>
{% endif %}
</p>
{% endif %}
{% include author.html %}
</div>
</section>
@ -307,7 +351,8 @@ layout: default
<div class="container">
<div class="post-nav">
{% if page.previous.url %}
<h4><a href="{{ relBase }}{{ page.previous.url }}" alt="Read {{ page.previous.title }}" title="Read {{ page.previous.title }}"><span class="fas fa-arrow-left" style="font-size:3em;text-decoration: none;"></span></a></h4>
<h4><a href="{{ relBase }}{{ page.previous.url }}" alt="Read {{ page.previous.title }}" title="Read {{ page.previous.title }}"><span
class="fas fa-arrow-left" style="font-size:3em;text-decoration: none;"></span></a></h4>
<h3>{{ page.previous.title }}</h3>
<p>{{ page.previous.description }}</p>
{% endif %}