4 Commits

Author SHA1 Message Date
daniel 7187f7bb2a Fix element ID. 2026-06-16 20:59:17 +02:00
daniel ac0e1ed8c6 Use dash rather than underscore for class attribute. 2026-06-16 20:35:52 +02:00
daniel 5597e11a69 Move stylesheet one level up and rename it. 2026-06-16 17:13:35 +02:00
daniel a607faec9a Update banner for small screens. 2026-06-15 21:18:11 +02:00
5 changed files with 31 additions and 6 deletions
@@ -1,6 +1,6 @@
(function () {
function trackVisit() {
var banner = document.getElementById('cookie_banner');
var banner = document.getElementById('cookie-banner');
if (!banner) return;
var matomoUrl = banner.dataset.matomoUrl;
var siteId = banner.dataset.matomoSiteId;
@@ -16,6 +16,12 @@
gap: 1rem;
z-index: 9999;
transition: opacity 0.5s ease;
@media (max-width: 420px) {
flex-direction: column;
align-items: stretch;
gap: 0.75rem;
}
}
#cookie-banner.fade-out {
@@ -23,7 +29,25 @@
pointer-events: none;
}
#cookie-banner p { margin: 0; font-size: 14px; flex: 1; }
#cookie-banner p {
margin: 0;
font-size: 14px;
flex: 1;
}
#cookie-banner .cookie-buttons {
display: flex;
gap: 0.5rem;
flex-shrink: 0;
@media (max-width: 420px) {
width: 100%;
button {
flex: 1;
}
}
}
#cookie-banner button {
margin: 0.1rem 0;
@@ -8,7 +8,7 @@
{{ i18n "cookie_more_info" }}
</a>
</p>
<div>
<div class="cookie-buttons">
<button id="cookie-accept">
{{ i18n "cookie_button_accept" }}
</button>
@@ -4,3 +4,4 @@
{{- $js := resources.Get "js/hugo_cookie_consent/tracker_code.js" | minify -}}
<script src="{{ $js.RelPermalink }}" defer></script>
{{- end -}}
@@ -1,6 +1,6 @@
<p>
{{ i18n "cookie_status" }}:
<strong id="cookie_status"
<strong id="cookie-status"
data-accepted="{{ i18n "cookie_accepted" }}"
data-declined="{{ i18n "cookie_declined" }}"
data-none="{{ i18n "cookie_none" }}">