write a proper store selector variable
This commit is contained in:
parent
77e03f9cae
commit
9ba8a33c35
1 changed files with 93 additions and 13 deletions
|
|
@ -1,6 +1,6 @@
|
|||
<section class="streambox" style="margin-top:40px;padding: 40px;">
|
||||
<section class="streambox" style="padding: 40px;">
|
||||
{% if page.collection == 'posts' %}
|
||||
|
||||
{% if page.category == 'release' %}
|
||||
{% if page.stores[0].name != nil %}
|
||||
|
||||
<h3 style="text-align: center;display: block;">Buy this record</h3>
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<h3 style="text-align: center;display: block;margin-top:40px;">Stream</h3>
|
||||
<h3 style="text-align: center;display: block;margin-top:40px;"> </h3>
|
||||
<div class="streamer">
|
||||
|
||||
{% for shop in page.stores %}
|
||||
|
|
@ -23,18 +23,10 @@
|
|||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% elsif page.collection == 'tracks' or page.collection == 'albums' %}
|
||||
|
||||
{% if page.collection == 'albums' %}
|
||||
<h3 style="text-align: center;display: block;">This release can't be bought</h3>
|
||||
<p>But other releases are available here:</p>
|
||||
{% else %}
|
||||
<h3 style="text-align: center;display: block;">This track can't be bought</h3>
|
||||
<p>But other tracks are available here:</p>
|
||||
{% endif %}
|
||||
|
||||
<h3 style="text-align: center;display: block;">This album is not for sate</h3>
|
||||
<p>But you can find others here:</p>
|
||||
<div class="streamer">
|
||||
{% for shop in site.data.stores %}
|
||||
{% if shop.download == true %}
|
||||
|
|
@ -42,7 +34,95 @@
|
|||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% elsif page.collection == 'tracks' %}
|
||||
|
||||
{% for post in site.posts %}
|
||||
{% if post.album == page.albumSlug %}
|
||||
{% if post.stores[0].name != nil %}
|
||||
|
||||
<h3 style="text-align: center;display: block;">Buy this Track</h3>
|
||||
<div class="streamer">
|
||||
{% for shop in post.stores %}
|
||||
{% if shop.download == true %}
|
||||
<a onclick="_paq.push(['trackEvent', 'StoreLink', '{{ shop.name | remove: " " }}']);" target="_blank" rel="noopener" href="{{ shop.url }}" alt="Stream from {{ shop.name }}" title="Stream from {{ shop.name }}" class="button icon brands {{ shop.icon }}">{{ shop.name }}</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<h3 style="text-align: center;display: block;margin-top:40px;"> </h3>
|
||||
<div class="streamer">
|
||||
|
||||
{% for shop in post.stores %}
|
||||
{% if shop.download != true %}
|
||||
|
||||
<a onclick="_paq.push(['trackEvent', 'StoreLink', '{{ shop.name | remove: " " }}']);" style="flex: 0 0 75px;margin:10px; font-size: 75px;" target="_blank" rel="noopener" href="{{ shop.url }}" alt="Stream from {{ shop.name }}" title="Stream from {{ shop.name }}" class="icon style2 brands {{ shop.icon }}"><span class="label">{{ shop.name }}</span></a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
{% endif %}
|
||||
{% else %}
|
||||
|
||||
<h3 style="text-align: center;display: block;">This track can't be bought</h3>
|
||||
<p>But you can find others here:</p>
|
||||
<div class="streamer">
|
||||
{% for shop in site.data.stores %}
|
||||
{% if shop.download == true %}
|
||||
<a onclick="_paq.push(['trackEvent', 'StoreLink', '{{ shop.name | remove: " " }}']);" target="_blank" rel="noopener" href="{{ shop.url }}" alt="Stream from {{ shop.name }}" title="Stream from {{ shop.name }}" class="button icon brands {{ shop.icon }}">{{ shop.name }}</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}{% break %}
|
||||
{% endfor %}
|
||||
|
||||
{% elsif page.collection == 'albums' %}
|
||||
|
||||
|
||||
{% for post in site.posts %}
|
||||
{% if post.album == page.slug %}
|
||||
{% if post.stores[0].name != nil %}
|
||||
|
||||
<h3 style="text-align: center;display: block;">Buy this album</h3>
|
||||
<div class="streamer">
|
||||
{% for shop in post.stores %}
|
||||
{% if shop.download == true %}
|
||||
<a onclick="_paq.push(['trackEvent', 'StoreLink', '{{ shop.name | remove: " " }}']);" target="_blank" rel="noopener" href="{{ shop.url }}" alt="Stream from {{ shop.name }}" title="Stream from {{ shop.name }}" class="button icon brands {{ shop.icon }}">{{ shop.name }}</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<h3 style="text-align: center;display: block;margin-top:40px;"> </h3>
|
||||
<div class="streamer">
|
||||
|
||||
{% for shop in post.stores %}
|
||||
{% if shop.download != true %}
|
||||
|
||||
<a onclick="_paq.push(['trackEvent', 'StoreLink', '{{ shop.name | remove: " " }}']);" style="flex: 0 0 75px;margin:10px; font-size: 75px;" target="_blank" rel="noopener" href="{{ shop.url }}" alt="Stream from {{ shop.name }}" title="Stream from {{ shop.name }}" class="icon style2 brands {{ shop.icon }}"><span class="label">{{ shop.name }}</span></a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
{% endif %}
|
||||
{% else %}
|
||||
|
||||
<h3 style="text-align: center;display: block;">This album can't be bought</h3>
|
||||
<p>But you can find others here:</p>
|
||||
<div class="streamer">
|
||||
{% for shop in site.data.stores %}
|
||||
{% if shop.download == true %}
|
||||
<a onclick="_paq.push(['trackEvent', 'StoreLink', '{{ shop.name | remove: " " }}']);" target="_blank" rel="noopener" href="{{ shop.url }}" alt="Stream from {{ shop.name }}" title="Stream from {{ shop.name }}" class="button icon brands {{ shop.icon }}">{{ shop.name }}</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}{% break %}
|
||||
{% endfor %}
|
||||
|
||||
{% endif %}
|
||||
</section>
|
||||
Loading…
Add table
Add a link
Reference in a new issue