setto.basspistol.com/_includes/streamer.html

129 lines
7.9 KiB
HTML
Raw Normal View History

2020-07-28 12:51:23 +02:00
2020-07-24 14:34:09 +02:00
{% if page.collection == 'posts' %}
2020-08-03 21:40:11 +02:00
{% if page.category == 'releases' %}
{% if page.check_this_if_cannot_be_bought == false %}
2020-11-29 23:28:46 +01:00
<section class="streambox" id="support">
2020-08-03 21:40:11 +02:00
<h2>Get this release</h2>
2020-07-24 14:34:09 +02:00
<div class="streamer">
{% for shop in page.stores %}
2020-08-03 21:40:11 +02:00
<a onclick="_paq.push(['trackEvent', 'StoreLink', '{{ shop.name | remove: " " }}']);" target="_blank" rel="noopener" href="{{ shop.url }}" title="Stream from {{ shop.name }}" class="icon fab {{ shop.icon }}"><span class="label">{{ shop.name }}</span></a>
2020-07-24 14:34:09 +02:00
{% endfor %}
</div>
2020-08-03 21:40:11 +02:00
</section>
{% else %}
2020-11-29 23:28:46 +01:00
<section class="streambox" id="support">
2020-08-03 21:40:11 +02:00
<h2>This release can't be obtained</h2>
<p>Stream, follow, like and subscribe!</p>
2020-07-24 14:34:09 +02:00
<div class="streamer">
2020-08-03 21:40:11 +02:00
{% for shop in site.data.stores %}
2020-07-24 14:34:09 +02:00
2020-08-03 21:40:11 +02:00
<a onclick="_paq.push(['trackEvent', 'StoreLink', '{{ shop.name | remove: " " }}']);" target="_blank" rel="noopener" href="{{ shop.url }}" title="Stream from {{ shop.name }}" class="icon fab {{ shop.icon }}"><span class="label">{{ shop.name }}</span></a>
2020-07-28 12:51:23 +02:00
2020-08-03 21:40:11 +02:00
{% endfor %}
</div>
</section>
2020-07-24 14:34:09 +02:00
{% endif %}
2020-08-03 21:40:11 +02:00
{% else %}
{% if page.check_this_if_cannot_be_bought == false %}
2020-11-29 23:28:46 +01:00
<section class="streambox" id="support">
2020-08-03 21:40:11 +02:00
<h2>Get this release</h2>
<div class="streamer">
{% for shop in page.stores %}
<a onclick="_paq.push(['trackEvent', 'StoreLink', '{{ shop.name | remove: " " }}']);" target="_blank" rel="noopener" href="{{ shop.url }}" title="Stream from {{ shop.name }}" class="icon fab {{ shop.icon }}"><span class="label">{{ shop.name }}</span></a>
{% endfor %}
</div>
</section>
{% else %}
2020-11-29 23:28:46 +01:00
<section class="streambox" id="support">
<h2>Support {{ site.title }}</h2>
<p>Stream, follow, like and subscribe!</p>
<div class="streamer">
{% for shop in site.data.stores %}
<a onclick="_paq.push(['trackEvent', 'StoreLink', '{{ shop.name | remove: " " }}']);" target="_blank" rel="noopener" href="{{ shop.url }}" title="Stream from {{ shop.name }}" class="icon fab {{ shop.icon }}"><span class="label">{{ shop.name }}</span></a>
{% endfor %}
</div>
</section>
2020-07-28 12:51:23 +02:00
{% endif %}
2020-07-24 14:34:09 +02:00
{% endif %}
2020-08-03 21:40:11 +02:00
{% elsif page.collection == 'tracks' %}
2020-11-29 23:28:46 +01:00
<section class="streambox" id="support">
2020-07-28 12:51:23 +02:00
2020-08-03 21:40:11 +02:00
{% for post in site.posts %}
{% if post.album == page.albumSlug %}
{% if post.check_this_if_cannot_be_bought == false %}
2020-07-24 14:34:09 +02:00
2020-08-03 21:40:11 +02:00
<h2>Get this track</h2>
<div class="streamer">
{% for shop in post.stores %}
2020-07-24 14:34:09 +02:00
2020-08-03 21:40:11 +02:00
<a onclick="_paq.push(['trackEvent', 'StoreLink', '{{ shop.name | remove: " " }}']);" target="_blank" rel="noopener" href="{{ shop.url }}" title="Stream from {{ shop.name }}" class="icon fab {{ shop.icon }}"><span class="label">{{ shop.name }}</span></a>
2020-07-24 14:34:09 +02:00
2020-08-03 21:40:11 +02:00
{% endfor %}
</div>
{% else %}
2020-07-24 14:34:09 +02:00
2020-08-03 21:40:11 +02:00
<h2>This track can't be obtained</h2>
<p>Stream, follow, like and subscribe!</p>
<div class="streamer">
{% for shop in site.data.stores %}
2020-07-24 14:34:09 +02:00
2020-08-03 21:40:11 +02:00
<a onclick="_paq.push(['trackEvent', 'StoreLink', '{{ shop.name | remove: " " }}']);" target="_blank" rel="noopener" href="{{ shop.url }}" title="Stream from {{ shop.name }}" class="icon fab {{ shop.icon }}"><span class="label">{{ shop.name }}</span></a>
2020-07-24 14:34:09 +02:00
2020-08-03 21:40:11 +02:00
{% endfor %}
</div>
{% break %}
2020-07-24 14:34:09 +02:00
{% endif %}
{% endif %}
{% endfor %}
2020-08-03 21:40:11 +02:00
</section>
2020-07-24 14:34:09 +02:00
2020-08-03 21:40:11 +02:00
{% else %}
2020-11-29 23:28:46 +01:00
<section class="streambox" id="support">
2020-08-03 21:40:11 +02:00
<h2>Support {{ site.title }}</h2>
<p>Stream, follow, like and subscribe!</p>
<div class="streamer">
{% for shop in site.data.stores %}
2020-07-24 14:34:09 +02:00
2020-08-03 21:40:11 +02:00
<a onclick="_paq.push(['trackEvent', 'StoreLink', '{{ shop.name | remove: " " }}']);" target="_blank" rel="noopener" href="{{ shop.url }}" title="Stream from {{ shop.name }}" class="icon fab {{ shop.icon }}"><span class="label">{{ shop.name }}</span></a>
2020-07-24 14:34:09 +02:00
2020-08-03 21:40:11 +02:00
{% endfor %}
</div>
</section>
2020-07-24 14:34:09 +02:00
{% endif %}
2020-11-29 23:56:03 +01:00
<section class="streambox" id="support">
2020-11-30 00:04:25 +01:00
<h2>I take bitcoin donations!</h2>
2020-11-29 23:56:03 +01:00
<div class="streamer" style="margin-top:0;">
<!-- BTC Pay -->
2021-03-13 16:22:39 +01:00
<script>if(!window.btcpay){ var head = document.getElementsByTagName('head')[0]; var script = document.createElement('script'); script.src='https://node1.terminalb.tc:49393/modal/btcpay.js'; script.type = 'text/javascript'; head.append(script);}function onBTCPayFormSubmit(event){ var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { if(this.status == 200 && this.responseText){ var response = JSON.parse(this.responseText); window.btcpay.showInvoice(response.invoiceId); } } }; xhttp.open("POST", event.target.getAttribute('action'), true); xhttp.send(new FormData( event.target ));}</script>
2020-11-29 23:56:03 +01:00
<style type="text/css"> .btcpay-form { display: inline-flex; align-items: center; justify-content: center; } .btcpay-form--inline { flex-direction: row; } .btcpay-form--block { flex-direction: column; background-color: var(--fg); padding-top: 20px; border-radius: var(--border-radius); } .btcpay-form--inline .submit { margin-left: 15px; } .btcpay-form--block select { margin-bottom: 10px; } .btcpay-form .btcpay-custom-container{ text-align: center; }.btcpay-custom { display: flex; align-items: center; justify-content: center; } .btcpay-form .plus-minus { cursor:pointer; font-size:25px; line-height: 25px; background: var(--bg);color:var(--fg); height: 30px; width: 45px; border:none; border-radius: 60px; margin: auto 5px; display: inline-flex; justify-content: center; } .btcpay-form select { -moz-appearance: none; -webkit-appearance: none; appearance: none; color: var(--bg); background: transparent; border:1px solid transparent; display: block; padding: 1px; margin-left: auto; margin-right: auto; font-size: 1em; cursor: pointer; } .btcpay-form select:hover { border-color: #ccc; } #btcpay-input-price { -moz-appearance: none; -webkit-appearance: none; border: none; box-shadow: none; text-align: center; font-size: 25px; margin: auto; border-radius: 5px; line-height: 35px; background: #fff; } </style>
<!-- End BTC pay -->
2021-03-13 16:22:39 +01:00
<form method="POST" onsubmit="onBTCPayFormSubmit(event);return false" action="https://node1.terminalb.tc:49393/api/v1/invoices" class="btcpay-form btcpay-form--block">
2020-11-29 16:01:22 +01:00
<input type="hidden" name="storeId" value="FeM9np3QKxAB2PvLj3VeUcm6gV49hDyz8xz4DFceE41k" />
<input type="hidden" name="jsonResponse" value="true" />
<div class="btcpay-custom-container">
<div class="btcpay-custom">
<button class="plus-minus" onclick="event.preventDefault(); var price = parseInt(document.querySelector('#btcpay-input-price').value); if ('-' == '-' && (price - 1) < 1) { return; } document.querySelector('#btcpay-input-price').value = parseInt(document.querySelector('#btcpay-input-price').value) - 1;">-</button>
<input id="btcpay-input-price" name="price" type="text" min="1" max="100" step="1" value="10" style="width: 3em;" oninput="event.preventDefault();isNaN(event.target.value) || event.target.value <= 0 ? document.querySelector('#btcpay-input-price').value = 10 : event.target.value" />
<button class="plus-minus" onclick="event.preventDefault(); var price = parseInt(document.querySelector('#btcpay-input-price').value); if ('+' == '-' && (price - 1) < 1) { return; } document.querySelector('#btcpay-input-price').value = parseInt(document.querySelector('#btcpay-input-price').value) + 1;">+</button>
</div>
<select name="currency" style="text-align:center">
2020-11-29 23:56:03 +01:00
<option value="EUR" selected>EUR 💶</option>
<option value="CHF">CHF 💰</option>
<option value="USD">USD 💵</option>
<option value="GBP">GBP 💷</option>
<option value="BTC">BTC 🦄</option>
2020-11-29 16:01:22 +01:00
</select>
</div>
2021-03-13 16:22:39 +01:00
<input type="image" class="submit" name="submit" src="https://node1.terminalb.tc:49393/img/paybutton/pay.svg" style="width:209px;border:none;" alt="Pay with BtcPay, Self-Hosted Bitcoin Payment Processor">
2020-11-29 16:01:22 +01:00
</form>
</div>
2021-05-04 23:54:41 +02:00
<h2>Subscribe to my mailing list</h2>
<script type="text/javascript" src="//pr.basspistol.com/form/generate.js?id=7"></script>
2020-11-29 16:01:22 +01:00
</section>