Make the consent notice styleable and keep the back-to-top button reachable in 1.14.1
The back-to-top button was hidden as long as the consent question was open, on every device - and on a phone the question tends to stay open. Instead of `display:none` it now anchors itself 12px above the bar wherever the bar covers its corner: below 800px for the centred card, at every width for the full-width bar and the corner card. Browsers without anchor positioning keep hiding it there. The bar renders before the button so it can be an anchor, and the reserved bottom padding grows to 320px below 620px, where the bar with its default text is up to 299px tall. The notice itself gets a face. Settings → Einwilligung now carries layout (card, bar, corner), shape (soft, round, square - one setting for the box and its buttons), a heading and four colours, each as #hex or @palette key. `Theme::cssColor()` resolves both, replacing the copy inside the back-to-top code; `Consent::styles()` writes the values as `--kant-consent-*` into the hashed style block. The base layout changes with it: an accent stripe and shield icon, equal-width buttons, a disclosure with a chevron, underlined legal links, a two-column bar on wide screens. Declining stays an outlined button of the same size next to accepting. The archive and the consent page carry the same variables - the archive had no palette at all until now. In the editor, rows with an own value are labelled in orange rather than bold with a dot; the device chips sit 6px apart with the focus ring inside the gap. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
860bed9199
commit
0bdcc7f90e
18 files changed
+300
-56
No files matched your search
@@ -214,6 +214,50 @@
|
||||
<label for="consentText">Text im Hinweis</label>
|
||||
<textarea id="consentText" name="consentText" rows="3" maxlength="600">{{ settings.consentText }}</textarea>
|
||||
<p class="field-help">Leer lassen für den Standardtext. Er soll sagen, was geladen wird und was ohne Zustimmung passiert – nicht zum Klicken drängen.</p>
|
||||
<fieldset class="field-set">
|
||||
<legend>Aussehen des Hinweises</legend>
|
||||
<div class="fields">
|
||||
<div>
|
||||
<label for="consentLayout">Anordnung</label>
|
||||
<select id="consentLayout" name="consentLayout">
|
||||
<option value="karte"{{ settings.consentLayout == 'karte' ? ' selected' : '' }}>Karte unten in der Mitte</option>
|
||||
<option value="leiste"{{ settings.consentLayout == 'leiste' ? ' selected' : '' }}>Leiste über die volle Breite</option>
|
||||
<option value="ecke"{{ settings.consentLayout == 'ecke' ? ' selected' : '' }}>Kleine Karte rechts unten</option>
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<label for="consentShape">Form</label>
|
||||
<select id="consentShape" name="consentShape">
|
||||
<option value="weich"{{ settings.consentShape == 'weich' ? ' selected' : '' }}>Abgerundet</option>
|
||||
<option value="rund"{{ settings.consentShape == 'rund' ? ' selected' : '' }}>Rund</option>
|
||||
<option value="eckig"{{ settings.consentShape == 'eckig' ? ' selected' : '' }}>Eckig</option>
|
||||
</select>
|
||||
<p class="field-help">Gilt für die Fläche und ihre Knöpfe zusammen.</p>
|
||||
</div>
|
||||
<div>
|
||||
<label for="consentTitle">Überschrift</label>
|
||||
<input id="consentTitle" name="consentTitle" maxlength="80" value="{{ settings.consentTitle }}" placeholder="Externe Inhalte und Einwilligung">
|
||||
</div>
|
||||
<div>
|
||||
<label for="consentColor">Farbe der Fläche</label>
|
||||
<input id="consentColor" name="consentColor" value="{{ settings.consentColor }}" placeholder="@paper" data-color data-palette="{{ palette|json_encode|e('html_attr') }}">
|
||||
</div>
|
||||
<div>
|
||||
<label for="consentInk">Schriftfarbe</label>
|
||||
<input id="consentInk" name="consentInk" value="{{ settings.consentInk }}" placeholder="@ink" data-color data-palette="{{ palette|json_encode|e('html_attr') }}">
|
||||
</div>
|
||||
<div>
|
||||
<label for="consentAccent">Farbe des Knopfes „Alle akzeptieren“</label>
|
||||
<input id="consentAccent" name="consentAccent" value="{{ settings.consentAccent }}" placeholder="@accent" data-color data-palette="{{ palette|json_encode|e('html_attr') }}">
|
||||
<p class="field-help">Färbt auch den Streifen oben, das Symbol und die Kästchen.</p>
|
||||
</div>
|
||||
<div>
|
||||
<label for="consentAccentInk">Schrift auf dem Knopf</label>
|
||||
<input id="consentAccentInk" name="consentAccentInk" value="{{ settings.consentAccentInk }}" placeholder="#ffffff" data-color data-palette="{{ palette|json_encode|e('html_attr') }}">
|
||||
</div>
|
||||
</div>
|
||||
<p class="field-help">Leer heißt: Papier, Tinte und Akzent aus dem Design. „Nur notwendige“ bleibt bewusst ein Rahmenknopf in der Schriftfarbe – beide Antworten sind gleich groß, keine wird versteckt.</p>
|
||||
</fieldset>
|
||||
<div class="fields">
|
||||
<div>
|
||||
<label for="privacyPath">Adresse der Datenschutzseite</label>
|
||||
|
||||
Reference in new issue
Block a user