c3d2-web/content/static/script/paywall.js

11 lines
1.2 KiB
JavaScript

var el = $('<aside class="lightbox"><article><h2>Wir brauchen Deine Hilfe!</h2><p>Der C3D2 kämpft für das Überleben unseres Hackspaces. Wir brauchen mehr regelmäßige Spenden. <a href="news/20150825-spendenaufruf.html">Mehr erfahren...</a></p><button class="green paywall_donate">Ich möchte mit einer regelmäßigen Spende helfen!</button><button class="green paywall_skip">Ich habe den Dauerauftrag bereits eingerichtet.</button><button class="red paywall_skip">Nö, weiter!</button><p class="hint">We do not store your data.</p><!-- lets see how much is the fish--><div class="foobar"><progress class="bar" style="width: 100%; height: 2em;" value="1.5" max="6"></progress><div class="donation-amount" style="font-size: 0.8em; text-align: center; display: inline-block; position: relative; min-width: 7em; width: 25%; top: -1.6rem;">1,5 / 6k €</div><p class="donation-rate" style="font-size: 0.8em; padding: 0;margin: 0;text-align: center; position: relative; top: -2.5rem; left: 0;">25%</p></div><!-- / --></article></aside>')
el.find('.paywall_donate').click(function() {
document.location = "unterstuetzen.html"
})
el.find('.paywall_skip').click(function() {
el.fadeOut(300, function() {
el.remove()
})
})
$('body').append(el)