Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/hauke96/hugo-theme-hamburg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHauke Stieler <mail@hauke-stieler.de>2019-04-17 00:41:57 +0300
committerHauke Stieler <mail@hauke-stieler.de>2019-04-17 00:41:57 +0300
commit52bbf31e8f0b4ae2d0814e4ebef555a4d2c66920 (patch)
treeaf848a896f9c05a81ff5d63070428dfa9b273061
parent6c5ef4f6cfc0466158e95b07aefeb68d61bde023 (diff)
parente94603b9bb4d1b993e3ca1c213b5a060503525f0 (diff)
Merge branch 'dev' for v0.5.3v0.5.3
-rw-r--r--README.md4
-rw-r--r--i18n/de.toml2
-rw-r--r--i18n/en.toml2
-rw-r--r--layouts/partials/footer.html30
-rw-r--r--layouts/partials/header.html4
5 files changed, 10 insertions, 32 deletions
diff --git a/README.md b/README.md
index 8f9e020..10c3941 100644
--- a/README.md
+++ b/README.md
@@ -157,6 +157,6 @@ To support multiple languages, create multiple directories in the `data` directo
## Tracking
You can use the above configuration with e.g. Google Analytics or use your own JavaScript snippet to do so.
-For a custom JavaScript snippet you have to create a `layouts/partials/tracking.html` file and put the necessary code into this file. The file (if it exists) will be embedded into the header right before the `</head>` tag.
+For a custom JavaScript snippet you have to create a `layouts/partials/tracking.html` file and put the necessary code into this file. The file (if it exists) will be embedded into the footer next to the other tracking mechanisms.
-I tested this with the Matomo analytics software, which provides a JavaScript snipped I put into the `tracking.html`.
+I tested this with the Matomo analytics software, which provides a JavaScript or image-based snipped that I put into the `tracking.html`.
diff --git a/i18n/de.toml b/i18n/de.toml
index b333f42..5953083 100644
--- a/i18n/de.toml
+++ b/i18n/de.toml
@@ -20,5 +20,3 @@
other = "02.01.2006"
[allTags]
other = "Alle Tags"
-[gdprNotice]
- other = "Damit wir sehen können was unseren Besuchern gefällt, speichern wir Zugriffe, Browser- und Betriebssystemversion, sowie die erste Hälfte der IP Adresse. Damit bist du nicht eindeutig verfolgbar. Diese Informationen sind auf unserem Server gespeichert (also nicht bei Google oder anderen Dritten) und wir geben sie niemandem weiter."
diff --git a/i18n/en.toml b/i18n/en.toml
index c654d8a..d8d1672 100644
--- a/i18n/en.toml
+++ b/i18n/en.toml
@@ -20,5 +20,3 @@
other = "Jan 2, 2006"
[allTags]
other = "All tags"
-[gdprNotice]
- other = "To see what our visitors like, we save among others the access, browser and operating system version and the first half of your IP address. You cannot be identified with these information. All of this is saved on our server (not at Google or other third parties) and we don't share anything with others."
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index a469c5a..29e41ab 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -25,28 +25,14 @@
for(g=0;g<i.length;g++)f(c,i[g]);b._i.push([a,e,d])};b.__SV=1.2;a=f.createElement("script");a.type="text/javascript";a.async=!0;a.src="//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js";e=f.getElementsByTagName("script")[0];e.parentNode.insertBefore(a,e)}})(document,window.mixpanel||[]);
mixpanel.init("{{ . }}");</script><!-- end Mixpanel -->
{{ end }}
- {{ if .Site.Params.ShowGDPRNotice }}
- <div class="info" id="gdprInfo">
- <div class="info-content">
- {{ i18n "gdprNotice" }}
- </div>
- <div>
- <a class="btn btn-default" onclick='document.cookie = "the-green-spot-gdpr-ok=true; path=/";document.getElementById("gdprInfo").style.display = "none";console.log("OK")'>
- OK
- </a>
- </div>
- </div>
- <script type="text/javascript">
- function getCookie(name) {
- var value = "; " + document.cookie;
- var parts = value.split("; " + name + "=");
- if (parts.length == 2) return parts.pop().split(";").shift();
- }
- var gdprAlreadyShowed = getCookie("the-green-spot-gdpr-ok");
- if (gdprAlreadyShowed) {
- document.getElementById("gdprInfo").style.display = "none"
- }
- </script>
+
+ <!-- Custom tracking. E.g. Matomo -->
+ {{ if (fileExists "layouts/partials/tracking.html") }}
+ {{ partial "tracking.html" . }}
+ {{ end }}
+
+ {{ if (fileExists "layouts/partials/gdpr.html") }}
+ {{ partial "gdpr.html" . }}
{{ end }}
</body>
</html>
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index b1ad349..42941db 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -47,10 +47,6 @@
{{ if eq .URL "/" }}
<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
{{ end }}
-
- {{ if (fileExists "layouts/partials/tracking.html") }}
- {{ partial "tracking.html" . }}
- {{ end }}
</head>
<body>
{{ if isset .Params "image" }}