From e346f103e12effa6288fbbf27b9a1572dbed47c2 Mon Sep 17 00:00:00 2001 From: Valentin Date: Mon, 25 Nov 2024 22:02:41 +0100 Subject: [PATCH] =?UTF-8?q?largeur=20de=20la=20liste=20=C3=A9tapes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/themes/custom/caravane/assets/scss/main.scss | 5 ++++- .../views-view-field--block-1--etape-list.html.twig | 10 +++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/web/themes/custom/caravane/assets/scss/main.scss b/web/themes/custom/caravane/assets/scss/main.scss index db852a1..aa287f4 100644 --- a/web/themes/custom/caravane/assets/scss/main.scss +++ b/web/themes/custom/caravane/assets/scss/main.scss @@ -581,6 +581,9 @@ body{ opacity: 1; display: block; transition: all 0.3s ease-out; + @media screen and (min-width: $desktop-min-width) { + max-width: 30vw; + } &.retracted { opacity: 0; } @@ -635,7 +638,7 @@ body{ font-family: 'Joost', sans-serif; font-weight: lighter; font-size: $m-font-size-mobile; - align-self: end; + align-self: center; @media screen and (min-width: $desktop-min-width) { font-size: $m-font-size-desktop; } diff --git a/web/themes/custom/caravane/templates/views-view-field--block-1--etape-list.html.twig b/web/themes/custom/caravane/templates/views-view-field--block-1--etape-list.html.twig index 285b25b..cd9d67f 100644 --- a/web/themes/custom/caravane/templates/views-view-field--block-1--etape-list.html.twig +++ b/web/themes/custom/caravane/templates/views-view-field--block-1--etape-list.html.twig @@ -20,12 +20,16 @@ * @ingroup themeable */ #} -{% if output|length == 5 +{% if output|length == 5 and output|replace( {'0':'', '1':'', '2':'', '3':'', '4':'', '5':'', '6':'', '7':'', '8':'', '9':''} - ) == '' + ) == '' %}

{{- output|slice(0, 2) -}}

{% else %} -

{{- output -}}

+ {% set split_output = output|split('>') %} +

+ {{- split_output[0]|raw -}}> + {{- split_output[1]|default('')|replace({'-': '‑'})|raw -}}> +

{% endif %}