diff --git a/contao/templates/frontend/_survey_assets.html.twig b/contao/templates/frontend/_survey_assets.html.twig index 9cc79de..25d9910 100644 --- a/contao/templates/frontend/_survey_assets.html.twig +++ b/contao/templates/frontend/_survey_assets.html.twig @@ -466,6 +466,29 @@ align-items: center; } + .survey-button-row--navigation { + width: 100%; + justify-content: flex-end; + align-items: center; + margin-top: 1rem; + } + + .survey-button-row--navigation.has-back { + justify-content: space-between; + } + + .survey-navigation-form { + margin: 0; + } + + .survey-navigation-form--back { + margin: 0; + } + + .survey-navigation-submit { + margin-left: auto; + } + .survey-publish-toggle-form { margin: 0; } @@ -843,6 +866,56 @@ color: var(--survey-green); } + .survey-range-block { + gap: 1rem; + } + + .survey-range-value-card { + display: grid; + place-items: center; + gap: 0.2rem; + width: min(100%, 8.5rem); + min-height: 8.5rem; + margin-inline: auto; + padding: 1rem; + border-radius: 50%; + background: radial-gradient(circle at top left, rgba(0, 100, 173, 0.12), rgba(255, 255, 255, 0.96) 62%, rgba(236, 124, 50, 0.16) 100%); + border: 1px solid rgba(0, 100, 173, 0.16); + box-shadow: 0 10px 24px rgba(34, 34, 34, 0.08); + text-align: center; + } + + .survey-range-value-label { + font-size: 0.8rem; + font-weight: 700; + letter-spacing: 0.06em; + text-transform: uppercase; + color: var(--survey-gray-dark); + } + + .survey-range-scale { + display: flex; + justify-content: space-between; + align-items: center; + gap: 1rem; + width: 100%; + } + + .survey-range-boundary { + display: inline-flex; + align-items: center; + justify-content: center; + min-width: 2.75rem; + min-height: 2.75rem; + padding: 0.45rem 0.7rem; + border-radius: 999px; + background: rgba(255, 255, 255, 0.82); + border: 1px solid rgba(0, 100, 173, 0.14); + color: var(--survey-blue); + font-weight: 700; + box-shadow: 0 6px 16px rgba(34, 34, 34, 0.05); + } + @media (min-width: 960px) { .survey-grid-columns { grid-template-columns: 0.95fr 1.05fr; @@ -880,6 +953,10 @@ align-items: flex-start; } + .survey-button-row--navigation.has-back { + justify-content: space-between; + } + .survey-list-publish-help { left: 0; right: auto; diff --git a/contao/templates/frontend/show_survey.html.twig b/contao/templates/frontend/show_survey.html.twig index 43e053a..12219e8 100644 --- a/contao/templates/frontend/show_survey.html.twig +++ b/contao/templates/frontend/show_survey.html.twig @@ -52,20 +52,7 @@
{{ question.description|striptags|trim }}
{% endif %} - {% if canGoBack %} - - {% endif %} - - {{ form_start(surveyForm, {attr: {class: 'survey-form-grid'}}) }} + {{ form_start(surveyForm, {attr: {class: 'survey-form-grid', id: 'survey-answer-form-' ~ question.id}}) }} {% if isPreview %} @@ -89,21 +76,37 @@ {% endfor %} {% elseif question.type == 'range' %} -