6 Commits

Author SHA1 Message Date
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
daniel 4c5a2f2225 Fix styling of button and banner. 2026-06-15 20:15:46 +02:00
daniel b38f424c84 Explicitly set colors of banner. 2026-06-15 05:48:01 +02:00
daniel ad727cd739 Fix styling. 2026-06-14 23:14:56 +02:00
5 changed files with 77 additions and 44 deletions
+72
View File
@@ -0,0 +1,72 @@
#cookie-banner {
color: #E2E8F0;
background-color: #4A5568;
position: fixed;
top: 2.5rem;
left: 50%;
transform: translateX(-50%);
width: calc(100vw - 2rem);
max-width: 480px;
border: 1px solid #e2e2e2;
border-radius: 12px;
padding: 1rem 1.25rem;
box-shadow: 0 0 36px #111;
display: flex;
align-items: center;
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 {
opacity: 0;
pointer-events: none;
}
#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;
padding: .45rem 1rem;
border-radius: 8px;
border: 1px solid #ccc;
cursor: pointer;
font-size: 13px;
white-space: nowrap;
}
#cookie-accept {
background: #4A5E52; color: #fff; border-color: #1a1a1a;
}
#cookie-decline {
background: #2D3748; color: #fff; border-color: #1a1a1a;
}
#cookie-settings-button {
background: #272b2e; color: #fff; border-color: #1a1a1a;
}
@@ -1,39 +0,0 @@
#cookie-banner {
position: fixed;
top: 2.5rem;
left: 50%;
transform: translateX(-50%);
width: min(480px, calc(100vw - 2rem));
background: #fff;
border: 1px solid #e2e2e2;
border-radius: 12px;
padding: 1rem 1.25rem;
box-shadow: 0 4px 24px rgba(0,0,0,.08);
display: flex;
align-items: center;
gap: 1rem;
z-index: 9999;
transition: opacity 0.5s ease;
}
#cookie-banner.fade-out {
opacity: 0;
pointer-events: none;
}
#cookie-banner p { margin: 0; font-size: 14px; flex: 1; }
#cookie-banner button {
margin: 0.1rem 0;
padding: .45rem 1rem;
border-radius: 8px;
border: 1px solid #ccc;
cursor: pointer;
font-size: 13px;
white-space: nowrap;
}
#cookie-accept {
background: #0b913a; color: #fff; border-color: #1a1a1a;
}
@@ -8,7 +8,7 @@
{{ i18n "cookie_more_info" }} {{ i18n "cookie_more_info" }}
</a> </a>
</p> </p>
<div> <div class="cookie-buttons">
<button id="cookie-accept"> <button id="cookie-accept">
{{ i18n "cookie_button_accept" }} {{ i18n "cookie_button_accept" }}
</button> </button>
@@ -1,12 +1,12 @@
<p> <p>
{{ i18n "cookie_status" }}: {{ i18n "cookie_status" }}:
<strong id="cookie_status" <strong id="cookie-status"
data-accepted="{{ i18n "cookie_accepted" }}" data-accepted="{{ i18n "cookie_accepted" }}"
data-declined="{{ i18n "cookie_declined" }}" data-declined="{{ i18n "cookie_declined" }}"
data-none="{{ i18n "cookie_none" }}"> data-none="{{ i18n "cookie_none" }}">
&mdash; &mdash;
</strong> </strong>
</p> </p>
<button onclick="reopenCookieBanner()"> <button id="cookie-settings-button" onclick="reopenCookieBanner()">
{{ i18n "cookie_change" }} {{ i18n "cookie_change" }}
</button> </button>