diff --git a/data/consent.yaml b/data/consent.yaml deleted file mode 100644 index 2ca81ad..0000000 --- a/data/consent.yaml +++ /dev/null @@ -1,13 +0,0 @@ -items: - - title: Google Anaytics (functional) - description: This code gives us insight into the number of people that visit our website, where they are from and what they are clicking on. We follow the guidelines of the Dutch Government, which describe how to use Google Analytics without requiring explicit consent. - is_functional: true - script_file: ga.js - - title: Disqus comment (functional) - description: This code gives users the option to comment the articles. - is_functional: true - script_file: disqus.js - - title: Crisp chat - description: This code gives users the option to chat directly with us through a chat box in the bottom right corner. Visitor data will (also) be sent to Crisp. - is_functional: false - script_file: crisp.js diff --git a/data/gdpr.yaml b/data/gdpr.yaml new file mode 100644 index 0000000..facbd94 --- /dev/null +++ b/data/gdpr.yaml @@ -0,0 +1,8 @@ +plugins: + - name: gtag + enabled: true + functional: false + title: Google Analytics + description: This code gives us insight into the number of people that visit our website, where they are from and what they are clicking on. We follow the guidelines of the Italian Government. + html_src: gdpr/gtag.html + js_src: js/gtag.js diff --git a/layouts/partials/footer/custom.html b/layouts/partials/footer/custom.html index d4cf7aa..37a8817 100644 --- a/layouts/partials/footer/custom.html +++ b/layouts/partials/footer/custom.html @@ -1,5 +1,3 @@ -{{ if .Site.Params.GDPRbanner.enabled }} - {{ if not .Site.Params.GDPRbanner.onlyfunctional }} - {{ partial "gdpr/consent.html" . }} - {{ end }} +{{ if and .Site.Params.GDPRbanner.enabled (not .Site.Params.GDPRbanner.onlyfunctional) }} + {{ partial "gdpr/banner.html" . }} {{ end }} diff --git a/layouts/partials/gdpr/consent.html b/layouts/partials/gdpr/banner.html similarity index 84% rename from layouts/partials/gdpr/consent.html rename to layouts/partials/gdpr/banner.html index a63f98f..9aa95f6 100644 --- a/layouts/partials/gdpr/consent.html +++ b/layouts/partials/gdpr/banner.html @@ -1,3 +1,4 @@ + + + +{{ range $index, $plugin := .Site.Data.gdpr.plugins }} + {{ if $plugin.enabled }} + {{ "" }} + {{ partial $plugin.html_src }} + {{ if $plugin.functional }} + + {{ end }} + {{ "" }} + {{ end }} +{{ end }} + +