Skip to content

Commit 9c23d5c

Browse files
😶‍🌫️ Totalement masquer la légende en mobile (#1558)
* Fully hide legend on mobile * Fix legend * wip * wip
1 parent 04f1a0a commit 9c23d5c

File tree

5 files changed

+17
-11
lines changed

5 files changed

+17
-11
lines changed

.secrets.baseline

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@
178178
"filename": "jinja2/layout/base.html",
179179
"hashed_secret": "057dece35d736a3ae1e710a9cba3f080bd101cde",
180180
"is_verified": false,
181-
"line_number": 62
181+
"line_number": 65
182182
}
183183
],
184184
"unit_tests/qfdmo/test_views.py": [
@@ -191,5 +191,5 @@
191191
}
192192
]
193193
},
194-
"generated_at": "2025-04-23T10:12:59Z"
194+
"generated_at": "2025-04-24T11:22:55Z"
195195
}

jinja2/layout/base.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
lang="fr"
44
class="qf-scroll-smooth"
55
{% if not is_carte %}data-formulaire{% endif %}
6+
{% if carte_config and carte_config.hide_legend %}
7+
data-legend-hidden
8+
{% endif %}
69
>
710
<head>
811
<meta charset="utf-8">

jinja2/qfdmo/carte/header.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
>
1515
{% include 'qfdmo/_addresses_partials/adresse_input_form.html' %}
1616

17+
{% if not carte_config or not carte_config.hide_legend %}
1718
<div class="lg:qf-hidden fr-mt-1w qf-flex qf-justify-between">
1819
<button
1920
class="fr-btn fr-btn--sm fr-btn--tertiary"
@@ -26,7 +27,6 @@
2627
</button>
2728
<div class="qf-flex qf-flex-row-reverse">
2829
{% if form.legend_grouped_action|length > 1 %}
29-
{% if carte_config and not carte_config.hide_legend %}
3030
<button
3131
class="fr-btn fr-btn--sm fr-btn--secondary fr-ml-1w fr-btn--icon-left fr-icon-eye-line"
3232
type="button"
@@ -36,7 +36,6 @@
3636
Légende
3737
</button>
3838
{% endif %}
39-
{% endif %}
4039
<button
4140
class="fr-btn fr-btn--sm fr-btn--secondary fr-ml-1w fr-btn--icon-left fr-icon-equalizer-line"
4241
type="button"
@@ -47,4 +46,5 @@
4746
</button>
4847
</div>
4948
</div>
49+
{% endif %}
5050
</div>

jinja2/qfdmo/carte/panels/legend.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% if carte_config and not carte_config.hide_legend %}
1+
{% if not carte_config or not carte_config.hide_legend %}
22
<aside
33
data-testid="carte-legend"
44
class="

static/to_compile/entrypoints/qfdmo.css

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
@tailwind components;
99
@tailwind utilities;
1010

11-
1211
pre {
1312
font-family: Marianne, arial, sans-serif;
1413
font-weight: 500;
@@ -86,12 +85,16 @@ Style the autocomplete container:
8685
}
8786

8887
:root {
89-
--footer-height: 0;
90-
--sidebar-width: 0;
91-
--header-height: 120px;
88+
--footer-height: 0;
89+
--sidebar-width: 0;
90+
--header-height: 120px;
91+
}
92+
93+
:root[data-legend-hidden] {
94+
--header-height: 0;
9295
}
9396

9497
:root[data-formulaire] {
95-
--footer-height: 100px;
96-
--header-height: 135px;
98+
--footer-height: 100px;
99+
--header-height: 135px;
97100
}

0 commit comments

Comments
 (0)