Files
KantSites/templates/admin/settings.html.twig
T
kantarciandClaude Opus 5 abf0bd2c6b Freie Gestaltung statt Tokenlisten (Dokumentschema v10)
Der bisherige Editor bot drei Farben, keine Schriftwahl und elf
Auswahllisten mit 44 festen Werten. ADR 008 hatte das mit Sicherheit
begründet - der Schluss war falsch: die Alternative zu beliebigem
CSS-Text ist nicht eine Auswahlliste, sondern ein typisiertes
Designmodell.

StyleSchema erklärt jede Eigenschaft einmal mit Typ, CSS-Entsprechung
und Grenzen. Validator, CSS-Erzeugung und Editorpanel lesen dieselbe
Definition, also kann der Editor nichts anbieten, was der Server
ablehnt. Rund fünfzig Eigenschaften in sieben Gruppen, je Block, je
Gerät und für den Hover-Zustand, mit Vererbung und einzelnem
Zurücksetzen.

Werte sind kurze Zeichenketten mit verankertem Muster, nie CSS-Text;
zusammengesetzte Deklarationen baut der Compiler selbst. Der Server
erzeugt daraus pro Seite ein blockgenaues Stylesheet, das über seinen
eigenen SHA-256-Hash erlaubt wird statt über unsafe-inline.

Theme unter /admin/theme: freie Farbpalette als @schlüssel, Schriften
aus Systemschrift oder Google Fonts, Grundtypografie mit modularer
Überschriftenskala. Google Fonts auf ausdrückliche Nutzerentscheidung;
die Richtlinie öffnet die Hosts nur, wenn wirklich eine eingestellt
ist.

Alte Tokenwerte aus v2 bis v9 bleiben gültig und im Editor unter
"Klassische Werte dieser Seite" bearbeitbar.

Geprüft: 154 PHP-Tests / 563 Assertions unter PHP 8.2.12 und 8.4.22,
15 JavaScript-Modelltests, Lint/Format/Container. Im Browser wurde nur
der Aufbau des Panels bestätigt, kein Gestaltungsvorgang von Hand
ausgeführt.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-12 13:04:54 +02:00

125 lines
7.8 KiB
Twig
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% extends 'admin/base.html.twig' %}
{% block title %}Einstellungen{% endblock %}
{% block body %}
<header class="admin-header">
<a class="brand" href="{{ path('admin_pages') }}"><span class="brand-icon" aria-hidden="true">k.</span>kant<span>cms</span></a>
<div class="header-actions"><a href="/">Website ansehen ↗</a><span class="user-name">{{ app.user.userIdentifier }}</span><form action="{{ path('admin_logout') }}" method="post"><input type="hidden" name="_csrf_token" value="{{ csrf_token('logout') }}"><button class="subtle" type="submit">Abmelden</button></form></div>
</header>
<main id="admin-main" class="pages-main" tabindex="-1">
<p class="eyebrow">EINSTELLUNGEN</p><h1>Unternehmen und Adressen</h1>
<p class="muted">Aus diesen Angaben entstehen die strukturierten Daten der Startseite. Was hier steht, ist genau das, was Suchmaschinen lesen – es gibt keine zweite, unsichtbare Fassung.</p>
<p class="admin-links">
<a class="secondary" href="{{ path('admin_pages') }}">Seiten</a>
<a class="secondary" href="{{ path('admin_menus') }}">Menüs</a> <a class="secondary" href="{{ path('admin_theme') }}">Design</a>
<a class="secondary" href="{{ path('admin_forms') }}">Formulare</a>
<a class="secondary" href="/sitemap.xml">Sitemap ↗</a>
<a class="secondary" href="/robots.txt">robots.txt ↗</a>
</p>
{% for type in ['error', 'success'] %}{% for message in app.flashes(type) %}
<p class="notice {{ type == 'error' ? 'error' : 'ok' }}" role="{{ type == 'error' ? 'alert' : 'status' }}">{{ message }}</p>
{% endfor %}{% endfor %}
<section class="menu-section">
<div class="section-heading"><h2>Unternehmensdaten</h2><span class="muted">Grundlage für Organization und LocalBusiness</span></div>
<form action="{{ path('admin_settings_save') }}" method="post" class="menu-form">
<input type="hidden" name="_csrf_token" value="{{ csrf_token('settings') }}">
<div class="create-grid">
<div>
<label for="legalName">Name des Unternehmens</label>
<input id="legalName" name="legalName" maxlength="200" value="{{ settings.legalName }}">
</div>
<div>
<label for="phone">Telefon</label>
<input id="phone" name="phone" maxlength="40" value="{{ settings.phone }}">
</div>
<div>
<label for="email">E-Mail</label>
<input id="email" name="email" type="email" maxlength="120" value="{{ settings.email }}">
</div>
<div>
<label for="street">Straße und Hausnummer</label>
<input id="street" name="street" maxlength="120" value="{{ settings.street }}">
</div>
<div>
<label for="postalCode">Postleitzahl</label>
<input id="postalCode" name="postalCode" maxlength="16" value="{{ settings.postalCode }}">
</div>
<div>
<label for="city">Ort</label>
<input id="city" name="city" maxlength="120" value="{{ settings.city }}">
</div>
<div>
<label for="country">Land</label>
<input id="country" name="country" maxlength="2" pattern="[A-Za-z]{2}" value="{{ settings.country }}">
<p class="field-help">Zweibuchstabiger Code, zum Beispiel DE.</p>
</div>
</div>
<label for="description">Kurzbeschreibung</label>
<input id="description" name="description" maxlength="300" value="{{ settings.description }}">
<label for="sameAs">Profile</label>
<textarea id="sameAs" name="sameAs" rows="3" placeholder="https://www.linkedin.com/company/…">{{ settings.sameAs|join('\n') }}</textarea>
<p class="field-help">Eine HTTPS-Adresse je Zeile, höchstens zwanzig.</p>
<label class="check-label" for="localBusiness"><input id="localBusiness" name="localBusiness" type="checkbox" value="1"{{ settings.localBusiness ? ' checked' : '' }}> Als lokales Unternehmen auszeichnen</label>
<p class="field-help">Braucht mindestens Straße und Ort. Sinnvoll bei einem Standort mit Kundenverkehr.</p>
<label class="check-label" for="llmsTxt"><input id="llmsTxt" name="llmsTxt" type="checkbox" value="1"{{ settings.llmsTxt ? ' checked' : '' }}> <code>llms.txt</code> ausliefern</label>
<p class="field-help">Eine maschinenlesbare Liste der veröffentlichten, indexierbaren Seiten. Optional. Kein Rankingfaktor und keine Voraussetzung für irgendeine Suchfunktion; ohne Aktivierung antwortet die Adresse mit 404.</p>
<label for="robotsExtra">Zusätzliche Zeilen für robots.txt</label>
<textarea id="robotsExtra" name="robotsExtra" rows="3">{{ settings.robotsExtra }}</textarea>
<p class="field-help">Nur Kommentarzeilen und einfache Anweisungen wie <code>Disallow: /pfad</code>. Höchstens dreißig Zeilen.</p>
<button class="primary" type="submit">Unternehmensdaten speichern</button>
</form>
</section>
<section class="menu-section">
<div class="section-heading"><h2>Weiterleitungen <span class="count">{{ redirects|length }}</span></h2><span class="muted">Werden vor dem 404 geprüft.</span></div>
<form action="{{ path('admin_redirect_save') }}" method="post" class="menu-form">
<input type="hidden" name="_csrf_token" value="{{ csrf_token('settings') }}">
<div class="create-grid">
<div>
<label for="from">Alte Adresse</label>
<input id="from" name="from" maxlength="400" required placeholder="alte-seite">
</div>
<div>
<label for="to">Neue Adresse</label>
<input id="to" name="to" maxlength="400" placeholder="leistungen/webdesign">
<p class="field-help">Bei 410 leer lassen.</p>
</div>
<div>
<label for="status">Art</label>
<select id="status" name="status">
<option value="301">301 – dauerhaft verschoben</option>
<option value="410">410 – entfernt</option>
</select>
</div>
</div>
<button class="primary" type="submit">Weiterleitung speichern</button>
</form>
{% if redirects is not empty %}
<table class="menu-table redirect-table">
<caption class="visually-hidden">Gespeicherte Weiterleitungen</caption>
<thead><tr><th scope="col">Alte Adresse</th><th scope="col">Ziel</th><th scope="col">Art</th><th scope="col">Entfernen</th></tr></thead>
<tbody>
{% for entry in redirects %}
<tr>
<td><code>/{{ entry.from }}</code></td>
<td>{% if entry.to %}<code>/{{ entry.to }}</code>{% else %}<span class="muted">—</span>{% endif %}</td>
<td>{{ entry.status }}</td>
<td>
<form action="{{ path('admin_redirect_save') }}" method="post">
<input type="hidden" name="_csrf_token" value="{{ csrf_token('settings') }}">
<input type="hidden" name="remove" value="{{ entry.id }}">
<button class="text-button danger-text" type="submit" aria-label="Weiterleitung von /{{ entry.from }} entfernen">Entfernen</button>
</form>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
</section>
<p class="footnote">Kant CMS · Visueller Editor, erster Prototyp</p>
</main>
{% endblock %}