replace `paywall' with `cookiebar'
This commit is contained in:
parent
f45646419b
commit
3bc665b203
|
@ -0,0 +1,14 @@
|
||||||
|
if (!window.localStorage.cookiebarHidden) {
|
||||||
|
var el = $("<aside class='cookiebar'><p class='close' title='Für immer verstecken'>✖</p><h2>Wir setzen eigentlich keine Cookies,</h2><p> aber der C3D2 braucht mehr regelmäßige <a href='news/20150825-spendenaufruf.html'>Spenden…</a></p></article></aside>")
|
||||||
|
el.find('.close').click(function() {
|
||||||
|
window.localStorage.cookiebarHidden = true
|
||||||
|
el.removeClass('show')
|
||||||
|
setTimeout(function() {
|
||||||
|
el.remove()
|
||||||
|
}, 500)
|
||||||
|
})
|
||||||
|
$('body').prepend(el)
|
||||||
|
setTimeout(function() {
|
||||||
|
el.addClass('show')
|
||||||
|
}, 1000)
|
||||||
|
}
|
|
@ -1,10 +0,0 @@
|
||||||
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></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)
|
|
|
@ -860,53 +860,7 @@ p.center {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Paywall */
|
|
||||||
|
|
||||||
.lightbox {
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
background-color: rgba(0, 0, 0, 0.7);
|
|
||||||
}
|
|
||||||
|
|
||||||
.lightbox article {
|
|
||||||
margin: 4em auto;
|
|
||||||
padding: 2em;
|
|
||||||
background-color: white;
|
|
||||||
border-radius: 2em;
|
|
||||||
max-width: 30em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.lightbox h2 {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.lightbox p {
|
|
||||||
margin: 2em 0;
|
|
||||||
}
|
|
||||||
.lightbox .hint {
|
|
||||||
text-align: center;
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
.lightbox button {
|
|
||||||
display: block;
|
|
||||||
width: 100%;
|
|
||||||
margin: 0.5em 0;
|
|
||||||
font-size: 120%;
|
|
||||||
color: white;
|
|
||||||
border: 1px solid black;
|
|
||||||
border-radius: 4px;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
.lightbox button.green {
|
|
||||||
background-color: #2a2;
|
|
||||||
}
|
|
||||||
.lightbox button.red {
|
|
||||||
background-color: #c22;
|
|
||||||
}
|
|
||||||
.hidden[aria-hidden] {
|
.hidden[aria-hidden] {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
@ -930,4 +884,41 @@ h3 + div {
|
||||||
}
|
}
|
||||||
#paypal-button {
|
#paypal-button {
|
||||||
margin: 1ex;
|
margin: 1ex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* -- Cookiebar -- */
|
||||||
|
|
||||||
|
.cookiebar {
|
||||||
|
color: black;
|
||||||
|
background-color: #ffffcc;
|
||||||
|
border-bottom: 0.05rem solid black;
|
||||||
|
margin: 0;
|
||||||
|
margin-top: -1.6rem;
|
||||||
|
padding: 0.2rem 0.1rem 0.1rem 0.2rem;
|
||||||
|
transition: margin-top 0.3s ease-in;
|
||||||
|
height: 1.4rem;
|
||||||
|
}
|
||||||
|
.cookiebar.show {
|
||||||
|
margin-top: 0;
|
||||||
|
transition: margin-top 0.5s ease-out;
|
||||||
|
}
|
||||||
|
.cookiebar .close {
|
||||||
|
float: right;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 100%;
|
||||||
|
color: #777;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
.cookiebar .close:hover {
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
.cookiebar h2, .cookiebar p {
|
||||||
|
display: inline;
|
||||||
|
margin: 0;
|
||||||
|
font-size: 80%;
|
||||||
|
line-height: 1rem;
|
||||||
|
font-weight: medium;
|
||||||
|
}
|
||||||
|
.cookiebar h2 {
|
||||||
|
font-size: 100%;
|
||||||
|
}
|
||||||
|
|
|
@ -63,11 +63,9 @@
|
||||||
<xsl:call-template name="make-script-tag">
|
<xsl:call-template name="make-script-tag">
|
||||||
<xsl:with-param name="name" select="'bitlove-enclosures'"/>
|
<xsl:with-param name="name" select="'bitlove-enclosures'"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
<xsl:if test="/page/portal">
|
<xsl:call-template name="make-script-tag">
|
||||||
<xsl:call-template name="make-script-tag">
|
<xsl:with-param name="name" select="'cookiebar'"/>
|
||||||
<xsl:with-param name="name" select="'paywall'"/>
|
</xsl:call-template>
|
||||||
</xsl:call-template>
|
|
||||||
</xsl:if>
|
|
||||||
|
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue