From 3e212e3cb0de48d5c92b66925548eb1e8f6522c6 Mon Sep 17 00:00:00 2001 From: Bryan Lancien Date: Wed, 1 May 2024 15:54:04 +0100 Subject: [PATCH 1/4] fix wizard by changing list structure --- digiplan/static/js/menu.js | 4 +++ digiplan/static/scss/components/_wizard.scss | 28 +++++++++++------ digiplan/templates/map.html | 33 ++++++++++++++++++-- 3 files changed, 53 insertions(+), 12 deletions(-) diff --git a/digiplan/static/js/menu.js b/digiplan/static/js/menu.js index 4a4a7490..24f99e39 100644 --- a/digiplan/static/js/menu.js +++ b/digiplan/static/js/menu.js @@ -73,10 +73,12 @@ function nextMenuTab() { const tabIndex = parseInt(currentTab.id.slice(6, 7)); const currentStep = `step_${tabIndex}_${menuTabs[tabIndex - 1].name}`; document.getElementById(currentStep).classList.toggle("active"); + document.getElementById(currentStep).removeAttribute('aria-current', 'step'); const nextPanel = `panel_${tabIndex + 1}_${menuTabs[tabIndex].name}`; const nextStep = `step_${tabIndex + 1}_${menuTabs[tabIndex].name}`; document.getElementById(nextPanel).classList.toggle("active"); document.getElementById(nextStep).classList.toggle("active"); + document.getElementById(nextStep).setAttribute('aria-current', 'step'); PubSub.publish(menuTabs[tabIndex].event); toggleMenuButtons(tabIndex); } @@ -87,10 +89,12 @@ function previousMenuTab() { const tabIndex = parseInt(currentTab.id.slice(6, 7)); const currentStep = `step_${tabIndex}_${menuTabs[tabIndex - 1].name}`; document.getElementById(currentStep).classList.toggle("active"); + document.getElementById(currentStep).removeAttribute('aria-current', 'step'); const nextPanel = `panel_${tabIndex - 1}_${menuTabs[tabIndex - 2].name}`; const nextStep = `step_${tabIndex - 1}_${menuTabs[tabIndex - 2].name}`; document.getElementById(nextPanel).classList.toggle("active"); document.getElementById(nextStep).classList.toggle("active"); + document.getElementById(nextStep).setAttribute('aria-current', 'step'); PubSub.publish(menuTabs[tabIndex - 2].event); toggleMenuButtons(tabIndex - 2); } diff --git a/digiplan/static/scss/components/_wizard.scss b/digiplan/static/scss/components/_wizard.scss index 1033da21..c7984de0 100644 --- a/digiplan/static/scss/components/_wizard.scss +++ b/digiplan/static/scss/components/_wizard.scss @@ -41,12 +41,14 @@ } &__main { + @extend .px-3; flex: 1; } &__list { @extend .d-flex; @extend .justify-content-between; + @extend .align-items-center; @extend .p-0; @extend .m-0; @extend .border-0; @@ -91,22 +93,28 @@ } } + &__line { + @extend .w-100; + height: 4px; + background-color: $gray-200; + } + @include media-breakpoint-up(md) { + &__main { + padding-left: 5rem !important; + padding-right: 5rem !important; + max-width: 80rem; + } + .wizard__list { .wizard__list-item { .wizard__list-text { display: block; - font-size: $font-size-small; - } - - &:not(:last-child)::after { - content: ''; position: absolute; - top: 34%; - right: 0; - transform: translate(51%, -50%); - width: 100%; - border-top: 4px solid $gray-200; + top: 2rem; + font-size: $font-size-small; + text-align: center; + white-space: nowrap; } } } diff --git a/digiplan/templates/map.html b/digiplan/templates/map.html index 8ed39d56..2112d50d 100644 --- a/digiplan/templates/map.html +++ b/digiplan/templates/map.html @@ -67,7 +67,36 @@ Zurück -
+ + +
- +