2020-05-13 12:19:41 +02:00
|
|
|
{{ $cookieConsentScript := resources.Get "js/haven.umd.min.js" | resources.Fingerprint }}
|
|
|
|
<script src="{{ $cookieConsentScript.Permalink }}"{{ if not .Site.Params.disable_sri }} integrity="{{ $cookieConsentScript.Data.Integrity }}" crossorigin="anonymous"{{ end }}></script>
|
2016-11-13 13:13:17 +01:00
|
|
|
|
|
|
|
<script>
|
2020-05-13 12:19:41 +02:00
|
|
|
Haven.create({
|
|
|
|
notification: {
|
2020-05-17 21:45:23 +02:00
|
|
|
{{ with .Site.Params.cookie_consent_info_url -}}
|
|
|
|
policyUrl: {{ . | absURL }},
|
2020-05-17 21:42:56 +02:00
|
|
|
{{- end }}
|
2020-05-13 12:19:41 +02:00
|
|
|
styles: {
|
|
|
|
background: '#428bca',
|
|
|
|
textColor: '#ffffff',
|
|
|
|
buttonBackgroundColor: '#f71559',
|
|
|
|
buttonTextColor: '#ffffff',
|
|
|
|
},
|
2016-11-13 13:13:17 +01:00
|
|
|
},
|
2020-05-13 12:19:41 +02:00
|
|
|
translations: {
|
|
|
|
{{ .Lang }}: {
|
|
|
|
notification: {
|
|
|
|
policy: '{{ i18n "cookieLink" }}',
|
|
|
|
message: '{{ i18n "cookieMessage" }}',
|
|
|
|
accept: '{{ i18n "cookieAccept" }}',
|
|
|
|
decline: '{{ i18n "cookieDecline" }}',
|
|
|
|
}
|
|
|
|
},
|
2016-11-24 13:39:39 +01:00
|
|
|
},
|
2020-05-13 12:19:41 +02:00
|
|
|
services: [
|
|
|
|
{
|
|
|
|
name: 'google-analytics',
|
|
|
|
options: {
|
2024-09-17 05:47:07 +02:00
|
|
|
id: {{ .Site.Config.Services.GoogleAnalytics.ID }},
|
2020-05-13 12:19:41 +02:00
|
|
|
},
|
|
|
|
purposes: ['analytics'],
|
|
|
|
inject: true,
|
|
|
|
}
|
|
|
|
]
|
|
|
|
});
|
2016-11-13 13:13:17 +01:00
|
|
|
</script>
|
2016-11-24 13:33:56 +01:00
|
|
|
|
|
|
|
{{- /* vim: set ts=2 sw=2 et: */}}
|