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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: be520ef04f3b04c32e8c4b7016e2066c9ebd7260bb20ce84c23dea7334345cb3
4
- data.tar.gz: 33fb71074ba4b54234b98619d7b62f09dc8afbc047ba8f8e628a4c461a16e13b
3
+ metadata.gz: 448c6e7e87f47d0b71527f3036a35f95cdae0a6b872a4bd934a67f59381c1dfd
4
+ data.tar.gz: 880141c17d9e7346bac7d1df53591ef44e75609ee300f137d6c406755b17b831
5
5
  SHA512:
6
- metadata.gz: ba6f87b7f5edcf4f07eab964bc8ab6714d351aa0d615d031d5b70cdc24832dfcbab49284b37229656d7a0b2d3ef913f3ed3f59f551c2e6627842f5e471e2877d
7
- data.tar.gz: 9883c6af14e9355467cbf38e7cb203cb169cf7deca90fde4c6211d51c1f1ee94d512dfd2cefccbe7659d7e982ac24e9f9e7919d58bb4fcadceb73439de6b86f8
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
- puts "\e[91mGDPR: Sprockets extension not found, GDPR extension has not been activated. Please activate Sprockets in config.rb:\nactivate :sprockets\e[39m\n" and return if sprockets.blank?
10
- puts "\e[91mGDPR: I18n extension not found, GDPR extension has not been activated. Please activate I18n in config.rb:\nactivate :i18n\e[39m\n" and return if i18n.blank?
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
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  module Gdpr
3
- VERSION = '0.2.0'
3
+ VERSION = '1.1.0'
4
4
  end
5
5
  end
@@ -1,6 +1,6 @@
1
1
  de:
2
2
  gdpr:
3
- privacy_policy: https://www.eugdpr.org
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"
@@ -1,6 +1,6 @@
1
1
  en:
2
2
  gdpr:
3
- privacy_policy: https://www.eugdpr.org
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"
@@ -1,6 +1,6 @@
1
1
  es:
2
2
  gdpr:
3
- privacy_policy: https://www.eugdpr.org
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"
@@ -1,6 +1,6 @@
1
1
  fr:
2
2
  gdpr:
3
- privacy_policy: https://www.eugdpr.org
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"
@@ -1,6 +1,6 @@
1
1
  it:
2
2
  gdpr:
3
- privacy_policy: https://www.eugdpr.org
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"
@@ -1,6 +1,6 @@
1
1
  zh:
2
2
  gdpr:
3
- privacy_policy: https://www.eugdpr.org
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
- var gdprCookieConsent = document.querySelector('.js-gdpr__cookie_consent');
4
+ var cookieKey = 'gdpr.cookie_consent.ok',
5
+ cookieAlreadySet = Cookies.get(cookieKey) === 'true';
6
+ gdprCookieConsent = document.querySelector('.js-gdpr__cookie_consent');
5
7
 
6
- if(!gdprCookieConsent) return;
7
- var COOKIE_KEY = 'gdpr.cookie_consent.ok'
8
+ if(!gdprCookieConsent) {
9
+ return;
10
+ }
8
11
 
9
- var remove = function() {
10
- if(gdprCookieConsent.parentNode) gdprCookieConsent.parentNode.removeChild(gdprCookieConsent);
11
- }
12
-
13
- if(Cookies.get(COOKIE_KEY) === 'true') remove()
14
- else {
15
- gdprCookieConsent.querySelector('.js-gdpr__cookie_consent__buttons__ok').addEventListener('click', function() {
16
- Cookies.set(COOKIE_KEY, true, {path: '/', expires: 365});
17
- remove()
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
- right: 0
5
- bottom: 0
6
- left: 0
7
- padding: 0 20px
8
- text-align: center
9
- border-top: 1px solid #ccc
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
- @media only screen and (max-width : 480px)
13
- font-size: 12px
14
- position: initial
11
+ font-size: 14px
12
+ visibility: hidden
13
+ &--necessary
14
+ visibility: visible
15
15
 
16
16
  &__text
17
- display: inline-block
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: 0.2.0
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: 2018-07-03 00:00:00.000000000 Z
13
+ date: 2020-07-30 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
- name: middleman-core
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
- rubyforge_project:
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