Merged master

This commit is contained in:
Kasper Friis Christensen 2018-01-26 00:23:50 +01:00
commit 21517d19e6
18 changed files with 149 additions and 14 deletions

View file

@ -28,8 +28,10 @@ exclude_from_localization: ["assets"]
parallel_localization: false
# Build settings
permalink: /:title/
markdown: kramdown
exclude: ["README.md", 'Gemfile.lock', 'Gemfile']
exclude: ["README.md", 'Gemfile.lock', 'Gemfile', "docker-compose.yml"]
include: ["_pages"]
plugins:
- jekyll-feed

View file

@ -3,6 +3,9 @@ global:
description: >-
Totalovervågningen er kendt ulovlig, men teleselskaber og politikere er ligeglade.
Nu gør vi noget ved det! #ulovligLogning
emailplaceholder: indtast din email
signup: JA! jeg vil gerne holdes opdateret.
ctatext: Hvis du vil hjælpe eller give et bidrag, kan du [trykke her](#wannahelp).
langs:
da: Dansk
en: Engelsk

View file

@ -3,6 +3,9 @@ global:
description: >-
The Danish states mass surveillance has been ruled illegal, but the telcos and the politicians don't care.
Now we are going to do something about it! #ulovligLogning
emailplaceholder: enter your email
signup: Yes! I want to be kept in the loop.
ctatext: If you want to help us or donate to our cause [click here](#wannahelp).
langs:
da: Danish
en: English

1
_includes/ctascale.svg Normal file
View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 500 600"><a><g><circle r="250" cy="300" cx="250" fill="#ff4c00" fill-rule="evenodd"/><text y="275.465" x="251.718" style="text-align:center;text-shadow: 3px 3px 0 #d94100;" font-weight="400" font-size="96" font-family="Eczar" text-anchor="middle" fill="#fff"><tspan style="text-align:center" y="275.465" x="251.718">Giv et</tspan><tspan style="text-align:center" y="371.871" x="251.718">bidrag!</tspan></text><animateTransform attributeName="transform" type="translate" values="0 0; 0 -50; 0 0;0 -10; 0 0" begin="0s" dur="0.5s" repeatCount="4"/></g><path d="M230.715 436.685c-2.77 0-5 2.23-5 5v92.858c0 .713.151 1.387.418 2h-34.586a4.988 4.988 0 0 0 0 7.07l54.918 54.918a4.988 4.988 0 0 0 7.07 0l54.918-54.918a4.988 4.988 0 0 0 0-7.07h-34.586a4.991 4.991 0 0 0 .418-2v-92.858c0-2.77-2.23-5-5-5z" fill="#ff4c00" fill-rule="evenodd"/></a></svg>

After

Width:  |  Height:  |  Size: 912 B

View file

@ -4,6 +4,9 @@
<title>{{ global.title }}</title>
<link rel="stylesheet" href="{{ site.baseurl }}/assets/style/main.css?{{ site.time | date: '%s' }}">
<link rel="alternate" type="application/rss+xml" title="RSS Feed for {{ site.name }}" href="{{ site.baseurl }}/feed.xml" />
{% if page.redirect %}
<meta http-equiv='refresh' content='5;url={% if site.active_lang == site.default_lang %} {{site.url}} {% else %} {{site.url}}/{{ site.active_lang }} {% endif %}' />
{% endif %}
<meta property="og:type" content="website">
<meta property="og:image" content="{{ site.url }}/assets/img/og01.png" />
<meta property="og:url" content="{{ site.url }}" />

8
_layouts/centered.html Normal file
View file

@ -0,0 +1,8 @@
---
layout: default
---
<section class="centered">
<div class="content">
{{ content }}
</div>
</section>

View file

@ -1,6 +1,7 @@
---
layout: default
---
{% assign global = site.data.common.global %}
{% for section in page.sections %}
{% if section.id != "faq" %}
<section id="{{ section.id }}" class="{% cycle 'odd', 'even' %}">
@ -9,6 +10,17 @@ layout: default
<h1>{{ section.heading }}</h1>
<div class="paragraphs">
{{ section.content | markdownify }}
{% if section.id == "intro" %}
<p class="ctaTxt">{{ global.ctatext | markdownify }}</p>
<a href="#wannahelp" class="cta">{% include ctascale.svg %}</a>
{% endif %}
{% if section.id == "wannahelp" %}
<form class="signup" action="https://ulovliglogning.dk/dynamic/signup/" method="post">
<input type="email" required="true" placeholder="{{ global.emailplaceholder }}" name="email">
<input type="text" name="lang" value="{{ site.active_lang }}" class="hidden">
<input type="submit" name="submit" value="{{ global.signup }}">
</form>
{% endif %}
</div>
</div>
</section>
@ -28,4 +40,4 @@ layout: default
</div>
{% endif %}
{% endfor %}
</section>
</section>

View file

@ -1,5 +1,6 @@
---
layout: default
permalink: /404
---
<style type="text/css" media="screen">

View file

@ -30,7 +30,7 @@ sections:
- id: wannahelp
heading: Jeg vil hjælpe!
content: |
Hvis du har lyst til at hjælpe, kan du kontakte [Rasmus Malver](https://twitter.com/rasmusmalver) på [Twitter](https://twitter.com/rasmusmalver) eller på [sms/signal](sms:+4526809424).
Hvis du har lyst til at hjælpe, kan du kontakte [Rasmus Malver](https://twitter.com/rasmusmalver) på [Twitter](https://twitter.com/rasmusmalver) eller på [sms/signal](sms:+4526809424). Du kan også følge foreningen på [Twitter](https://twitter.com/ulovliglogning). Eller skrive dig op til vores nyhedsbrev herunder.
Økonomiske bidrag kan indbetales så anonymt som muligt på konto <span class="donate">5042 1165817 (IBAN DK6850420001165817 / SWIFT JYBADKKK)</span>. Vær sød at skrive <span class="donate">RASMA.0001</span> i beskedfeltet. Selvom vi har indsamlet 100.000 kr, og dermed har nået det første del-mål, har vi stadig brug for støtte.

View file

@ -0,0 +1,8 @@
---
title: signup
permalink: /redirect/fail/
redirect: true
lang: da
layout: centered
---
Øv! noget gik galt! prøv igen, eller kontakt os på [Twitter](https://twitter.com/ulovliglogning)

View file

@ -0,0 +1,8 @@
---
title: signup
permalink: /redirect/fail/
redirect: true
lang: en
layout: centered
---
Damn! something went wrong :( try again or contact us on [Twitter](https://twitter.com/ulovliglogning)

View file

@ -0,0 +1,8 @@
---
title: signup
permalink: /redirect/success/
redirect: true
lang: da
layout: centered
---
Tak! du er nu skrevet op til vores nyhedsbrev!

View file

@ -0,0 +1,8 @@
---
title: signup
permalink: /redirect/success/
redirect: true
lang: en
layout: centered
---
Thank you! You are now signed up for our newsletter!

View file

@ -15,6 +15,10 @@ footer {
color: #AAA;
}
.hidden {
display: none !important;
}
.langSwitcher {
display: inline-block;
position: absolute;
@ -32,9 +36,10 @@ footer {
box-shadow: none;
border-radius: 3px;
margin-right: 5px;
box-shadow: inset 0 50px 0 rgba(0, 0, 0, 0.35);
}
.langSwitcher a.activeLang {
box-shadow: inset 0 50px 0 rgba(0, 0, 0, 0.35);
box-shadow: none;
}
.langSwitcher a:last-child{
margin-right: 0;

View file

@ -8,15 +8,15 @@ section {
box-sizing: border-box;
padding: 4rem 0;
background-color: $background-primary;
background-image: linear-gradient(
to left bottom,
$background-primary 49%,
$background-alternative 50%
);
background-size: 100% 30px;
background-repeat: no-repeat;
background-position: bottom;
background-color: $background-primary;
background-image: linear-gradient(
to left bottom,
$background-primary 49%,
$background-alternative 50%
);
background-size: 100% 30px;
background-repeat: no-repeat;
background-position: bottom;
&:nth-of-type(even) {
background-color: $background-alternative;
@ -51,3 +51,44 @@ section {
max-width: 40rem;
}
}
.cta{display:none;}
@media screen and (min-width: 1200px) and (orientation:landscape){
#intro{position:relative;}
.cta{display:inline;position:absolute;left:5%;bottom:15%;
height:auto;width:200px;box-shadow:none;}
.ctaTxt{display:none;}
}
.signup {
input {
display: block;
width: 90%;
margin: 0 auto;
border-radius: 0;
border: none;
padding: 5px 0;
height: 2rem;
text-align: center;
font-size: 1rem;
}
input[type="text"] {
}
input[type="submit"] {
cursor: pointer;
color: #FFF;
background: darken($background-alternative, 20);
border-bottom: 2px solid darken($background-alternative, 25);
}
}
section {
&#intro {
h1 {
margin: 8rem 0 3rem;
}
}
}

View file

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" height="600" width="500"><a><g><circle r="250" cy="300" cx="250" fill="#ff4c00" fill-rule="evenodd"/><text y="275.465" x="251.718" style="text-align:center;text-shadow: 5px 5px 0 #d94100;" font-weight="400" font-size="96" font-family="Eczar" text-anchor="middle" fill="#fff"><tspan style="text-align:center" y="275.465" x="251.718">Giv et</tspan><tspan style="text-align:center" y="371.871" x="251.718">bidrag!</tspan></text><animateTransform attributeName="transform" type="translate" values="0 0; 0 -50; 0 0;0 -10; 0 0" begin="0s" dur="0.5s" repeatCount="4"/></g><path d="M230.715 436.685c-2.77 0-5 2.23-5 5v92.858c0 .713.151 1.387.418 2h-34.586a4.988 4.988 0 0 0 0 7.07l54.918 54.918a4.988 4.988 0 0 0 7.07 0l54.918-54.918a4.988 4.988 0 0 0 0-7.07h-34.586a4.991 4.991 0 0 0 .418-2v-92.858c0-2.77-2.23-5-5-5z" fill="#ff4c00" fill-rule="evenodd"/></a></svg>

Before

Width:  |  Height:  |  Size: 899 B

25
dynamic/signup/index.php Normal file
View file

@ -0,0 +1,25 @@
<?php
$email = $_POST["email"];
$lang = $_POST["lang"];
$to = "ulovliglogning@protonmail.com";
$subject = "signup";
$body = "email: ".$email."\nlang: ".$lang;
if (mail($to, $subject, $body)) {
if ($lang == "da") {
$redirect = "https://ulovliglogning.dk/redirect/success/";
} else {
$redirect = "https://ulovliglogning.dk/".$lang."/redirect/success/";
}
} else {
if ($lang == "da") {
$redirect = "https://ulovliglogning.dk/redirect/fail/";
} else {
$redirect = "https://ulovliglogning.dk/".$lang."/redirect/fail/";
}
}
header('Location: '.$redirect);
die();
?>