Liefere das Anfrageformular je Anfragegrund aus und gib dem Widget Gründe, Formularführung und Präsentation
Das Widget Anfrage wählt statt eines Anfrage-Einstiegs mehrere Anfragegründe, jeder zeigt auf ein veröffentlichtes Formular
(optional mit vorgewähltem Anliegen). Der Besucher erhält genau das Formular seines Grundes: /anfrage/formular/{vorlage}
mit Grund in der Adresse, dasselbe Token, dieselbe Auswertung und Annahme. Ein Dialog (dialog-Element) und die Grundauswahl
als Karten oder Auswahlfeld kommen aus resources/js/inquiry-widget.js. Seiten mit einem Einstieg bleiben darstellbar.
Bereiche lassen sich wie Gruppen anzeigen oder ausblenden.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f255bf5200
commit
fb479c1b01
18 files changed
+1394
-57
No files matched your search
@@ -448,3 +448,285 @@ @media (prefers-reduced-motion: reduce) {
|
||||
transition: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Widget „Anfrage“ (ADR-61): Auswahl des Anfragegrundes, Formular je Grund, Dialog. Breite, Abstände, Feldanordnung und
|
||||
* Buttons sind Einstellungen des Widgets (Klassen iw-…); das Verhalten bei wenig Platz folgt der Breite des Containers.
|
||||
*/
|
||||
.inquiry-widget {
|
||||
--iw-width: 44rem;
|
||||
container-type: inline-size;
|
||||
max-width: var(--iw-width);
|
||||
margin-inline: auto;
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
.inquiry-widget.iw-width-narrow {
|
||||
--iw-width: 32rem;
|
||||
}
|
||||
|
||||
.inquiry-widget.iw-width-wide {
|
||||
--iw-width: 60rem;
|
||||
}
|
||||
|
||||
.inquiry-widget [hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.inquiry-widget .inquiry {
|
||||
--inquiry-width: 100%;
|
||||
max-width: none;
|
||||
margin-inline: 0;
|
||||
}
|
||||
|
||||
.iw-body {
|
||||
display: grid;
|
||||
gap: var(--space-4);
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.iw-picker {
|
||||
display: grid;
|
||||
gap: var(--space-3);
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.iw-question {
|
||||
padding: 0;
|
||||
font-size: 1.2em;
|
||||
font-weight: 700;
|
||||
color: var(--color-heading);
|
||||
}
|
||||
|
||||
.iw-cards {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
|
||||
gap: var(--space-3);
|
||||
}
|
||||
|
||||
.iw-card {
|
||||
position: relative;
|
||||
display: flex;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.iw-card input {
|
||||
position: absolute;
|
||||
inset-block-start: var(--space-3);
|
||||
inset-inline-end: var(--space-3);
|
||||
width: 1.4rem;
|
||||
height: 1.4rem;
|
||||
margin: 0;
|
||||
accent-color: var(--color-action);
|
||||
}
|
||||
|
||||
.iw-card label {
|
||||
display: grid;
|
||||
align-content: start;
|
||||
gap: var(--space-1);
|
||||
flex: 1;
|
||||
min-height: var(--touch-target);
|
||||
padding: var(--space-3) var(--space-5) var(--space-3) var(--space-3);
|
||||
border: 2px solid var(--color-border);
|
||||
border-radius: var(--radius-card);
|
||||
background: var(--color-surface);
|
||||
cursor: pointer;
|
||||
transition: border-color 0.15s ease, background-color 0.15s ease;
|
||||
}
|
||||
|
||||
.iw-card label:hover {
|
||||
border-color: var(--color-border-strong);
|
||||
}
|
||||
|
||||
.iw-card input:checked + label {
|
||||
border-color: var(--color-action);
|
||||
background: var(--color-success-surface);
|
||||
}
|
||||
|
||||
.iw-card input:focus-visible + label {
|
||||
outline: 3px solid var(--color-focus);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.iw-card-label {
|
||||
font-weight: 700;
|
||||
color: var(--color-heading);
|
||||
}
|
||||
|
||||
.iw-card-desc {
|
||||
font-size: 0.92em;
|
||||
color: var(--color-text-muted);
|
||||
}
|
||||
|
||||
.iw-select {
|
||||
width: 100%;
|
||||
min-height: var(--touch-target);
|
||||
padding: var(--space-2) var(--space-3);
|
||||
border: 1px solid var(--color-border-strong);
|
||||
border-radius: var(--radius-small);
|
||||
background: var(--color-surface);
|
||||
color: var(--color-text);
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
.iw-select:focus-visible,
|
||||
.iw-change:focus-visible,
|
||||
.iw-close:focus-visible,
|
||||
.iw-opener:focus-visible {
|
||||
outline: 3px solid var(--color-focus);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.iw-chosen {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: baseline;
|
||||
gap: var(--space-2);
|
||||
margin: 0;
|
||||
padding: var(--space-2) var(--space-3);
|
||||
border-radius: var(--radius-small);
|
||||
background: var(--color-surface-subtle);
|
||||
}
|
||||
|
||||
.iw-change {
|
||||
padding: 0.25rem 0;
|
||||
min-height: var(--touch-target);
|
||||
border: 0;
|
||||
background: none;
|
||||
color: var(--color-action);
|
||||
font: inherit;
|
||||
font-weight: 600;
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.iw-forms {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.iw-forms > .inquiry:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/* Abstände */
|
||||
.iw-spacing-compact .inquiry-form,
|
||||
.iw-spacing-compact .inquiry-step,
|
||||
.iw-spacing-compact .inquiry-group {
|
||||
gap: var(--space-2);
|
||||
}
|
||||
|
||||
.iw-spacing-airy .inquiry-form {
|
||||
gap: var(--space-6);
|
||||
}
|
||||
|
||||
.iw-spacing-airy .inquiry-step,
|
||||
.iw-spacing-airy .inquiry-group {
|
||||
gap: var(--space-5);
|
||||
}
|
||||
|
||||
/* Anordnung der Felder: „Immer eine Spalte“ hebt die zweispaltige Anordnung bei viel Platz auf. */
|
||||
.iw-cols-one .inquiry-group {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
/* Buttons: „Umrandet“ für die Haupthandlungen; „Zurück“ bleibt die Nebenschaltfläche. */
|
||||
.iw-btn-outline .button:not(.button-secondary):not(.button-quiet) {
|
||||
background: transparent;
|
||||
border-color: var(--color-action);
|
||||
color: var(--color-action);
|
||||
}
|
||||
|
||||
.iw-btn-outline .button:not(.button-secondary):not(.button-quiet):hover {
|
||||
background: var(--color-success-surface);
|
||||
color: var(--color-action);
|
||||
}
|
||||
|
||||
.iw-opener {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
/* Dialog über der Seite */
|
||||
.iw-dialog {
|
||||
width: min(calc(100vw - 2 * var(--space-4)), var(--iw-width, 44rem));
|
||||
max-width: none;
|
||||
max-height: calc(100dvh - 2 * var(--space-4));
|
||||
margin: auto;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
border-radius: var(--radius-panel);
|
||||
background: var(--color-surface);
|
||||
color: var(--color-text);
|
||||
box-shadow: var(--shadow-raised);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.iw-dialog[open] {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.iw-dialog::backdrop {
|
||||
background: rgb(3 37 81 / 55%);
|
||||
}
|
||||
|
||||
.iw-dialog-head {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
flex: none;
|
||||
padding: var(--space-2) var(--space-3) 0;
|
||||
}
|
||||
|
||||
.iw-close {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: var(--touch-target);
|
||||
height: var(--touch-target);
|
||||
border: 0;
|
||||
border-radius: var(--radius-pill);
|
||||
background: transparent;
|
||||
color: var(--color-text);
|
||||
font-size: 1.8rem;
|
||||
line-height: 1;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.iw-close:hover {
|
||||
background: var(--color-surface-subtle);
|
||||
}
|
||||
|
||||
.iw-dialog .iw-body {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
overflow-y: auto;
|
||||
overscroll-behavior: contain;
|
||||
padding: 0 var(--space-5) var(--space-5);
|
||||
}
|
||||
|
||||
html.iw-locked {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Smartphone: Der Dialog füllt den Bildschirm. */
|
||||
@media (max-width: 40rem) {
|
||||
.iw-dialog {
|
||||
width: 100vw;
|
||||
height: 100dvh;
|
||||
max-height: none;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.iw-dialog .iw-body {
|
||||
padding: 0 var(--space-4) var(--space-5);
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.inquiry-widget * {
|
||||
scroll-behavior: auto !important;
|
||||
transition: none !important;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user