style: restyle the questionnaire views
This commit is contained in:
1 parent
6b16c88a5b
commit
3c19401d8b
15 files changed
+93
-99
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user