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
+17
-17
@@ -178,10 +178,10 @@
|
||||
# several: its title, its description and its sections.
|
||||
#}
|
||||
{%- block questionnaire_part_row -%}
|
||||
<section class="pb-4">
|
||||
<h2 class="text-2xl font-bold pb-2">{{ label }}</h2>
|
||||
<section class="card mb-6 p-5 sm:p-6">
|
||||
<h2 class="text-xl font-bold text-brand pb-2">{{ label }}</h2>
|
||||
{%- if help is not empty -%}
|
||||
<p class="pb-6 text-gray-700">{{ help|nl2br }}</p>
|
||||
<p class="pb-6 text-muted">{{ help|nl2br }}</p>
|
||||
{%- endif -%}
|
||||
{%- for child in form -%}
|
||||
{{- form_row(child) -}}
|
||||
@@ -196,7 +196,7 @@
|
||||
#}
|
||||
{%- block questionnaire_leg_row -%}
|
||||
<div class="pt-4"{% with { attr: row_attr } %}{{ block('attributes') }}{% endwith %}>
|
||||
<h3 class="text-xl font-bold text-primary border-b border-gray-200 pb-2 mb-6">{{ label }}</h3>
|
||||
<h3 class="text-lg font-bold text-brand border-b-2 border-brand pb-2 mb-6">{{ label }}</h3>
|
||||
{%- for child in form -%}
|
||||
{{- form_row(child) -}}
|
||||
{%- endfor -%}
|
||||
@@ -211,7 +211,7 @@
|
||||
{%- block questionnaire_section_row -%}
|
||||
<fieldset class="pb-8">
|
||||
{%- if label is not same as(false) -%}
|
||||
<legend class="text-xl font-bold pb-4">{{ label }}</legend>
|
||||
<legend class="section-title pb-4">{{ label }}</legend>
|
||||
{%- endif -%}
|
||||
<div class="flex flex-col gap-y-6">
|
||||
{%- for child in form -%}
|
||||
@@ -230,9 +230,9 @@
|
||||
<div class="flex flex-col gap-y-1" {{ block('widget_container_attributes') }}>
|
||||
{%- for child in form -%}
|
||||
<label for="{{ child.vars.id }}"
|
||||
class="{{ html_classes('flex cursor-pointer select-none items-center gap-x-3 rounded-md px-3 py-2 text-sm ring-1 ring-inset transition-colors hover:bg-gray-100 has-[:checked]:bg-primary/10 has-[:checked]:ring-primary', { 'ring-red-700': errors|length, 'ring-gray-200': not errors|length }) }}">
|
||||
{{- form_widget(child, { attr: { class: 'h-4 w-4 shrink-0 border-gray-300 text-primary focus:ring-primary' } }) -}}
|
||||
<span class="text-gray-900">{{ child.vars.label }}</span>
|
||||
class="{{ html_classes('flex cursor-pointer select-none items-center gap-x-3 rounded-md px-3 py-2 text-sm ring-1 ring-inset transition-colors hover:bg-page has-[:checked]:bg-brand-light has-[:checked]:ring-brand', { 'ring-red-700': errors|length, 'ring-line': not errors|length }) }}">
|
||||
{{- form_widget(child, { attr: { class: 'h-4 w-4 shrink-0 border-slate-500 text-brand focus:ring-brand-bright' } }) -}}
|
||||
<span class="text-ink">{{ child.vars.label }}</span>
|
||||
</label>
|
||||
{%- endfor -%}
|
||||
</div>
|
||||
@@ -244,7 +244,7 @@
|
||||
{%- for child in form -%}
|
||||
<label class="cursor-pointer">
|
||||
{{- form_widget(child, { attr: { class: 'peer sr-only' } }) -}}
|
||||
<span class="{{ html_classes('flex h-10 w-10 items-center justify-center rounded-md text-sm font-bold ring-1 ring-inset peer-checked:bg-primary peer-checked:text-white peer-checked:ring-primary peer-focus-visible:ring-2', { 'ring-red-700 text-red-700': errors|length, 'ring-gray-300 text-gray-900': not errors|length }) }}">
|
||||
<span class="{{ html_classes('flex h-10 w-10 items-center justify-center rounded-md text-sm font-bold ring-1 ring-inset peer-checked:bg-brand peer-checked:text-white peer-checked:ring-brand peer-focus-visible:outline-3 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-brand-bright', { 'ring-red-700 text-red-700': errors|length, 'ring-slate-500 text-ink': not errors|length }) }}">
|
||||
{{- child.vars.label -}}
|
||||
</span>
|
||||
</label>
|
||||
@@ -273,7 +273,7 @@
|
||||
{%- for child in form -%}
|
||||
<label class="cursor-pointer">
|
||||
{{- form_widget(child, { attr: { class: 'peer sr-only' } }) -}}
|
||||
<span class="{{ html_classes('flex min-w-16 items-center justify-center rounded-md px-3 py-1.5 text-sm ring-1 ring-inset transition-colors hover:bg-gray-100 peer-checked:bg-primary peer-checked:text-white peer-checked:ring-primary peer-focus-visible:ring-2', { 'ring-red-700 text-red-700': errors|length, 'ring-gray-300 text-gray-900': not errors|length }) }}">
|
||||
<span class="{{ html_classes('flex min-w-16 items-center justify-center rounded-md px-3 py-1.5 text-sm ring-1 ring-inset transition-colors hover:bg-page peer-checked:bg-brand peer-checked:text-white peer-checked:ring-brand peer-focus-visible:outline-3 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-brand-bright', { 'ring-red-700 text-red-700': errors|length, 'ring-slate-500 text-ink': not errors|length }) }}">
|
||||
{{- child.vars.label -}}
|
||||
</span>
|
||||
</label>
|
||||
@@ -292,7 +292,7 @@
|
||||
{%- block questionnaire_pick_row -%}
|
||||
<div class="questionnaire-pick">
|
||||
{{- block('questionnaire_pick_toggle') -}}
|
||||
<div class="questionnaire-pick__body ml-2 border-l-2 border-gray-200 pt-2 pb-1 pl-4">
|
||||
<div class="questionnaire-pick__body ml-2 border-l-2 border-line pt-2 pb-1 pl-4">
|
||||
<div class="flex flex-col gap-y-2">
|
||||
{%- for child in form|filter(child => child.vars.name != 'picked') -%}
|
||||
{{- form_row(child) -}}
|
||||
@@ -331,7 +331,7 @@
|
||||
{%- with { child: form.hours_per_day } -%}{{- block('questionnaire_pick_number') -}}{%- endwith -%}
|
||||
</div>
|
||||
<div>
|
||||
<p class="pb-1 text-sm text-gray-700">{{ form.dates.vars.label }}</p>
|
||||
<p class="pb-1 text-sm text-muted">{{ form.dates.vars.label }}</p>
|
||||
{{- form_widget(form.dates) -}}
|
||||
</div>
|
||||
</div>
|
||||
@@ -347,9 +347,9 @@
|
||||
{%- block questionnaire_pick_toggle -%}
|
||||
<div class="questionnaire-pick__head {{ head_class|default('') }}">
|
||||
<label for="{{ form.picked.vars.id }}"
|
||||
class="{{ html_classes('flex cursor-pointer select-none items-center gap-x-3 rounded-md px-3 py-1.5 text-sm ring-1 ring-inset transition-colors hover:bg-gray-100 has-[:checked]:bg-primary/10 has-[:checked]:ring-primary', { 'ring-red-700': errors|length, 'ring-gray-200': not errors|length }) }}">
|
||||
class="{{ html_classes('flex cursor-pointer select-none items-center gap-x-3 rounded-md px-3 py-1.5 text-sm ring-1 ring-inset transition-colors hover:bg-page has-[:checked]:bg-brand-light has-[:checked]:ring-brand', { 'ring-red-700': errors|length, 'ring-line': not errors|length }) }}">
|
||||
{{- form_widget(form.picked) -}}
|
||||
<span class="text-gray-900">{{ form.picked.vars.label }}</span>
|
||||
<span class="text-ink">{{ form.picked.vars.label }}</span>
|
||||
</label>
|
||||
{{- form_errors(form) -}}
|
||||
</div>
|
||||
@@ -359,7 +359,7 @@
|
||||
{%- block questionnaire_pick_number -%}
|
||||
<label class="flex items-center gap-x-2">
|
||||
<span class="w-20">{{- form_widget(child) -}}</span>
|
||||
<span class="{{ html_classes({ 'text-red-700': child.vars.errors|length, 'text-gray-700': not child.vars.errors|length }) }}">{{ child.vars.label }}</span>
|
||||
<span class="{{ html_classes({ 'text-red-700': child.vars.errors|length, 'text-muted': not child.vars.errors|length }) }}">{{ child.vars.label }}</span>
|
||||
</label>
|
||||
{%- endblock questionnaire_pick_number -%}
|
||||
|
||||
@@ -376,7 +376,7 @@
|
||||
{%- for child in form -%}
|
||||
<label class="cursor-pointer">
|
||||
<input type="checkbox" id="{{ child.vars.id }}" name="{{ child.vars.full_name }}" value="{{ child.vars.value }}" class="peer sr-only"{% if child.vars.checked %} checked="checked"{% endif %}>
|
||||
<span class="{{ html_classes('flex items-center rounded-md px-2 py-1 text-xs ring-1 ring-inset peer-checked:bg-primary peer-checked:text-white peer-checked:ring-primary peer-focus-visible:ring-2', { 'ring-red-700 text-red-700': errors|length, 'ring-gray-300 text-gray-900': not errors|length }) }}">
|
||||
<span class="{{ html_classes('flex items-center rounded-md px-2 py-1 text-xs ring-1 ring-inset peer-checked:bg-brand peer-checked:text-white peer-checked:ring-brand peer-focus-visible:outline-3 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-brand-bright', { 'ring-red-700 text-red-700': errors|length, 'ring-slate-500 text-ink': not errors|length }) }}">
|
||||
{{- child.vars.label -}}
|
||||
</span>
|
||||
</label>
|
||||
@@ -391,7 +391,7 @@
|
||||
{{- form_row(child) -}}
|
||||
{%- endfor -%}
|
||||
{%- if form is empty -%}
|
||||
<p class="text-sm text-gray-500">Für diese Reise sind keine Teamer:innen eingeteilt.</p>
|
||||
<p class="text-sm text-muted">Für diese Reise sind keine Teamer:innen eingeteilt.</p>
|
||||
{%- endif -%}
|
||||
</div>
|
||||
{%- endblock teamer_guidings_widget -%}
|
||||
|
||||
Reference in new issue
Block a user