Remove remnants of hugo_cookie_consent.

This commit is contained in:
2026-06-16 17:14:18 +02:00
parent b784459d87
commit 3ac7f0fb8e
16 changed files with 15 additions and 166 deletions
+1
View File
@@ -0,0 +1 @@
<!-- Create a file like this in layouts/_partials and define extra tags for the HTML BODY. -->
+14
View File
@@ -0,0 +1,14 @@
<div class="card h-100">
{{ if .Params.image }}
<img src="{{ .Params.image | relURL }}" class="card-img-top" alt="{{ .Title }}">
{{ end }}
<div class="card-body">
<h5 class="card-title">{{ .Title }}</h5>
<p class="card-text">{{ .Summary }}</p>
</div>
<div class="card-footer bg-transparent border-top-0">
<a href="{{ .RelPermalink }}" class="btn btn-primary btn-sm">Read More</a>
</div>
</div>
-11
View File
@@ -1,11 +0,0 @@
{{ if not (isset .Site.Params "cookieConsentDisabled") }}
<div id="cookie-banner" style="display:none" role="dialog"
aria-label="Cookie consent" aria-live="polite">
<p>Diese Website möchte ein Cookie speichern.
<a href="{{ .Site.Params.privacyPolicyURL }}">Mehr darüber.</a></p>
<div>
<button id="cookie-accept">Akzeptieren</button>
<button id="cookie-decline">Ablehnen</button>
</div>
</div>
{{ end }}
+1
View File
@@ -0,0 +1 @@
<!-- Create a file like this in layouts/_partials and define extra tags for the HTML HEAD. -->
+1 -2
View File
@@ -1,9 +1,8 @@
{{ printf "<!-- %s -->" hugo.Environment | safeHTML }}
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="{{ .Page.Params.description }}">
<meta name="author" content="{{ .Site.Params.author }}">
<link rel="me" href="https://neph.social/@nierenverein">
<meta name="generator" content="{{ hugo.Environment }}">
<link rel="icon" type="image/png" href="/img/favicon.png">
<title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }} - {{ .Site.Title }}{{ end }}</title>
+1
View File
@@ -0,0 +1 @@
<!-- Create a file like this in layouts/_partials to include additional javascript. -->
+1 -31
View File
@@ -1,6 +1,3 @@
{{- $js := resources.Get "js/cookie-consent.js" | minify -}}
<script src="{{ $js.RelPermalink }}" defer></script>
<!-- Bootstrap Bundle JS (includes Popper.js) -->
{{ $bs := resources.Get "js/bootstrap.bundle.min.js" | fingerprint "sha512" }}
{{ if $bs }}
@@ -14,31 +11,4 @@
<script src="{{ $custom.RelPermalink }}" integrity="{{ $custom.Data.Integrity }}" crossorigin="anonymous"></script>
{{ end }}
{{ if eq hugo.Environment "production" }}
<!-- Matomo -->
<script>
// Path 1: user just clicked Accept (event fires this session)
window.addEventListener('cookieAccepted', loadMatomo);
// Path 2: user already consented in a previous visit
if (localStorage.getItem('cookie_consent') === 'accepted') {
loadMatomo();
}
function loadMatomo() {
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://matomo.bovender.de/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '9']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
}
</script>
<!-- End Matomo Code -->
{{ end }}
{{ partial "scripts_extra.html "}}