middleman-gdpr 0.2.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/middleman-gdpr/extension.rb +2 -2
- data/lib/middleman-gdpr/version.rb +1 -1
- data/locales/de.yml +1 -1
- data/locales/en.yml +1 -1
- data/locales/es.yml +1 -1
- data/locales/fr.yml +1 -1
- data/locales/it.yml +1 -1
- data/locales/zh.yml +1 -1
- data/source/gdpr/_cookie_consent.html.erb +1 -2
- data/source/javascripts/gdpr/cookie_consent.js +15 -14
- data/source/stylesheets/gdpr/cookie_consent.sass +11 -27
- metadata +4 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 448c6e7e87f47d0b71527f3036a35f95cdae0a6b872a4bd934a67f59381c1dfd
|
4
|
+
data.tar.gz: 880141c17d9e7346bac7d1df53591ef44e75609ee300f137d6c406755b17b831
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d44e41003c7ec2884f05eef222a12dcf879a96fee058365953b303adf6f6eccfe43e387ebc1f0e9d7ccfbbf784aa3cab6701f229aa5181a26675bac91de4d480
|
7
|
+
data.tar.gz: 89c3c4a156896f6476ca18e44300af290c5f58fa6813cd418ceffa7039d641607a86d224b9749ba3322cbebeffeec7d1ad6c8cf9e026d4c3733a9e0ba456c599
|
@@ -6,8 +6,8 @@ module Middleman
|
|
6
6
|
# end
|
7
7
|
|
8
8
|
def after_configuration
|
9
|
-
|
10
|
-
|
9
|
+
raise "\e[91mGDPR: Sprockets extension not activated. Please activate Sprockets in config.rb\e[39m" if sprockets.blank?
|
10
|
+
raise "\e[91mGDPR: I18n extension not activated. Please activate I18n in config.rb\e[39m" if i18n.blank?
|
11
11
|
|
12
12
|
['source/stylesheets', 'source/javascripts', 'node_modules'].each do |path|
|
13
13
|
sprockets.environment.append_path root + path
|
data/locales/de.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
de:
|
2
2
|
gdpr:
|
3
|
-
privacy_policy: https://
|
3
|
+
privacy_policy: https://gdpr.eu/cookies/
|
4
4
|
cookie_consent:
|
5
5
|
text: "Indem Sie Ihre Navigation auf dieser Website fortsetzen, akzeptieren Sie die Verwendung von Cookies, die insbesondere dazu dienen, Ihnen personalisierte Funktionen anzubieten und Ihre Besuche auf der Website zu erfassen."
|
6
6
|
button: "Ich habe verstanden"
|
data/locales/en.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
en:
|
2
2
|
gdpr:
|
3
|
-
privacy_policy: https://
|
3
|
+
privacy_policy: https://gdpr.eu/cookies/
|
4
4
|
cookie_consent:
|
5
5
|
text: 'By navigating on this website, you agree to our use of cookies to personalize certain website features and to measure the audience and use of this website.'
|
6
6
|
button: "I agree"
|
data/locales/es.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
es:
|
2
2
|
gdpr:
|
3
|
-
privacy_policy: https://
|
3
|
+
privacy_policy: https://gdpr.eu/cookies/
|
4
4
|
cookie_consent:
|
5
5
|
text: "Al continuar su navegación por este sitio, acepta la utilización de cookies, que tienen por objeto proponerle funcionalidades personalizadas y realizar mediciones de audiencia."
|
6
6
|
button: "Entendido"
|
data/locales/fr.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
fr:
|
2
2
|
gdpr:
|
3
|
-
privacy_policy: https://
|
3
|
+
privacy_policy: https://gdpr.eu/cookies/
|
4
4
|
cookie_consent:
|
5
5
|
text: "En poursuivant votre navigation sur ce site, vous acceptez l’utilisation de Cookies pour vous proposer notamment des fonctionnalités personnalisées et pour réaliser des mesures d’audience."
|
6
6
|
button: "J'ai compris"
|
data/locales/it.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
it:
|
2
2
|
gdpr:
|
3
|
-
privacy_policy: https://
|
3
|
+
privacy_policy: https://gdpr.eu/cookies/
|
4
4
|
cookie_consent:
|
5
5
|
text: "Proseguendo nella navigazione del Sito, l'utente acconsente all'utilizzo dei cookie allo scopo di fornire funzioni personalizzate e di misurazione dell'audience."
|
6
6
|
button: "Ho capito"
|
data/locales/zh.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
zh:
|
2
2
|
gdpr:
|
3
|
-
privacy_policy: https://
|
3
|
+
privacy_policy: https://gdpr.eu/cookies/
|
4
4
|
cookie_consent:
|
5
5
|
text: '在瀏覽本網站之時,您同意本網站收集閣下Cookies(如有)及用於獲取配置數據以及分析上網認識的瀏覽習慣。Cookies可免除閣下每次瀏覽網站是重新登記的麻煩,並追蹤閣下喜歡的網頁主題選項,為閣下提供更個性化服務。阁下如不希望接受Cookies,可以修改有关互联网选项或阁下计算机系统的浏览选项,但阁下可能因此无法使用或启动本网站的若干功能。'
|
6
6
|
button: "同意"
|
@@ -1,10 +1,9 @@
|
|
1
1
|
<div class="gdpr__cookie_consent js-gdpr__cookie_consent">
|
2
2
|
<div class="gdpr__cookie_consent__text">
|
3
3
|
<%= t 'gdpr.cookie_consent.text' %>
|
4
|
-
<br />
|
5
4
|
<%= t 'gdpr.cookie_consent.learn_more_html', link: t('gdpr.privacy_policy') %>
|
6
5
|
</div>
|
7
6
|
<div class="gdpr__cookie_consent__buttons">
|
8
|
-
<button class="gdpr__cookie_consent__buttons__ok js-gdpr__cookie_consent__buttons__ok"> <%= t 'gdpr.cookie_consent.button' %></button>
|
7
|
+
<button class="gdpr__cookie_consent__buttons__ok js-gdpr__cookie_consent__buttons__ok btn btn-primary btn-sm btn-xs"> <%= t 'gdpr.cookie_consent.button' %></button>
|
9
8
|
</div>
|
10
9
|
</div>
|
@@ -1,20 +1,21 @@
|
|
1
1
|
//= require js-cookie/src/js.cookie
|
2
2
|
|
3
3
|
window.addEventListener('load', function() {
|
4
|
-
|
4
|
+
var cookieKey = 'gdpr.cookie_consent.ok',
|
5
|
+
cookieAlreadySet = Cookies.get(cookieKey) === 'true';
|
6
|
+
gdprCookieConsent = document.querySelector('.js-gdpr__cookie_consent');
|
5
7
|
|
6
|
-
|
7
|
-
|
8
|
+
if(!gdprCookieConsent) {
|
9
|
+
return;
|
10
|
+
}
|
8
11
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
});
|
19
|
-
}
|
12
|
+
if (!cookieAlreadySet) {
|
13
|
+
gdprCookieConsent.classList.add('gdpr__cookie_consent--necessary');
|
14
|
+
gdprCookieConsent.querySelector('.js-gdpr__cookie_consent__buttons__ok').addEventListener('click', function() {
|
15
|
+
Cookies.set(cookieKey, true, {path: '/', expires: 365});
|
16
|
+
if (gdprCookieConsent.parentNode) {
|
17
|
+
gdprCookieConsent.parentNode.removeChild(gdprCookieConsent)
|
18
|
+
};
|
19
|
+
});
|
20
|
+
}
|
20
21
|
});
|
@@ -1,33 +1,17 @@
|
|
1
1
|
.gdpr__cookie_consent
|
2
2
|
position: fixed
|
3
3
|
z-index: 999
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
border
|
4
|
+
max-width: 500px
|
5
|
+
right: 15px
|
6
|
+
bottom: 15px
|
7
|
+
left: 15px
|
8
|
+
padding: 15px
|
9
|
+
border: 1px solid #eee
|
10
10
|
background: #fff
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
11
|
+
font-size: 14px
|
12
|
+
visibility: hidden
|
13
|
+
&--necessary
|
14
|
+
visibility: visible
|
15
15
|
|
16
16
|
&__text
|
17
|
-
|
18
|
-
padding: 20px 160px
|
19
|
-
|
20
|
-
@media only screen and (max-width : 480px)
|
21
|
-
padding: 20px 0
|
22
|
-
|
23
|
-
&__buttons
|
24
|
-
position: absolute
|
25
|
-
right: 10px
|
26
|
-
top: 12px
|
27
|
-
|
28
|
-
@media only screen and (max-width : 480px)
|
29
|
-
position: initial
|
30
|
-
margin-bottom: 10px
|
31
|
-
|
32
|
-
&__ok
|
33
|
-
padding: 15px 21px 15px !important
|
17
|
+
margin-bottom: 15px
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middleman-gdpr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arnaud Levy
|
@@ -10,10 +10,10 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2020-07-30 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
|
-
name: middleman
|
16
|
+
name: middleman
|
17
17
|
requirement: !ruby/object:Gem::Requirement
|
18
18
|
requirements:
|
19
19
|
- - ">="
|
@@ -40,20 +40,6 @@ dependencies:
|
|
40
40
|
- - ">="
|
41
41
|
- !ruby/object:Gem::Version
|
42
42
|
version: '0'
|
43
|
-
- !ruby/object:Gem::Dependency
|
44
|
-
name: rake
|
45
|
-
requirement: !ruby/object:Gem::Requirement
|
46
|
-
requirements:
|
47
|
-
- - ">="
|
48
|
-
- !ruby/object:Gem::Version
|
49
|
-
version: '0'
|
50
|
-
type: :runtime
|
51
|
-
prerelease: false
|
52
|
-
version_requirements: !ruby/object:Gem::Requirement
|
53
|
-
requirements:
|
54
|
-
- - ">="
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
version: '0'
|
57
43
|
description: Adds a GDPR cookie consent and provides a simple checklist
|
58
44
|
email:
|
59
45
|
- alevy@lespoupees.paris
|
@@ -104,8 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
104
90
|
- !ruby/object:Gem::Version
|
105
91
|
version: '0'
|
106
92
|
requirements: []
|
107
|
-
|
108
|
-
rubygems_version: 2.7.6
|
93
|
+
rubygems_version: 3.0.3
|
109
94
|
signing_key:
|
110
95
|
specification_version: 4
|
111
96
|
summary: Helps getting your Middleman website GDPR compliant
|