burger menu improved

This commit is contained in:
2026-08-24 17:44:15 +02:00
parent b3db746273
commit 9a601b79da
12 changed files with 177 additions and 21 deletions
@@ -0,0 +1,20 @@
uuid: d2e39686-e4ae-46ee-ab94-81edb6da2e16
langcode: fr
status: true
dependencies:
module:
- language
theme:
- leshed
id: leshed_selecteurdelangue
theme: leshed
region: header_right
weight: 0
provider: null
plugin: 'language_block:language_interface'
settings:
id: 'language_block:language_interface'
label: 'Sélecteur de langue'
label_display: '0'
provider: language
visibility: { }
+9
View File
@@ -0,0 +1,9 @@
uuid: ab111706-74d5-452b-994f-053c2d6219d4
langcode: fr
status: true
dependencies: { }
id: en
label: English
direction: ltr
weight: 1
locked: false
+2
View File
@@ -7,6 +7,8 @@ url:
source: path_prefix source: path_prefix
prefixes: prefixes:
fr: '' fr: ''
en: en
domains: domains:
fr: '' fr: ''
en: ''
selected_langcode: site_default selected_langcode: site_default
@@ -0,0 +1 @@
label: English
@@ -0,0 +1,5 @@
label: 'Node view'
description: 'When enabled, this overrides the default Drupal behavior for displaying nodes at <em>/node/{node}</em>. If you add variants, you may use selection criteria such as node type or language or user access to provide different views of nodes. If no variant is selected, the default Drupal node view will be used. This page only affects nodes viewed as pages, it will not affect nodes viewed in lists or at other locations.'
parameters:
node:
label: Node
@@ -0,0 +1 @@
label: 'Delete redirect'
@@ -0,0 +1,71 @@
label: Redirect
description: 'List of redirects'
display:
default:
display_title: Master
display_options:
exposed_form:
options:
submit_button: Filter
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
sort_asc_label: Asc
sort_desc_label: Desc
pager:
options:
tags:
previous: ' previous'
next: 'next '
first: '« first'
last: 'last »'
expose:
items_per_page_label: 'Items per page'
items_per_page_options_all_label: '- All -'
offset_label: Offset
fields:
redirect_bulk_form:
action_title: 'With selection'
redirect_source__path:
label: From
separator: ', '
enabled:
label: Enabled
separator: ', '
created:
label: Created
filters:
redirect_source__path:
expose:
label: From
redirect_redirect__uri:
expose:
label: To
status_code:
expose:
label: 'Status code'
group_info:
label: 'Status code'
group_items:
1:
title: '300 Multiple Choices'
2:
title: '301 Moved Permanently'
3:
title: '302 Found'
4:
title: '303 See Other'
5:
title: '304 Not Modified'
6:
title: '305 Use Proxy'
7:
title: '307 Temporary Redirect'
language:
expose:
label: 'Original language'
title: Redirect
empty:
area_text_custom:
content: 'There is no redirect yet.'
page_1:
display_title: Page
+14 -1
View File
@@ -8,7 +8,20 @@ menus:
description: null description: null
enabled: true enabled: true
expanded: false expanded: false
weight: 0 weight: -50
langcode: fr langcode: fr
uuid: 75910d9e-f8a0-4dbd-930f-e37fb47de597 uuid: 75910d9e-f8a0-4dbd-930f-e37fb47de597
options: { } options: { }
-
menu_name: main
title: 'À propos'
parent: null
uri: 'entity:node/605'
link_title: ''
description: null
enabled: true
expanded: false
weight: -49
langcode: fr
uuid: 4077ca97-8030-4b12-a10a-f1ddd903c720
options: { }
+1 -1
View File
@@ -170,7 +170,7 @@ display:
path: archives path: archives
menu: menu:
type: normal type: normal
title: archives title: Archives
description: '' description: ''
weight: -48 weight: -48
expanded: false expanded: false
+45 -19
View File
@@ -43,7 +43,7 @@ div.layout-container{
flex-direction: column; flex-direction: column;
height: 100vh; height: 100vh;
overflow: hidden; overflow: hidden;
max-width:1080px; max-width:$layout_width;
margin: 0 auto; margin: 0 auto;
header[role="banner"]{ header[role="banner"]{
display: block; display: block;
@@ -146,39 +146,65 @@ header[role="banner"]{
&>div.wrapper{ &>div.wrapper{
position:absolute; // fixed (et non absolute) pour échapper à l'overflow:hidden de
top:$header_height; left:0; // .layout-container : sinon le débord pleine largeur (et donc le
// z-index: 99; // backdrop-filter) est rogné aux bords du conteneur centré.
background-color: rgba(0,0,0,0.75); position:fixed;
top:$header_height;
left: 0;
width:100vw; width:100vw;
padding: 0 calc((100vw - $layout_width) / 2) 0 calc((100vw - $layout_width) / 2);
background-color: rgba(255,255,255,0.3);
backdrop-filter: blur(7px);
height: 0; height: 0;
overflow: hidden; overflow: hidden;
transition-duration: 0.5s; transition-duration: 0.5s;
&[opened]{ &[opened]{
height: calc(100vh - $header_height); height: calc(100vh - $header_height);
} }
&>nav{ nav#block-leshed-navigationprincipale{
// width: $layout_width;
// margin: 0 auto;
padding-top: 10px; padding-top: 10px;
background-color: #fff; // background-color: #fff;
>ul{ >ul{
margin: 0; margin: 0;
padding:0;
li{
list-style: none;
a{
font-size: 4em;
font-weight: 200;
filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 5px #fff) drop-shadow(0 0 15px #fff);
}
}
} }
} }
div#block-leshed-selecteurdelangue{
nav#block-mathallo-navigationprincipale{
padding: 2em 1em;
ul{ ul{
display: flex; margin:0;
justify-content: flex-end; padding:0;
list-style: none;
li{ li{
margin-right: 1em; list-style: none;
// background-color: $bleu_site; padding:0;
color: #fff; display: inline-block;
padding:0.5em 1em; font-size: 2em;
&:not(:last-child){ &:first-child{
&:after{
content: " /";
font-weight: 200;
}
} }
&:last-child{
padding-left: 0.3em;
}
&.is-active{
font-weight: 400;
}
} }
} }
} }
@@ -1,3 +1,4 @@
$layout_width: 1080px;
$default_fwght: 200; $default_fwght: 200;
$header_height: 70px; $header_height: 70px;
$colsgap: 2em; $colsgap: 2em;
+7
View File
@@ -112,3 +112,10 @@ function leshed_preprocess_field(&$variables) {
} }
$variables['attributes']['class'][] = $variables['field_name']; $variables['attributes']['class'][] = $variables['field_name'];
} }
function leshed_preprocess_links__language_block(&$variables){
foreach ($variables['links'] as $langcode => $link) {
$variables['links'][$langcode]['text'] = $langcode;
$variables['links'][$langcode]['link']['#title'] = $langcode;
}
}