style: restyle the questionnaire views

This commit is contained in:
fromme committed 2026-11-12 11:36:18 +01:00
1 parent 6b16c88a5b
commit 3c19401d8b
15 files changed
+93 -99

No files matched your search

+8 -8
View File
@@ -6,29 +6,29 @@
# than dropped.
#}
{% set context = context|default({}) %}
<div class="flex flex-col gap-y-8">
<div class="flex flex-col gap-y-6">
{% for section in definition.sections %}
{% set shown = section.questions|filter(question => answers[question.key] is defined and definition.isVisible(question, answers)) %}
{% if shown is not empty %}
<section>
<section class="card p-5">
{% if section.title %}
<h2 class="text-lg font-bold pb-2">
<h2 class="section-title pb-2">
{{ section.title }}
</h2>
{% endif %}
<dl class="divide-y divide-gray-100">
<dl class="divide-y divide-line">
{% for question in shown %}
{% set answer = answers[question.key] %}
<div class="py-4 sm:grid sm:grid-cols-2 sm:gap-4">
<dt class="text-sm font-bold leading-6 text-gray-900">
<div class="py-3 first:pt-1 last:pb-0 sm:grid sm:grid-cols-2 sm:gap-4">
<dt class="text-muted">
{{ question.label|nl2br }}
</dt>
<dd class="mt-1 text-sm leading-6 text-gray-700 sm:mt-0">
<dd class="mt-1 sm:mt-0">
{% if question.type.value == 'rating' %}
<span class="inline-flex items-center gap-x-2">
<span class="inline-flex items-center">
{% for grade in range(1, 5) %}
{{ icon('star', html_classes('w-4 h-4', { 'text-gray-200': answer < grade, 'text-primary': answer >= grade })) }}
{{ icon('star', html_classes('w-4 h-4', { 'text-gray-300': answer < grade, 'text-brand': answer >= grade })) }}
{% endfor %}
</span>
{{ answer }} von 5
@@ -4,8 +4,8 @@
#}
{% set destination = assignment.destination %}
{% set pickup = assignment.hasBusEscort ? destination.pickup(assignment.pickup) : null %}
<p class="flex flex-wrap items-center gap-x-2 gap-y-1 pb-8 text-sm text-gray-700">
<span class="font-bold text-gray-900">{{ assignment.jobProfile.name }}</span>
<p class="flex flex-wrap items-center gap-x-2 gap-y-1 pb-6 text-muted">
<span class="font-bold text-ink">{{ assignment.jobProfile.name }}</span>
{% include '_partials/_dot.html.twig' %}
<span>{{ destination.product }}</span>
{% include '_partials/_dot.html.twig' %}
+3 -3
View File
@@ -6,11 +6,11 @@
{% for child in form|filter(child => child.vars.name not in ['draft', 'submit']) %}
{{ form_row(child) }}
{% endfor %}
<div class="flex flex-wrap items-center gap-4 pt-4">
{{ form_widget(form.submit, { attr: { class: 'btn' } }) }}
<div class="flex flex-wrap items-center gap-4 pt-2">
{{ form_widget(form.submit, { attr: { class: 'btn btn--cta' } }) }}
{{ form_widget(form.draft, { attr: { class: 'btn btn--secondary' } }) }}
</div>
<p class="pt-2 text-sm text-gray-500">
<p class="pt-3 text-sm text-muted">
Als Entwurf kannst du den Fragebogen jederzeit speichern und später weiter ausfüllen.
Abgeschickt ist er endgültig.
</p>