Compare commits
61
Commits
stge
..
ee51632b85
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ee51632b85 | ||
|
|
04a47789f7 | ||
|
|
ff4fabba70 | ||
|
|
fa2352b00f | ||
|
|
6fe9fe1a54 | ||
|
|
4e8fe4fb2d | ||
|
|
ad9c0349c7 | ||
|
|
b266b73176 | ||
|
|
b1d2acd246 | ||
|
|
1f0f540268 | ||
|
|
5edb071b35 | ||
|
|
1f377f9b60 | ||
|
|
446a8f2288 | ||
|
|
53b935bd07 | ||
|
|
c53e9461dd | ||
|
|
8a8ecbb3e4 | ||
|
|
cbc0053467 | ||
|
|
02231b8e17 | ||
|
|
811e6b5ca8 | ||
|
|
fa8e32bef9 | ||
|
|
ebabc21095 | ||
|
|
2b03838407 | ||
|
|
863f248656 | ||
|
|
66fe1c4adf | ||
|
|
30b82fd22b | ||
|
|
0b2ba2e1fd | ||
|
|
ee2f83324c | ||
|
|
50de82d79c | ||
|
|
3eb54aae88 | ||
|
|
c3874cfee6 | ||
|
|
1e02cc5587 | ||
|
|
d58970f7d7 | ||
|
|
bdeacad925 | ||
|
|
ecb40418aa | ||
|
|
dc661c6139 | ||
|
|
3641c9feff | ||
|
|
45d6f1ba04 | ||
|
|
b68b573e94 | ||
|
|
7251762137 | ||
|
|
fb590bfee2 | ||
|
|
eab3cabde3 | ||
|
|
c0ccf25959 | ||
|
|
a85122bbc7 | ||
|
|
21e92aee1d | ||
|
|
a26f9140ce | ||
|
|
c94ec553eb | ||
|
|
7ba0a0ec05 | ||
|
|
e3a31427d3 | ||
|
|
7a8abd9b5e | ||
|
|
fd8584a9a6 | ||
|
|
2cb4716015 | ||
|
|
2666e046a9 | ||
|
|
d947fa7aab | ||
|
|
15778d737d | ||
|
|
9c873c3b67 | ||
|
|
d7026f45e7 | ||
|
|
6272ac893c | ||
|
|
fabad3ca5b | ||
|
|
6715b83031 | ||
|
|
c5748a9a30 | ||
|
|
3bfcc5e288 |
@@ -0,0 +1,17 @@
|
||||
uuid: 480abc89-4c77-4260-a432-043c122cc0de
|
||||
langcode: fr
|
||||
status: true
|
||||
dependencies: { }
|
||||
id: intro_ressources
|
||||
label: 'Intro ressources'
|
||||
token: true
|
||||
context:
|
||||
show_warning: true
|
||||
group:
|
||||
language: true
|
||||
fallback:
|
||||
language: ''
|
||||
menu:
|
||||
path: /edit/ressources
|
||||
weight: 0
|
||||
description: ''
|
||||
@@ -0,0 +1,24 @@
|
||||
uuid: dcde5806-938b-46b8-80f5-ce7e8b065dfc
|
||||
langcode: fr
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- config_pages.type.intro_ressources
|
||||
- field.field.config_pages.intro_ressources.field_intro
|
||||
module:
|
||||
- text
|
||||
id: config_pages.intro_ressources.default
|
||||
targetEntityType: config_pages
|
||||
bundle: intro_ressources
|
||||
mode: default
|
||||
content:
|
||||
field_intro:
|
||||
type: text_textarea
|
||||
weight: 0
|
||||
region: content
|
||||
settings:
|
||||
rows: 5
|
||||
placeholder: ''
|
||||
third_party_settings: { }
|
||||
hidden:
|
||||
label: true
|
||||
@@ -10,6 +10,7 @@ dependencies:
|
||||
- field.field.node.ressource.field_images
|
||||
- field.field.node.ressource.field_liens
|
||||
- field.field.node.ressource.field_mots_clefs
|
||||
- field.field.node.ressource.field_poid
|
||||
- field.field.node.ressource.field_site
|
||||
- field.field.node.ressource.field_sous_titre
|
||||
- field.field.node.ressource.field_tous_les_sites
|
||||
@@ -34,6 +35,7 @@ third_party_settings:
|
||||
- field_author
|
||||
- field_type_de_ressource
|
||||
- field_mots_clefs
|
||||
- field_poid
|
||||
- status
|
||||
- promote
|
||||
- path
|
||||
@@ -183,6 +185,13 @@ content:
|
||||
size: 60
|
||||
placeholder: ''
|
||||
third_party_settings: { }
|
||||
field_poid:
|
||||
type: number
|
||||
weight: 41
|
||||
region: content
|
||||
settings:
|
||||
placeholder: ''
|
||||
third_party_settings: { }
|
||||
field_site:
|
||||
type: entity_reference_autocomplete
|
||||
weight: 45
|
||||
@@ -222,20 +231,20 @@ content:
|
||||
third_party_settings: { }
|
||||
path:
|
||||
type: path
|
||||
weight: 43
|
||||
weight: 44
|
||||
region: content
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
promote:
|
||||
type: boolean_checkbox
|
||||
weight: 42
|
||||
weight: 43
|
||||
region: content
|
||||
settings:
|
||||
display_label: true
|
||||
third_party_settings: { }
|
||||
status:
|
||||
type: boolean_checkbox
|
||||
weight: 41
|
||||
weight: 42
|
||||
region: content
|
||||
settings:
|
||||
display_label: true
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
uuid: d7ddf5cc-556b-4b0e-9b4d-be805337b385
|
||||
langcode: fr
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- config_pages.type.intro_ressources
|
||||
- field.field.config_pages.intro_ressources.field_intro
|
||||
module:
|
||||
- text
|
||||
id: config_pages.intro_ressources.default
|
||||
targetEntityType: config_pages
|
||||
bundle: intro_ressources
|
||||
mode: default
|
||||
content:
|
||||
field_intro:
|
||||
type: text_default
|
||||
label: visually_hidden
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
weight: 0
|
||||
region: content
|
||||
hidden:
|
||||
search_api_excerpt: true
|
||||
@@ -10,6 +10,7 @@ dependencies:
|
||||
- field.field.node.ressource.field_images
|
||||
- field.field.node.ressource.field_liens
|
||||
- field.field.node.ressource.field_mots_clefs
|
||||
- field.field.node.ressource.field_poid
|
||||
- field.field.node.ressource.field_site
|
||||
- field.field.node.ressource.field_sous_titre
|
||||
- field.field.node.ressource.field_tous_les_sites
|
||||
@@ -93,6 +94,15 @@ content:
|
||||
third_party_settings: { }
|
||||
weight: 103
|
||||
region: content
|
||||
field_poid:
|
||||
type: number_integer
|
||||
label: above
|
||||
settings:
|
||||
thousand_separator: ''
|
||||
prefix_suffix: true
|
||||
third_party_settings: { }
|
||||
weight: 108
|
||||
region: content
|
||||
field_site:
|
||||
type: entity_reference_label
|
||||
label: visually_hidden
|
||||
|
||||
@@ -11,6 +11,7 @@ dependencies:
|
||||
- field.field.node.ressource.field_images
|
||||
- field.field.node.ressource.field_liens
|
||||
- field.field.node.ressource.field_mots_clefs
|
||||
- field.field.node.ressource.field_poid
|
||||
- field.field.node.ressource.field_site
|
||||
- field.field.node.ressource.field_sous_titre
|
||||
- field.field.node.ressource.field_tous_les_sites
|
||||
@@ -79,6 +80,7 @@ hidden:
|
||||
field_date_ressource: true
|
||||
field_documents: true
|
||||
field_mots_clefs: true
|
||||
field_poid: true
|
||||
field_sous_titre: true
|
||||
field_tous_les_sites: true
|
||||
field_type_de_ressource: true
|
||||
|
||||
@@ -11,6 +11,7 @@ dependencies:
|
||||
- field.field.node.ressource.field_images
|
||||
- field.field.node.ressource.field_liens
|
||||
- field.field.node.ressource.field_mots_clefs
|
||||
- field.field.node.ressource.field_poid
|
||||
- field.field.node.ressource.field_site
|
||||
- field.field.node.ressource.field_sous_titre
|
||||
- field.field.node.ressource.field_tous_les_sites
|
||||
@@ -67,11 +68,11 @@ content:
|
||||
label: visually_hidden
|
||||
settings:
|
||||
deltas: '0'
|
||||
image_style: wide
|
||||
deltas_reversed: false
|
||||
image_link: content
|
||||
image_style: wide
|
||||
image_loading:
|
||||
attribute: lazy
|
||||
deltas_reversed: 0
|
||||
third_party_settings: { }
|
||||
weight: 0
|
||||
region: content
|
||||
@@ -122,6 +123,7 @@ content:
|
||||
region: content
|
||||
hidden:
|
||||
created: true
|
||||
field_poid: true
|
||||
field_tous_les_sites: true
|
||||
field_type_de_ressource: true
|
||||
field_video: true
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
uuid: 8b9c2799-90e2-4409-93fd-a087cf0b33d3
|
||||
langcode: fr
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- config_pages.type.intro_ressources
|
||||
- field.storage.config_pages.field_intro
|
||||
- filter.format.wysiwyg
|
||||
module:
|
||||
- text
|
||||
id: config_pages.intro_ressources.field_intro
|
||||
field_name: field_intro
|
||||
entity_type: config_pages
|
||||
bundle: intro_ressources
|
||||
label: Intro
|
||||
description: ''
|
||||
required: false
|
||||
translatable: false
|
||||
default_value: { }
|
||||
default_value_callback: ''
|
||||
settings:
|
||||
allowed_formats:
|
||||
- wysiwyg
|
||||
field_type: text_long
|
||||
@@ -0,0 +1,25 @@
|
||||
uuid: 9f3c0cbe-5562-4660-b4bc-fc9787491962
|
||||
langcode: fr
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- field.storage.node.field_poid
|
||||
- node.type.ressource
|
||||
id: node.ressource.field_poid
|
||||
field_name: field_poid
|
||||
entity_type: node
|
||||
bundle: ressource
|
||||
label: Poid
|
||||
description: ''
|
||||
required: false
|
||||
translatable: false
|
||||
default_value:
|
||||
-
|
||||
value: 0
|
||||
default_value_callback: ''
|
||||
settings:
|
||||
min: -20
|
||||
max: 20
|
||||
prefix: ''
|
||||
suffix: ''
|
||||
field_type: integer
|
||||
@@ -290,7 +290,7 @@ variant_settings:
|
||||
css_styles: ''
|
||||
0e71ab04-a5cc-4eca-a7c2-a18fc9d0b7e1:
|
||||
id: 'entity_field:node:field_projets_lie'
|
||||
label: 'Les projets sélectionnés'
|
||||
label: 'Projets finalistes'
|
||||
label_display: visible
|
||||
provider: ctools_block
|
||||
context_mapping:
|
||||
|
||||
@@ -104,3 +104,212 @@ blocks:
|
||||
height: '444'
|
||||
caption: null
|
||||
caption_format: null
|
||||
menus:
|
||||
-
|
||||
menu_name: admin
|
||||
title: 'Intro ressources'
|
||||
parent: system.admin_content
|
||||
uri: 'internal:/edit/ressources'
|
||||
link_title: ''
|
||||
description: null
|
||||
enabled: true
|
||||
expanded: false
|
||||
weight: 0
|
||||
langcode: fr
|
||||
uuid: e28fb66f-21c1-42d3-9d85-ee19e1a28d14
|
||||
options:
|
||||
attributes:
|
||||
class:
|
||||
- ''
|
||||
-
|
||||
menu_name: entete
|
||||
title: Partenaires
|
||||
parent: null
|
||||
uri: 'internal:/partenaires'
|
||||
link_title: ''
|
||||
description: null
|
||||
enabled: true
|
||||
expanded: false
|
||||
weight: -46
|
||||
langcode: fr
|
||||
uuid: 608ba43c-1931-4ee1-9b6c-bc3637f2a0dc
|
||||
options:
|
||||
attributes:
|
||||
class:
|
||||
- ''
|
||||
-
|
||||
menu_name: entete
|
||||
title: Contacts
|
||||
parent: null
|
||||
uri: 'entity:node/2'
|
||||
link_title: ''
|
||||
description: null
|
||||
enabled: true
|
||||
expanded: false
|
||||
weight: -45
|
||||
langcode: fr
|
||||
uuid: efdff74d-685c-4f20-8e16-4351cd4f929c
|
||||
options:
|
||||
attributes:
|
||||
class:
|
||||
- ''
|
||||
-
|
||||
menu_name: entete
|
||||
title: 'Mentions légales'
|
||||
parent: null
|
||||
uri: 'entity:node/1'
|
||||
link_title: ''
|
||||
description: null
|
||||
enabled: false
|
||||
expanded: false
|
||||
weight: -44
|
||||
langcode: fr
|
||||
uuid: 1b21428d-c068-48b3-8cb6-ba3c1113bb59
|
||||
options:
|
||||
attributes:
|
||||
class:
|
||||
- ''
|
||||
-
|
||||
menu_name: entete
|
||||
title: Présentation
|
||||
parent: null
|
||||
uri: 'entity:node/6'
|
||||
link_title: ''
|
||||
description: null
|
||||
enabled: false
|
||||
expanded: false
|
||||
weight: -50
|
||||
langcode: fr
|
||||
uuid: a833cd74-00fa-46a0-950b-aedc100c908f
|
||||
options:
|
||||
attributes:
|
||||
class:
|
||||
- ''
|
||||
-
|
||||
menu_name: entete
|
||||
title: 'La consultation'
|
||||
parent: null
|
||||
uri: 'entity:node/7'
|
||||
link_title: ''
|
||||
description: null
|
||||
enabled: true
|
||||
expanded: true
|
||||
weight: -49
|
||||
langcode: fr
|
||||
uuid: 1415f75a-0c82-4d29-9b67-8f0eff863069
|
||||
options:
|
||||
attributes:
|
||||
class:
|
||||
- ''
|
||||
-
|
||||
menu_name: entete
|
||||
title: 'les 10 Sites'
|
||||
parent: null
|
||||
uri: 'internal:/lessites'
|
||||
link_title: ''
|
||||
description: null
|
||||
enabled: true
|
||||
expanded: false
|
||||
weight: -48
|
||||
langcode: fr
|
||||
uuid: 0c6fa9f3-65f6-403d-a357-6338c532b95e
|
||||
options:
|
||||
attributes:
|
||||
class:
|
||||
- ''
|
||||
-
|
||||
menu_name: entete
|
||||
title: 'Pour candidater'
|
||||
parent: null
|
||||
uri: 'entity:node/44'
|
||||
link_title: ''
|
||||
description: null
|
||||
enabled: false
|
||||
expanded: false
|
||||
weight: -47
|
||||
langcode: fr
|
||||
uuid: e466f110-e5f7-4a38-bd20-b1be732d9179
|
||||
options:
|
||||
attributes:
|
||||
class:
|
||||
- ''
|
||||
-
|
||||
menu_name: entete
|
||||
title: 'Les 30 projets'
|
||||
parent: null
|
||||
uri: 'internal:/lesprojets'
|
||||
link_title: ''
|
||||
description: null
|
||||
enabled: true
|
||||
expanded: true
|
||||
weight: -48
|
||||
langcode: fr
|
||||
uuid: da75c27c-9a00-4f16-980a-10f5467bf0ac
|
||||
options:
|
||||
attributes:
|
||||
class:
|
||||
- ''
|
||||
-
|
||||
menu_name: footer
|
||||
title: 'Mentions légales'
|
||||
parent: null
|
||||
uri: 'entity:node/1'
|
||||
link_title: ''
|
||||
description: null
|
||||
enabled: true
|
||||
expanded: false
|
||||
weight: -46
|
||||
langcode: fr
|
||||
uuid: d95fd71b-4146-4328-b5b5-1e5c66919596
|
||||
options:
|
||||
attributes:
|
||||
class:
|
||||
- ''
|
||||
-
|
||||
menu_name: footer
|
||||
title: Contacts
|
||||
parent: null
|
||||
uri: 'entity:node/2'
|
||||
link_title: ''
|
||||
description: null
|
||||
enabled: true
|
||||
expanded: false
|
||||
weight: -47
|
||||
langcode: fr
|
||||
uuid: 55c4cb76-62cf-4d80-ad13-84481430b74d
|
||||
options:
|
||||
attributes:
|
||||
class:
|
||||
- ''
|
||||
-
|
||||
menu_name: footer
|
||||
title: Accueil
|
||||
parent: null
|
||||
uri: 'internal:/'
|
||||
link_title: ''
|
||||
description: null
|
||||
enabled: true
|
||||
expanded: false
|
||||
weight: -50
|
||||
langcode: fr
|
||||
uuid: c1f56a2d-5e1f-492a-92a5-4902ba4eb343
|
||||
options:
|
||||
attributes:
|
||||
class:
|
||||
- ''
|
||||
-
|
||||
menu_name: footer
|
||||
title: 'La consultation'
|
||||
parent: null
|
||||
uri: 'entity:node/7'
|
||||
link_title: ''
|
||||
description: null
|
||||
enabled: true
|
||||
expanded: false
|
||||
weight: -49
|
||||
langcode: fr
|
||||
uuid: 5e39cdc7-1bf4-4684-869b-87ce57b7dae4
|
||||
options:
|
||||
attributes:
|
||||
class:
|
||||
- ''
|
||||
|
||||
@@ -73,6 +73,7 @@ permissions:
|
||||
- 'edit deroulement config page entity'
|
||||
- 'edit diaporama_home config page entity'
|
||||
- 'edit intro_partenaires config page entity'
|
||||
- 'edit intro_ressources config page entity'
|
||||
- 'execute entity:save_action menu_link_content'
|
||||
- 'execute entity:save_action node'
|
||||
- 'execute entity:save_action taxonomy_term'
|
||||
|
||||
@@ -18,3 +18,4 @@ permissions:
|
||||
- 'view deroulement config page entity'
|
||||
- 'view diaporama_home config page entity'
|
||||
- 'view intro_partenaires config page entity'
|
||||
- 'view intro_ressources config page entity'
|
||||
|
||||
@@ -20,3 +20,4 @@ permissions:
|
||||
- 'view deroulement config page entity'
|
||||
- 'view diaporama_home config page entity'
|
||||
- 'view intro_partenaires config page entity'
|
||||
- 'view intro_ressources config page entity'
|
||||
|
||||
@@ -59,6 +59,7 @@ permissions:
|
||||
- 'edit deroulement config page entity'
|
||||
- 'edit diaporama_home config page entity'
|
||||
- 'edit intro_partenaires config page entity'
|
||||
- 'edit intro_ressources config page entity'
|
||||
- 'execute entity:save_action node'
|
||||
- 'execute node_make_sticky_action node'
|
||||
- 'execute node_make_unsticky_action node'
|
||||
|
||||
@@ -3,6 +3,7 @@ langcode: fr
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- field.storage.node.field_laureats
|
||||
- field.storage.node.field_nom_de_l_equipe
|
||||
- node.type.projet
|
||||
module:
|
||||
@@ -23,8 +24,73 @@ display:
|
||||
display_plugin: default
|
||||
position: 0
|
||||
display_options:
|
||||
title: 'Les autres projets sélectionnés'
|
||||
title: 'Sur le même site de projet'
|
||||
fields:
|
||||
field_laureats:
|
||||
id: field_laureats
|
||||
table: node__field_laureats
|
||||
field: field_laureats
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
plugin_id: field
|
||||
label: ''
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
text: ''
|
||||
make_link: false
|
||||
path: ''
|
||||
absolute: false
|
||||
external: false
|
||||
replace_spaces: false
|
||||
path_case: none
|
||||
trim_whitespace: false
|
||||
alt: ''
|
||||
rel: ''
|
||||
link_class: ''
|
||||
prefix: ''
|
||||
suffix: ''
|
||||
target: ''
|
||||
nl2br: false
|
||||
max_length: 0
|
||||
word_boundary: true
|
||||
ellipsis: true
|
||||
more_link: false
|
||||
more_link_text: ''
|
||||
more_link_path: ''
|
||||
strip_tags: false
|
||||
trim: false
|
||||
preserve_tags: ''
|
||||
html: false
|
||||
element_type: ''
|
||||
element_class: ''
|
||||
element_label_type: ''
|
||||
element_label_class: ''
|
||||
element_label_colon: false
|
||||
element_wrapper_type: ''
|
||||
element_wrapper_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
click_sort_column: value
|
||||
type: boolean
|
||||
settings:
|
||||
format: custom
|
||||
format_custom_false: ''
|
||||
format_custom_true: Lauréat
|
||||
group_column: value
|
||||
group_columns: { }
|
||||
group_rows: true
|
||||
delta_limit: 0
|
||||
delta_offset: 0
|
||||
delta_reversed: false
|
||||
delta_first_last: false
|
||||
multi_type: separator
|
||||
separator: ', '
|
||||
field_api_classes: false
|
||||
title:
|
||||
id: title
|
||||
table: node_field_data
|
||||
@@ -368,6 +434,7 @@ display:
|
||||
- 'user.node_grants:view'
|
||||
- user.permissions
|
||||
tags:
|
||||
- 'config:field.storage.node.field_laureats'
|
||||
- 'config:field.storage.node.field_nom_de_l_equipe'
|
||||
block_1:
|
||||
id: block_1
|
||||
@@ -409,4 +476,5 @@ display:
|
||||
- 'user.node_grants:view'
|
||||
- user.permissions
|
||||
tags:
|
||||
- 'config:field.storage.node.field_laureats'
|
||||
- 'config:field.storage.node.field_nom_de_l_equipe'
|
||||
|
||||
@@ -19,6 +19,8 @@ dependencies:
|
||||
- system.menu.entete
|
||||
- taxonomy.vocabulary.mots_clefs
|
||||
- taxonomy.vocabulary.type_de_ressources
|
||||
content:
|
||||
- 'config_pages:intro_ressources:85c7dc7e-0448-4073-9c7e-58ab7a809374'
|
||||
module:
|
||||
- datetime
|
||||
- formatter_suite
|
||||
@@ -1426,6 +1428,33 @@ display:
|
||||
label: ''
|
||||
field_identifier: ''
|
||||
exposed: false
|
||||
field_poid_value:
|
||||
id: field_poid_value
|
||||
table: node__field_poid
|
||||
field: field_poid_value
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
plugin_id: standard
|
||||
order: ASC
|
||||
expose:
|
||||
label: ''
|
||||
field_identifier: ''
|
||||
exposed: false
|
||||
field_date_ressource_value:
|
||||
id: field_date_ressource_value
|
||||
table: node__field_date_ressource
|
||||
field: field_date_ressource_value
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
plugin_id: datetime
|
||||
order: ASC
|
||||
expose:
|
||||
label: ''
|
||||
field_identifier: ''
|
||||
exposed: false
|
||||
granularity: second
|
||||
arguments: { }
|
||||
filters:
|
||||
status:
|
||||
@@ -1744,7 +1773,20 @@ display:
|
||||
admin_label: 'field_type_de_ressource : Terme de taxonomie'
|
||||
plugin_id: standard
|
||||
required: true
|
||||
header: { }
|
||||
header:
|
||||
entity_config_pages:
|
||||
id: entity_config_pages
|
||||
table: views
|
||||
field: entity_config_pages
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
plugin_id: entity
|
||||
empty: false
|
||||
target: 85c7dc7e-0448-4073-9c7e-58ab7a809374
|
||||
view_mode: default
|
||||
tokenize: true
|
||||
bypass_access: false
|
||||
footer: { }
|
||||
display_extenders: { }
|
||||
cache_metadata:
|
||||
|
||||
@@ -494,6 +494,19 @@ display:
|
||||
options: { }
|
||||
empty: { }
|
||||
sorts:
|
||||
field_poid_value:
|
||||
id: field_poid_value
|
||||
table: node__field_poid
|
||||
field: field_poid_value
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
plugin_id: standard
|
||||
order: ASC
|
||||
expose:
|
||||
label: ''
|
||||
field_identifier: ''
|
||||
exposed: false
|
||||
created:
|
||||
id: created
|
||||
table: node_field_data
|
||||
@@ -510,19 +523,6 @@ display:
|
||||
field_identifier: ''
|
||||
exposed: false
|
||||
granularity: second
|
||||
field_poid_value:
|
||||
id: field_poid_value
|
||||
table: node__field_poid
|
||||
field: field_poid_value
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
plugin_id: standard
|
||||
order: DESC
|
||||
expose:
|
||||
label: ''
|
||||
field_identifier: ''
|
||||
exposed: false
|
||||
arguments: { }
|
||||
filters:
|
||||
status:
|
||||
|
||||
@@ -18,18 +18,19 @@
|
||||
@media (max-width: 810px) {
|
||||
#sites-map-container {
|
||||
width: 80%;
|
||||
|
||||
}
|
||||
}
|
||||
@media (max-width: 530px) {
|
||||
#sites-map-container {
|
||||
width: 100%;
|
||||
height: 485px;
|
||||
height:396px;
|
||||
}
|
||||
}
|
||||
@media (max-width: 400px) {
|
||||
#sites-map-container {
|
||||
width: 100%;
|
||||
height: 430px;
|
||||
|
||||
}
|
||||
}
|
||||
#sites-map-container .site-link:hover {
|
||||
|
||||
@@ -10,6 +10,8 @@ const isLessitesPage = document.querySelector('div#lessites') !== null;
|
||||
const isNodeTypeSitePage = document.body.classList.contains('node-type-site');
|
||||
const isCandidaturePage = document.querySelector('main#pour_candidater') !== null;
|
||||
const isNodeTypeProjetPage = document.body.classList.contains('node-type-projet');
|
||||
const isNodeTypeRessourcePage = document.body.classList.contains('node-type-ressource');
|
||||
|
||||
|
||||
// Identifier le cercle de la page courante pour node-type-site
|
||||
let currentPageCircle = null;
|
||||
@@ -51,6 +53,29 @@ if (isNodeTypeProjetPage && svgElement) {
|
||||
}
|
||||
}
|
||||
|
||||
// Identifier le cercle du SITE lié quand on est sur une page node-type-ressource
|
||||
if (isNodeTypeRessourcePage && svgElement) {
|
||||
// On récupère le nom du site dans le bloc "Site(s)"
|
||||
const siteField = document.querySelector('.field_field_site');
|
||||
if (siteField && siteField.children[1]) {
|
||||
// children[0] = label "Site(s)", children[1] = wrapper du nom
|
||||
const siteName = siteField.children[1].textContent.trim(); // ex : "Corbeil-Essonnes, quartier des Tarterêts"
|
||||
|
||||
// On cherche le cercle dont le data-content contient ce nom
|
||||
const correspondingCircle = Array.from(svgElement.querySelectorAll('circle.site-link')).find(circle => {
|
||||
const content = circle.getAttribute('data-content') || '';
|
||||
return content.includes(siteName);
|
||||
});
|
||||
|
||||
if (correspondingCircle) {
|
||||
currentPageCircle = correspondingCircle;
|
||||
currentPageCircle.setAttribute('fill', 'red'); // Met en rouge le cercle du site lié
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Fonction pour afficher le popup
|
||||
function showPopup(content) {
|
||||
@@ -138,25 +163,58 @@ svgElement.addEventListener('mouseout', function(event) {
|
||||
});
|
||||
|
||||
|
||||
// Gérer les clics pour la page node-type-site uniquement
|
||||
svgElement.addEventListener('click', function(event) {
|
||||
if (isNodeTypeSitePage) {
|
||||
if (event.target.classList.contains('site-link')) {
|
||||
const targetUrl = event.target.getAttribute('data-url');
|
||||
if (targetUrl) {
|
||||
window.location.href = targetUrl; // Redirige vers le data-url correspondant
|
||||
}
|
||||
|
||||
// Gérer les clics sur les cercles de la carte
|
||||
if (svgElement) {
|
||||
svgElement.addEventListener('click', function(event) {
|
||||
const target = event.target;
|
||||
|
||||
if (!target.classList || !target.classList.contains('site-link')) {
|
||||
return;
|
||||
}
|
||||
|
||||
// On récupère les URLs
|
||||
const missionUrl = target.getAttribute('data-mission-photo-url');
|
||||
const fallbackUrl = target.getAttribute('data-url');
|
||||
|
||||
// 1) Page RESSOURCE : priorité à la mission photo
|
||||
if (isNodeTypeRessourcePage) {
|
||||
event.preventDefault(); // empêche le <a href="..."> d'agir
|
||||
|
||||
if (missionUrl) {
|
||||
window.location.href = missionUrl; // Aller directement à la mission photo
|
||||
} else if (fallbackUrl) {
|
||||
window.location.href = fallbackUrl; // Sinon, on garde le comportement actuel
|
||||
}
|
||||
}
|
||||
if (isNodeTypeProjetPage) {
|
||||
if (event.target.classList.contains('site-link')) {
|
||||
const targetUrl = event.target.getAttribute('data-url');
|
||||
if (targetUrl) {
|
||||
window.location.href = targetUrl; // Redirige vers le data-url correspondant
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// 2) Page SITE : comportement actuel
|
||||
if (isNodeTypeSitePage) {
|
||||
if (fallbackUrl) {
|
||||
event.preventDefault();
|
||||
window.location.href = fallbackUrl;
|
||||
}
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// 3) Page PROJET : comportement actuel
|
||||
if (isNodeTypeProjetPage) {
|
||||
if (fallbackUrl) {
|
||||
event.preventDefault();
|
||||
window.location.href = fallbackUrl;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// 4) Autres pages : si tu veux un comportement par défaut
|
||||
// if (fallbackUrl) {
|
||||
// event.preventDefault();
|
||||
// window.location.href = fallbackUrl;
|
||||
// }
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// Fonction pour gérer l'agrandissement de views-row au survol des cercles
|
||||
if (isLessitesPage) {
|
||||
|
||||
@@ -34,6 +34,34 @@ class GaleriePhotoMap extends BlockBase {
|
||||
$vp_w = 600;
|
||||
$vp_h = 600;
|
||||
|
||||
// Charger toutes les ressources de type "Mission photo" (type de ressource = 17)
|
||||
$all_mission_photos = \Drupal::entityTypeManager()
|
||||
->getStorage('node')
|
||||
->loadByProperties([
|
||||
'type' => 'ressource', // adapte si ton type machine est différent
|
||||
'status' => 1,
|
||||
'field_type_de_ressource' => 17, // même ID que dans la query de la vue
|
||||
]);
|
||||
|
||||
// Indexer les missions photo par ID de site
|
||||
$mission_by_site = [];
|
||||
|
||||
foreach ($all_mission_photos as $mission) {
|
||||
if (!$mission->hasField('field_site') || $mission->get('field_site')->isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Un même node peut être lié à plusieurs sites : on en prend un par site
|
||||
foreach ($mission->get('field_site') as $ref) {
|
||||
$site_id = $ref->target_id;
|
||||
|
||||
if (!isset($mission_by_site[$site_id])) {
|
||||
$mission_by_site[$site_id] = $mission;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Coordonnées géographiques des coins de la carte (France)
|
||||
$latTop = 52.0; // Nord-Ouest (coin supérieur gauche)
|
||||
$lonLeft = -6.0;
|
||||
@@ -60,6 +88,24 @@ class GaleriePhotoMap extends BlockBase {
|
||||
// $subtitle = $site->get('field_sous_titre')->getString();
|
||||
$subtitle = $site->hasTranslation($language) ? $site->getTranslation($language)->get('field_sous_titre')->getString() : $site->get('field_sous_titre')->getString();
|
||||
|
||||
// URL directe de la mission photo liée à ce site (si trouvée)
|
||||
$mission_photo_url = '';
|
||||
|
||||
if (isset($mission_by_site[$site->id()])) {
|
||||
$mission_node = $mission_by_site[$site->id()];
|
||||
|
||||
// Respecter la langue courante si traduction existe
|
||||
if ($mission_node->hasTranslation($language)) {
|
||||
$mission_node = $mission_node->getTranslation($language);
|
||||
}
|
||||
|
||||
$mission_photo_url = $mission_node->toUrl('canonical', [
|
||||
'absolute' => TRUE,
|
||||
'language' => \Drupal::languageManager()->getLanguage($langcode),
|
||||
])->toString();
|
||||
}
|
||||
|
||||
|
||||
$link_options = ['absolute' => TRUE, 'attributes' => ['class' => 'ressource-link'], 'language' => \Drupal::languageManager()->getLanguage($langcode)]; // Passer 'absolute' à TRUE
|
||||
// $site_url = $site->toUrl('canonical', $link_options)->toString(); // URL absolue pour le data-url
|
||||
$site_link_object = Link::createFromRoute(t("Voir le site"), 'entity.node.canonical', ['node' => $site->id()], $link_options);
|
||||
@@ -93,6 +139,7 @@ class GaleriePhotoMap extends BlockBase {
|
||||
class="site-link"
|
||||
data-content="$datacontent"
|
||||
data-url="$url"
|
||||
data-mission-photo-url="$mission_photo_url"
|
||||
cx="0" cy="0" r="$r"
|
||||
style="fill-opacity:1;fill-rule:nonzero;" />
|
||||
<path
|
||||
|
||||
+906
-534
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
+468
-287
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="14.947381"
|
||||
height="18.174984"
|
||||
viewBox="0 0 4.497851 5.4690765"
|
||||
version="1.1"
|
||||
id="svg1"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<defs
|
||||
id="defs1" />
|
||||
<g
|
||||
id="layer1"
|
||||
transform="translate(-102.76452,-145.67101)">
|
||||
<path
|
||||
d="m 107.0214,148.83607 -1.86476,1.82265 v -4.84236 a 0.14436835,0.14436835 0 1 0 -0.28873,0 v 4.84236 l -1.86476,-1.82265 a 0.14436835,0.14436835 0 0 0 -0.19851,0 0.1503837,0.1503837 0 0 0 0,0.20452 l 2.10537,2.06326 a 0.1624144,0.1624144 0 0 0 0.20452,0 l 2.10538,-2.06326 a 0.14436835,0.14436835 0 0 0 0,-0.20452 0.14436835,0.14436835 0 0 0 -0.19851,0 z"
|
||||
id="path2-2"
|
||||
style="fill:#ffffff;stroke-width:0.0601533" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 872 B |
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="14.947379"
|
||||
height="18.174984"
|
||||
viewBox="0 0 4.4978504 5.4690765"
|
||||
version="1.1"
|
||||
id="svg1"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<defs
|
||||
id="defs1" />
|
||||
<g
|
||||
id="layer1"
|
||||
transform="translate(-102.76452,-145.67101)">
|
||||
<path
|
||||
d="m 103.00549,147.97502 1.86476,-1.82265 v 4.84236 a 0.14436835,0.14436835 0 1 0 0.28873,0 v -4.84236 l 1.86476,1.82265 a 0.14436835,0.14436835 0 0 0 0.19851,0 0.1503837,0.1503837 0 0 0 0,-0.20452 l -2.10537,-2.06326 a 0.1624144,0.1624144 0 0 0 -0.20452,0 l -2.10538,2.06326 a 0.14436835,0.14436835 0 0 0 0,0.20452 0.14436835,0.14436835 0 0 0 0.19851,0 z"
|
||||
id="path2-2"
|
||||
style="fill:#ffffff;stroke-width:0.0601533" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 872 B |
@@ -5,41 +5,10 @@
|
||||
version="1.1"
|
||||
id="svg1"
|
||||
width="1801.0212"
|
||||
height="4029.4231"
|
||||
viewBox="0 0 1801.0212 4029.4232"
|
||||
sodipodi:docname="formes-animees.svg"
|
||||
inkscape:version="1.4 (e7c3feb100, 2024-10-09)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
height="4008.7539"
|
||||
viewBox="0 0 1801.0212 4008.754"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<sodipodi:namedview
|
||||
id="namedview1"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:zoom="0.22209622"
|
||||
inkscape:cx="900.51061"
|
||||
inkscape:cy="1339.5095"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1016"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="36"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="g2">
|
||||
<inkscape:page
|
||||
x="0"
|
||||
y="0"
|
||||
width="1801.0212"
|
||||
height="4029.4231"
|
||||
id="page2"
|
||||
margin="0"
|
||||
bleed="0" />
|
||||
</sodipodi:namedview>
|
||||
<defs
|
||||
id="defs1">
|
||||
<clipPath
|
||||
@@ -72,21 +41,15 @@
|
||||
transform="translate(-299.16899,-2519.6031)">
|
||||
<g
|
||||
id="g1"
|
||||
transform="translate(0.17944336,-2.9196463)"
|
||||
inkscape:export-filename="formes-animees.svg"
|
||||
inkscape:export-xdpi="300"
|
||||
inkscape:export-ydpi="300">
|
||||
transform="translate(0.17944336,-2.9196463)">
|
||||
<path
|
||||
id="path256"
|
||||
d="m 321.27266,3436.1817 182.91889,175.8201"
|
||||
style="fill:none;stroke:#0833c2;stroke-width:64.3111;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
inkscape:export-filename="formes-animees.svg"
|
||||
inkscape:export-xdpi="300"
|
||||
inkscape:export-ydpi="300" />
|
||||
style="fill:none;stroke:#0833c2;stroke-width:64.3111;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
id="path256-3"
|
||||
d="m 1852.1683,6336.9184 -163.0856,194.3583"
|
||||
style="fill:none;stroke:#0833c2;stroke-width:64.3111;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
style="fill:none;stroke:none;stroke-width:64.3111;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
id="path257"
|
||||
d="M 0,0 C -205.098,0 -371.361,-166.265 -371.361,-371.362"
|
||||
@@ -102,7 +65,7 @@
|
||||
<path
|
||||
id="path302"
|
||||
d="M 0,0 C 0,126.805 -102.795,229.6 -229.6,229.6"
|
||||
style="fill:none;stroke:#0833c2;stroke-width:85;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
style="fill:none;stroke:none;stroke-width:85;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
transform="matrix(0.82260013,0,0,-0.82260013,2051.1937,5635.4927)"
|
||||
clip-path="url(#clipPath303)" />
|
||||
<path
|
||||
@@ -117,7 +80,7 @@
|
||||
width="1550.348"
|
||||
height="201.3089"
|
||||
x="122.31378"
|
||||
y="-9.4031076e-13" />
|
||||
y="-2.4338836e-20" />
|
||||
<rect
|
||||
style="fill:none;stroke:none;stroke-width:0;paint-order:fill markers stroke"
|
||||
id="rect1"
|
||||
@@ -137,9 +100,6 @@
|
||||
id="rect4"
|
||||
width="1801.0212"
|
||||
height="442.35608"
|
||||
x="1.3299257e-06"
|
||||
y="7.8992786"
|
||||
inkscape:export-filename="formes-animees.svg"
|
||||
inkscape:export-xdpi="300"
|
||||
inkscape:export-ydpi="300" />
|
||||
x="1.1471996e-08"
|
||||
y="7.8992786" />
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 3.7 KiB |
@@ -13,7 +13,8 @@
|
||||
},
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"watch": "webpack --watch"
|
||||
"watch": "webpack --watch",
|
||||
"build": "webpack --mode production"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
a<<?php
|
||||
<?php
|
||||
|
||||
|
||||
use Drupal\Core\Url;
|
||||
|
||||
@@ -0,0 +1,415 @@
|
||||
// // //////// start header ////////////
|
||||
// // document.addEventListener('DOMContentLoaded', function() {
|
||||
|
||||
// // const header = document.querySelector('header[role="banner"]');
|
||||
// // const logo = document.querySelector('#block-quartiers-de-demain-logoquartiersdedemain > div:nth-child(1) > div:nth-child(1) > a:nth-child(1) > svg:nth-child(1)');
|
||||
// // const headerNavContainer = document.querySelector('.header_nav_container');
|
||||
// // const isFirstLoad = !performance.getEntriesByType("navigation")[0].type.includes('back_forward');
|
||||
// // const isTargetPath = window.location.pathname === '/';
|
||||
|
||||
// // // Fonction pour démarrer l'animation du logo SVG
|
||||
// // function startLogoAnimation() {
|
||||
// // logo.classList.add('animated');
|
||||
// // }
|
||||
|
||||
// // // Fonction pour arrêter l'animation du logo SVG
|
||||
// // function stopLogoAnimation() {
|
||||
// // logo.classList.remove('animated');
|
||||
// // }
|
||||
|
||||
// // // Vérifier si le header a la classe header--collapse
|
||||
// // function checkHeaderCollapse() {
|
||||
// // if (header.classList.contains('header--collapsed')) {
|
||||
// // stopLogoAnimation();
|
||||
// // } else if (header.classList.contains('header--collapsed-already')) {
|
||||
// // stopLogoAnimation();
|
||||
// // } else {
|
||||
// // startLogoAnimation();
|
||||
// // }
|
||||
|
||||
// // }
|
||||
|
||||
|
||||
|
||||
// // // Appeler la fonction au chargement initial
|
||||
// // checkHeaderCollapse();
|
||||
|
||||
// // // Observer les changements de classe sur le header
|
||||
// // const observer = new MutationObserver(function(mutations) {
|
||||
// // mutations.forEach(function(mutation) {
|
||||
// // if (mutation.attributeName === 'class') {
|
||||
// // checkHeaderCollapse();
|
||||
// // }
|
||||
// // });
|
||||
// // });
|
||||
// // observer.observe(header, { attributes: true });
|
||||
|
||||
|
||||
// // // Si ce n'est pas la première charge ou si le chemin n'est pas le chemin cible, ajouter la classe immédiatement
|
||||
// // if (!isFirstLoad || !isTargetPath) {
|
||||
// // header.classList.add('header--collapsed-already');
|
||||
// // stopLogoAnimation();
|
||||
// // } else {
|
||||
// // // Sinon, appliquer la transition après un délai, sauf si scroll
|
||||
// // let collapseTimeout = setTimeout(() => {
|
||||
// // header.classList.add('header--collapsed');
|
||||
// // }, 1000);
|
||||
|
||||
// // function interruptCollapseOnScroll() {
|
||||
// // if (!header.classList.contains('header--collapsed')) {
|
||||
// // clearTimeout(collapseTimeout); // annule l'animation
|
||||
// // header.classList.add('header--collapsed');
|
||||
// // }
|
||||
// // window.removeEventListener('scroll', interruptCollapseOnScroll); // une seule fois
|
||||
// // }
|
||||
|
||||
// // window.addEventListener('scroll', interruptCollapseOnScroll);
|
||||
// // }
|
||||
// // //////////////////////////////////////
|
||||
|
||||
// // let lastScrollTop = 0;
|
||||
// // let threshold = 100; // Change this value as needed
|
||||
// // let isHidden = false;
|
||||
|
||||
// // function slideOut() {
|
||||
// // headerNavContainer.animate([
|
||||
// // { transform: 'translateX(0)' },
|
||||
// // { transform: 'translateX(-100%)' }
|
||||
// // ], {
|
||||
// // duration: 300,
|
||||
// // fill: 'forwards'
|
||||
// // });
|
||||
// // isHidden = true;
|
||||
// // }
|
||||
|
||||
// // function slideIn() {
|
||||
// // headerNavContainer.animate([
|
||||
// // { transform: 'translateX(-100%)' },
|
||||
// // { transform: 'translateX(0)' }
|
||||
// // ], {
|
||||
// // duration: 300,
|
||||
// // fill: 'forwards'
|
||||
// // });
|
||||
// // isHidden = false;
|
||||
// // }
|
||||
|
||||
// // function slideDown() {
|
||||
// // // headerNavContainer.style.display = 'block';
|
||||
// // headerNavContainer.animate([
|
||||
// // { transform: 'translateY(0%)' },
|
||||
// // { transform: 'translateY(+100%)' }
|
||||
// // ], {
|
||||
// // duration: 300,
|
||||
// // fill: 'forwards'
|
||||
// // });
|
||||
// // isHidden = false;
|
||||
// // }
|
||||
|
||||
// // function slideUp() {
|
||||
// // headerNavContainer.animate([
|
||||
// // { transform: 'translateY(100%)' },
|
||||
// // { transform: 'translateY(0%)' }
|
||||
// // ], {
|
||||
// // duration: 300,
|
||||
// // fill: 'forwards'
|
||||
// // }).onfinish = function() {
|
||||
// // // headerNavContainer.style.display = 'none';
|
||||
// // };
|
||||
// // isHidden = true;
|
||||
// // }
|
||||
// // // Fonction pour ajuster la hauteur du header lors du défilement
|
||||
// // function adjustHeaderHeight() {
|
||||
// // if (window.scrollY > 0) {
|
||||
// // header.classList.add('shrink');
|
||||
// // } else {
|
||||
// // header.classList.remove('shrink');
|
||||
// // }
|
||||
// // }
|
||||
|
||||
// // function handleScroll() {
|
||||
// // let scrollTop = window.pageYOffset || document.documentElement.scrollTop;
|
||||
// // const isMobile = window.innerWidth < 811;
|
||||
|
||||
// // if (scrollTop > threshold && !isHidden) {
|
||||
// // if (isMobile) {
|
||||
// // slideUp();
|
||||
// // } else {
|
||||
// // slideOut();
|
||||
// // }
|
||||
// // } else if (scrollTop <= threshold && isHidden) {
|
||||
// // if (isMobile) {
|
||||
// // slideDown();
|
||||
// // } else {
|
||||
// // slideIn();
|
||||
// // }
|
||||
// // }
|
||||
|
||||
|
||||
// // lastScrollTop = scrollTop <= 0 ? 0 : scrollTop; // For Mobile or negative scrolling
|
||||
// // }
|
||||
|
||||
// // function handleTouchAndMouseEnter() {
|
||||
// // if (isHidden) {
|
||||
// // if (window.innerWidth < 811) {
|
||||
// // slideDown();
|
||||
// // } else {
|
||||
// // slideIn();
|
||||
// // }
|
||||
// // }
|
||||
// // }
|
||||
|
||||
// // function handleTouchAndMouseLeave() {
|
||||
// // if (lastScrollTop > threshold && !isHidden) {
|
||||
// // if (window.innerWidth < 811) {
|
||||
// // slideUp();
|
||||
// // } else {
|
||||
// // slideOut();
|
||||
// // }
|
||||
// // }
|
||||
// // }
|
||||
|
||||
// // window.addEventListener('scroll', handleScroll);
|
||||
// // window.addEventListener('scroll', adjustHeaderHeight);
|
||||
|
||||
// // // Mouse events for desktop
|
||||
// // header.addEventListener('mouseenter', handleTouchAndMouseEnter);
|
||||
// // header.addEventListener('mouseleave', handleTouchAndMouseLeave);
|
||||
|
||||
// // // Touch events for tablets and mobile devices
|
||||
// // header.addEventListener('touchstart', handleTouchAndMouseEnter);
|
||||
// // header.addEventListener('touchend', handleTouchAndMouseLeave);
|
||||
|
||||
// // // Initial check to see if we're at the top of the page
|
||||
// // if (window.pageYOffset <= threshold) {
|
||||
// // if (window.innerWidth < 811) {
|
||||
// // slideDown();
|
||||
// // } else {
|
||||
// // slideIn();
|
||||
// // }
|
||||
// // } else {
|
||||
// // if (window.innerWidth < 811) {
|
||||
// // slideUp();
|
||||
// // } else {
|
||||
// // slideIn();
|
||||
// // }
|
||||
// // }
|
||||
|
||||
// // });
|
||||
|
||||
// // //////// end header ////////////
|
||||
|
||||
|
||||
|
||||
///////////////start header sans animation logo////////////////
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
|
||||
const header = document.querySelector('header[role="banner"]');
|
||||
const logo = document.querySelector('#block-quartiers-de-demain-logoquartiersdedemain svg');
|
||||
const headerNavContainer = document.querySelector('.header_nav_container');
|
||||
|
||||
const navEntry = performance.getEntriesByType("navigation")[0];
|
||||
const isFirstLoad = !navEntry.type.includes('back_forward');
|
||||
const isTargetPath = window.location.pathname === '/';
|
||||
const isMobile = window.innerWidth < 811; // 🔹 breakpoint mobile
|
||||
|
||||
const threshold = 100;
|
||||
let lastScrollTop = 0;
|
||||
let isHidden = false;
|
||||
let introDone = false; // ✅ on saura quand l'intro est finie
|
||||
|
||||
// 🔹 On cache la nav au tout début (pour éviter toute secousse)
|
||||
if (headerNavContainer) {
|
||||
headerNavContainer.style.visibility = 'hidden';
|
||||
}
|
||||
|
||||
/* -------------------
|
||||
Animations nav
|
||||
------------------- */
|
||||
|
||||
function slideOut() {
|
||||
headerNavContainer.animate([
|
||||
{ transform: 'translateX(0)' },
|
||||
{ transform: 'translateX(-100%)' }
|
||||
], {
|
||||
duration: 300,
|
||||
fill: 'forwards'
|
||||
});
|
||||
isHidden = true;
|
||||
}
|
||||
|
||||
function slideIn() {
|
||||
headerNavContainer.animate([
|
||||
{ transform: 'translateX(-100%)' },
|
||||
{ transform: 'translateX(0)' }
|
||||
], {
|
||||
duration: 300,
|
||||
fill: 'forwards'
|
||||
});
|
||||
isHidden = false;
|
||||
}
|
||||
|
||||
function slideDown() {
|
||||
headerNavContainer.animate([
|
||||
{ transform: 'translateY(0%)' },
|
||||
{ transform: 'translateY(+100%)' }
|
||||
], {
|
||||
duration: 300,
|
||||
fill: 'forwards'
|
||||
});
|
||||
isHidden = false;
|
||||
}
|
||||
|
||||
function slideUp() {
|
||||
headerNavContainer.animate([
|
||||
{ transform: 'translateY(100%)' },
|
||||
{ transform: 'translateY(0%)' }
|
||||
], {
|
||||
duration: 300,
|
||||
fill: 'forwards'
|
||||
}).onfinish = function() {};
|
||||
isHidden = true;
|
||||
}
|
||||
|
||||
// ✅ Position initiale de la nav,
|
||||
// appelée UNIQUEMENT après la fin de l'intro
|
||||
function initNavPosition() {
|
||||
if (window.pageYOffset <= threshold) {
|
||||
if (window.innerWidth < 811) {
|
||||
slideDown();
|
||||
} else {
|
||||
slideIn();
|
||||
}
|
||||
} else {
|
||||
if (window.innerWidth < 811) {
|
||||
slideUp();
|
||||
} else {
|
||||
slideIn();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------
|
||||
Scroll / resize header
|
||||
------------------- */
|
||||
|
||||
function adjustHeaderHeight() {
|
||||
if (window.scrollY > 0) {
|
||||
header.classList.add('shrink');
|
||||
} else {
|
||||
header.classList.remove('shrink');
|
||||
}
|
||||
}
|
||||
|
||||
function handleScroll() {
|
||||
if (!introDone) return; // ⛔ rien tant que l'intro n'est pas finie
|
||||
|
||||
let scrollTop = window.pageYOffset || document.documentElement.scrollTop;
|
||||
const isMobile = window.innerWidth < 811;
|
||||
|
||||
if (scrollTop > threshold && !isHidden) {
|
||||
if (isMobile) {
|
||||
slideUp();
|
||||
} else {
|
||||
slideOut();
|
||||
}
|
||||
} else if (scrollTop <= threshold && isHidden) {
|
||||
if (isMobile) {
|
||||
slideDown();
|
||||
} else {
|
||||
slideIn();
|
||||
}
|
||||
}
|
||||
|
||||
lastScrollTop = scrollTop <= 0 ? 0 : scrollTop;
|
||||
}
|
||||
|
||||
function handleTouchAndMouseEnter() {
|
||||
if (!introDone) return; // ⛔ pas de hover avant la fin de l'intro
|
||||
|
||||
if (isHidden) {
|
||||
if (window.innerWidth < 811) {
|
||||
slideDown();
|
||||
} else {
|
||||
slideIn();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function handleTouchAndMouseLeave() {
|
||||
if (!introDone) return;
|
||||
|
||||
if (lastScrollTop > threshold && !isHidden) {
|
||||
if (window.innerWidth < 811) {
|
||||
slideUp();
|
||||
} else {
|
||||
slideOut();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
window.addEventListener('scroll', handleScroll);
|
||||
window.addEventListener('scroll', adjustHeaderHeight);
|
||||
|
||||
header.addEventListener('mouseenter', handleTouchAndMouseEnter);
|
||||
header.addEventListener('mouseleave', handleTouchAndMouseLeave);
|
||||
|
||||
header.addEventListener('touchstart', handleTouchAndMouseEnter);
|
||||
header.addEventListener('touchend', handleTouchAndMouseLeave);
|
||||
|
||||
/* -------------------
|
||||
Intro du logo
|
||||
------------------- */
|
||||
|
||||
if (isFirstLoad && isTargetPath && logo && !isMobile) {
|
||||
// On bloque le scroll
|
||||
document.body.classList.add('logo-intro-animating');
|
||||
|
||||
// 1) Logo plein écran SANS ANIMATION + header figé
|
||||
logo.style.transition = 'none';
|
||||
header.style.transition = 'none';
|
||||
document.body.classList.add('logo-intro-active'); // logo centré, scale(2)
|
||||
|
||||
void logo.offsetWidth; // reflow
|
||||
|
||||
const INTRO_DELAY = 1000; // temps où le logo reste plein écran
|
||||
const TRANSITION_DURATION = 1000; // durée de l'anim de collapse
|
||||
|
||||
// 2) Après ce délai : on réactive les transitions et on lance l'anim
|
||||
setTimeout(() => {
|
||||
logo.style.transition = '';
|
||||
header.style.transition = '';
|
||||
|
||||
header.classList.add('header--collapsed'); // header se rétracte
|
||||
document.body.classList.remove('logo-intro-active'); // logo retourne dans le header
|
||||
|
||||
// 3) Quand le header + logo ont fini de bouger :
|
||||
setTimeout(() => {
|
||||
document.body.classList.remove('logo-intro-animating');
|
||||
introDone = true;
|
||||
|
||||
// 👉 maintenant seulement on affiche la nav et on la fait glisser
|
||||
if (headerNavContainer) {
|
||||
headerNavContainer.style.visibility = 'visible';
|
||||
}
|
||||
initNavPosition();
|
||||
|
||||
}, TRANSITION_DURATION + 100);
|
||||
|
||||
}, INTRO_DELAY);
|
||||
|
||||
} else {
|
||||
// 🔹 CAS MOBILE OU PAS HOME / PAS 1re LOAD :
|
||||
// pas d'intro : header direct réduit, nav directement dispo
|
||||
|
||||
header.classList.add('header--collapsed-already');
|
||||
introDone = true;
|
||||
if (headerNavContainer) {
|
||||
headerNavContainer.style.visibility = 'visible';
|
||||
}
|
||||
initNavPosition();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
///////////////end header sans animation logo////////////////
|
||||
@@ -0,0 +1,126 @@
|
||||
|
||||
//////////////// start lightbox galerie image page site////////////////////////
|
||||
// Sélection des images à ouvrir dans la lightbox
|
||||
let images = document.querySelectorAll('.paragraph--type--site-diapo .lightbox-trigger, .paragraph--type--projet-diapo .lightbox-trigger, .field_field_images .lightbox-trigger');
|
||||
let currentIndex;
|
||||
|
||||
// Création de la lightbox
|
||||
const lightbox = document.createElement('div');
|
||||
lightbox.id = 'lightbox';
|
||||
lightbox.classList.add('lightbox');
|
||||
document.body.appendChild(lightbox);
|
||||
|
||||
// Image affichée dans la lightbox
|
||||
const img = document.createElement('img');
|
||||
img.classList.add('lightbox-content');
|
||||
lightbox.appendChild(img);
|
||||
|
||||
// Légende
|
||||
const caption = document.createElement('p');
|
||||
caption.classList.add('caption');
|
||||
lightbox.appendChild(caption);
|
||||
|
||||
// Bouton de fermeture
|
||||
const closeBtn = document.createElement('span');
|
||||
closeBtn.classList.add('close');
|
||||
closeBtn.innerHTML = '×';
|
||||
lightbox.appendChild(closeBtn);
|
||||
|
||||
// Bouton précédent avec image
|
||||
const prevBtn = document.createElement('a');
|
||||
prevBtn.classList.add('prev');
|
||||
const prevImg = document.createElement('img');
|
||||
prevImg.src = "/themes/custom/quartiers_de_demain/dist/assets/img/prev-blanc.svg"; // 🔁 adapte ce chemin
|
||||
prevImg.alt = 'Précédent';
|
||||
prevBtn.appendChild(prevImg);
|
||||
lightbox.appendChild(prevBtn);
|
||||
|
||||
// Bouton suivant avec image
|
||||
const nextBtn = document.createElement('a');
|
||||
nextBtn.classList.add('next');
|
||||
const nextImg = document.createElement('img');
|
||||
nextImg.src = '/themes/custom/quartiers_de_demain/dist/assets/img/next-blanc.svg'; // 🔁 adapte ce chemin
|
||||
nextImg.alt = 'Suivant';
|
||||
nextBtn.appendChild(nextImg);
|
||||
lightbox.appendChild(nextBtn);
|
||||
|
||||
// Fonction d'affichage
|
||||
function showImage(index) {
|
||||
if (index < 0) index = images.length - 1;
|
||||
if (index >= images.length) index = 0;
|
||||
currentIndex = index;
|
||||
|
||||
const currentImg = images[currentIndex];
|
||||
|
||||
// 👉 1. Utiliser l'IMAGE ORIGINALE (href du <a>) si possible
|
||||
const parentLink = currentImg.closest('a');
|
||||
if (parentLink && parentLink.getAttribute('href')) {
|
||||
img.src = parentLink.getAttribute('href');
|
||||
} else {
|
||||
img.src = currentImg.getAttribute('src');
|
||||
}
|
||||
|
||||
// 👉 2. Trouver le conteneur qui porte la légende
|
||||
// - Cas 1 : <div><div class="cadre-img-zoom"><img></div><blockquote class="image-field-caption">...</blockquote></div>
|
||||
// - Cas 2 : <div class="images"><a><img></a><blockquote class="image-field-caption">...</blockquote></div>
|
||||
const wrapper =
|
||||
currentImg.closest('.cadre-img-zoom')?.parentElement || // cas 1
|
||||
currentImg.closest('.images'); // cas 2
|
||||
|
||||
let captionText =
|
||||
wrapper?.querySelector('.image-field-caption p')?.textContent ||
|
||||
currentImg.alt || // fallback si pas de blockquote
|
||||
'';
|
||||
|
||||
caption.textContent = captionText;
|
||||
|
||||
lightbox.style.display = 'flex';
|
||||
}
|
||||
|
||||
|
||||
// Clic sur une image
|
||||
images.forEach((image, index) => {
|
||||
image.addEventListener('click', (e) => {
|
||||
e.preventDefault(); // empêche le <a> de s'ouvrir
|
||||
e.stopPropagation(); // empêche des comportements externes
|
||||
showImage(index);
|
||||
});
|
||||
|
||||
// 🔒 Empêche le clic sur le <a> parent d'agir aussi
|
||||
const parentLink = image.closest('a');
|
||||
if (parentLink) {
|
||||
parentLink.addEventListener('click', (e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// Navigation & fermeture
|
||||
closeBtn.addEventListener('click', () => lightbox.style.display = 'none');
|
||||
prevBtn.addEventListener('click', (e) => {
|
||||
e.stopPropagation();
|
||||
showImage(currentIndex - 1);
|
||||
});
|
||||
nextBtn.addEventListener('click', (e) => {
|
||||
e.stopPropagation();
|
||||
showImage(currentIndex + 1);
|
||||
});
|
||||
|
||||
// Clic en dehors de l'image pour fermer
|
||||
lightbox.addEventListener('click', (e) => {
|
||||
if (e.target === lightbox) lightbox.style.display = 'none';
|
||||
});
|
||||
|
||||
// Clavier
|
||||
document.addEventListener('keydown', (e) => {
|
||||
if (lightbox.style.display === 'flex') {
|
||||
if (e.key === 'Escape') lightbox.style.display = 'none';
|
||||
else if (e.key === 'ArrowLeft') showImage(currentIndex - 1);
|
||||
else if (e.key === 'ArrowRight') showImage(currentIndex + 1);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
//////////////// end lightbox galerie image page site////////////////////////
|
||||
@@ -14,212 +14,6 @@
|
||||
} (Drupal));
|
||||
|
||||
|
||||
//////// start header ////////////
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
|
||||
const header = document.querySelector('header[role="banner"]');
|
||||
const logo = document.querySelector('#block-quartiers-de-demain-logoquartiersdedemain > div:nth-child(1) > div:nth-child(1) > a:nth-child(1) > svg:nth-child(1)');
|
||||
const headerNavContainer = document.querySelector('.header_nav_container');
|
||||
const isFirstLoad = !performance.getEntriesByType("navigation")[0].type.includes('back_forward');
|
||||
const isTargetPath = window.location.pathname === '/';
|
||||
|
||||
// Fonction pour démarrer l'animation du logo SVG
|
||||
function startLogoAnimation() {
|
||||
logo.classList.add('animated');
|
||||
}
|
||||
|
||||
// Fonction pour arrêter l'animation du logo SVG
|
||||
function stopLogoAnimation() {
|
||||
logo.classList.remove('animated');
|
||||
}
|
||||
|
||||
// Vérifier si le header a la classe header--collapse
|
||||
function checkHeaderCollapse() {
|
||||
if (header.classList.contains('header--collapsed')) {
|
||||
stopLogoAnimation();
|
||||
} else if (header.classList.contains('header--collapsed-already')) {
|
||||
stopLogoAnimation();
|
||||
} else {
|
||||
startLogoAnimation();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Appeler la fonction au chargement initial
|
||||
checkHeaderCollapse();
|
||||
|
||||
// Observer les changements de classe sur le header
|
||||
const observer = new MutationObserver(function(mutations) {
|
||||
mutations.forEach(function(mutation) {
|
||||
if (mutation.attributeName === 'class') {
|
||||
checkHeaderCollapse();
|
||||
}
|
||||
});
|
||||
});
|
||||
observer.observe(header, { attributes: true });
|
||||
|
||||
|
||||
// Si ce n'est pas la première charge ou si le chemin n'est pas le chemin cible, ajouter la classe immédiatement
|
||||
if (!isFirstLoad || !isTargetPath) {
|
||||
header.classList.add('header--collapsed-already');
|
||||
// logo.classList.remove('animated');
|
||||
stopLogoAnimation();
|
||||
// } else {
|
||||
// // Sinon, appliquer la transition après un délai
|
||||
// setTimeout(() => {
|
||||
// header.classList.add('header--collapsed');
|
||||
// }, 5000);
|
||||
// }
|
||||
} else {
|
||||
// Sinon, appliquer la transition après un délai, sauf si scroll
|
||||
let collapseTimeout = setTimeout(() => {
|
||||
header.classList.add('header--collapsed');
|
||||
}, 5000);
|
||||
|
||||
function interruptCollapseOnScroll() {
|
||||
if (!header.classList.contains('header--collapsed')) {
|
||||
clearTimeout(collapseTimeout); // annule l'animation
|
||||
header.classList.add('header--collapsed');
|
||||
}
|
||||
window.removeEventListener('scroll', interruptCollapseOnScroll); // une seule fois
|
||||
}
|
||||
|
||||
window.addEventListener('scroll', interruptCollapseOnScroll);
|
||||
}
|
||||
//////////////////////////////////////
|
||||
|
||||
let lastScrollTop = 0;
|
||||
let threshold = 100; // Change this value as needed
|
||||
let isHidden = false;
|
||||
|
||||
function slideOut() {
|
||||
headerNavContainer.animate([
|
||||
{ transform: 'translateX(0)' },
|
||||
{ transform: 'translateX(-100%)' }
|
||||
], {
|
||||
duration: 300,
|
||||
fill: 'forwards'
|
||||
});
|
||||
isHidden = true;
|
||||
}
|
||||
|
||||
function slideIn() {
|
||||
headerNavContainer.animate([
|
||||
{ transform: 'translateX(-100%)' },
|
||||
{ transform: 'translateX(0)' }
|
||||
], {
|
||||
duration: 300,
|
||||
fill: 'forwards'
|
||||
});
|
||||
isHidden = false;
|
||||
}
|
||||
|
||||
function slideDown() {
|
||||
// headerNavContainer.style.display = 'block';
|
||||
headerNavContainer.animate([
|
||||
{ transform: 'translateY(0%)' },
|
||||
{ transform: 'translateY(+100%)' }
|
||||
], {
|
||||
duration: 300,
|
||||
fill: 'forwards'
|
||||
});
|
||||
isHidden = false;
|
||||
}
|
||||
|
||||
function slideUp() {
|
||||
headerNavContainer.animate([
|
||||
{ transform: 'translateY(100%)' },
|
||||
{ transform: 'translateY(0%)' }
|
||||
], {
|
||||
duration: 300,
|
||||
fill: 'forwards'
|
||||
}).onfinish = function() {
|
||||
// headerNavContainer.style.display = 'none';
|
||||
};
|
||||
isHidden = true;
|
||||
}
|
||||
// Fonction pour ajuster la hauteur du header lors du défilement
|
||||
function adjustHeaderHeight() {
|
||||
if (window.scrollY > 0) {
|
||||
header.classList.add('shrink');
|
||||
} else {
|
||||
header.classList.remove('shrink');
|
||||
}
|
||||
}
|
||||
|
||||
function handleScroll() {
|
||||
let scrollTop = window.pageYOffset || document.documentElement.scrollTop;
|
||||
const isMobile = window.innerWidth < 811;
|
||||
|
||||
if (scrollTop > threshold && !isHidden) {
|
||||
if (isMobile) {
|
||||
slideUp();
|
||||
} else {
|
||||
slideOut();
|
||||
}
|
||||
} else if (scrollTop <= threshold && isHidden) {
|
||||
if (isMobile) {
|
||||
slideDown();
|
||||
} else {
|
||||
slideIn();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
lastScrollTop = scrollTop <= 0 ? 0 : scrollTop; // For Mobile or negative scrolling
|
||||
}
|
||||
|
||||
function handleTouchAndMouseEnter() {
|
||||
if (isHidden) {
|
||||
if (window.innerWidth < 811) {
|
||||
slideDown();
|
||||
} else {
|
||||
slideIn();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function handleTouchAndMouseLeave() {
|
||||
if (lastScrollTop > threshold && !isHidden) {
|
||||
if (window.innerWidth < 811) {
|
||||
slideUp();
|
||||
} else {
|
||||
slideOut();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
window.addEventListener('scroll', handleScroll);
|
||||
window.addEventListener('scroll', adjustHeaderHeight);
|
||||
|
||||
// Mouse events for desktop
|
||||
header.addEventListener('mouseenter', handleTouchAndMouseEnter);
|
||||
header.addEventListener('mouseleave', handleTouchAndMouseLeave);
|
||||
|
||||
// Touch events for tablets and mobile devices
|
||||
header.addEventListener('touchstart', handleTouchAndMouseEnter);
|
||||
header.addEventListener('touchend', handleTouchAndMouseLeave);
|
||||
|
||||
// Initial check to see if we're at the top of the page
|
||||
if (window.pageYOffset <= threshold) {
|
||||
if (window.innerWidth < 811) {
|
||||
slideDown();
|
||||
} else {
|
||||
slideIn();
|
||||
}
|
||||
} else {
|
||||
if (window.innerWidth < 811) {
|
||||
slideUp();
|
||||
} else {
|
||||
slideIn();
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
//////// end header ////////////
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -295,99 +89,11 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
|
||||
//////////////////////// end script smooth apparition des textes /////////////////
|
||||
|
||||
// //////////////////// start Timeline script ///////////////////////
|
||||
|
||||
// Update month field to only show the first 3 letters
|
||||
document.querySelectorAll('.paragraph--type--phase-deroulement').forEach(function(paragraph) {
|
||||
const monthField = paragraph.querySelector('.field_field_date_de_moi div:nth-of-type(2)');
|
||||
if (monthField) {
|
||||
const monthText = monthField.textContent.trim();
|
||||
if (monthText === "juillet") {
|
||||
monthField.textContent = monthText.slice(0, 4);
|
||||
monthField.classList.add('after');
|
||||
} else if (monthText === "juin") {
|
||||
monthField.textContent = monthText.slice(0, 4);
|
||||
} else if (monthText.length > 3) {
|
||||
monthField.textContent = monthText.slice(0, 3);
|
||||
monthField.classList.add('after');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Fonction pour ajouter ou retirer la classe .only
|
||||
function updateDateClasses() {
|
||||
document.querySelectorAll('.paragraph--type--phase-deroulement .date').forEach(function(dateElement) {
|
||||
const date2Element = dateElement.querySelector('.date2');
|
||||
const yearElement = dateElement.querySelector('.field_field_date_de_annee');
|
||||
|
||||
if (date2Element && !date2Element.textContent.trim()) {
|
||||
if (yearElement) {
|
||||
yearElement.classList.add('only');
|
||||
}
|
||||
} else {
|
||||
if (yearElement) {
|
||||
yearElement.classList.remove('only');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Exécuter la fonction une première fois pour le contenu déjà présent
|
||||
updateDateClasses();
|
||||
|
||||
// MutationObserver pour surveiller les changements dans le DOM
|
||||
const observer = new MutationObserver(function(mutationsList, observer) {
|
||||
for(let mutation of mutationsList) {
|
||||
if (mutation.type === 'childList') {
|
||||
updateDateClasses();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$(document).ready(function(){
|
||||
// ////////////////////// start calendrier home /////////////////////////////////
|
||||
|
||||
// Aller au 9e élément à l'initialisation
|
||||
$('.__timeline-content').on('init', function(event, slick){
|
||||
slick.slickGoTo(11); // Index 8 = 9e item
|
||||
});
|
||||
|
||||
$('.__timeline-content').slick({
|
||||
slidesToShow: 3,
|
||||
slidesToScroll: 1,
|
||||
dots: false,
|
||||
arrows: true,
|
||||
centerMode: false,
|
||||
draggable: true,
|
||||
infinite: false,
|
||||
responsive: [
|
||||
{
|
||||
breakpoint: 810,
|
||||
settings: {
|
||||
slidesToShow: 1,
|
||||
adaptiveHeight: false,
|
||||
arrows: true,
|
||||
draggable: true,
|
||||
centerMode: false,
|
||||
infinite: false,
|
||||
}
|
||||
}]
|
||||
});
|
||||
console.log('salut slick calendrier');
|
||||
|
||||
|
||||
|
||||
//////////////////////// end calendrier home /////////////////////////////////
|
||||
|
||||
|
||||
|
||||
//////////////////////// end Timeline script /////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
//////////// start slideshow images home //////////////////////////
|
||||
|
||||
$(document).ready(function(){
|
||||
let diapohome = $('.config_pages--type--diaporama-home .diaporama');
|
||||
|
||||
if (diapohome.length) {
|
||||
@@ -458,106 +164,6 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
|
||||
|
||||
|
||||
//////////////// start lightbox galerie image page site////////////////////////
|
||||
// Sélection des images à ouvrir dans la lightbox
|
||||
let images = document.querySelectorAll('.paragraph--type--site-diapo .lightbox-trigger, .paragraph--type--projet-diapo .lightbox-trigger, .field_field_images .lightbox-trigger');
|
||||
let currentIndex;
|
||||
|
||||
// Création de la lightbox
|
||||
const lightbox = document.createElement('div');
|
||||
lightbox.id = 'lightbox';
|
||||
lightbox.classList.add('lightbox');
|
||||
document.body.appendChild(lightbox);
|
||||
|
||||
// Image affichée dans la lightbox
|
||||
const img = document.createElement('img');
|
||||
img.classList.add('lightbox-content');
|
||||
lightbox.appendChild(img);
|
||||
|
||||
// Légende
|
||||
const caption = document.createElement('p');
|
||||
caption.classList.add('caption');
|
||||
lightbox.appendChild(caption);
|
||||
|
||||
// Bouton de fermeture
|
||||
const closeBtn = document.createElement('span');
|
||||
closeBtn.classList.add('close');
|
||||
closeBtn.innerHTML = '×';
|
||||
lightbox.appendChild(closeBtn);
|
||||
|
||||
// Bouton précédent avec image
|
||||
const prevBtn = document.createElement('a');
|
||||
prevBtn.classList.add('prev');
|
||||
const prevImg = document.createElement('img');
|
||||
prevImg.src = "/themes/custom/quartiers_de_demain/dist/assets/img/prev-blanc.svg"; // 🔁 adapte ce chemin
|
||||
prevImg.alt = 'Précédent';
|
||||
prevBtn.appendChild(prevImg);
|
||||
lightbox.appendChild(prevBtn);
|
||||
|
||||
// Bouton suivant avec image
|
||||
const nextBtn = document.createElement('a');
|
||||
nextBtn.classList.add('next');
|
||||
const nextImg = document.createElement('img');
|
||||
nextImg.src = '/themes/custom/quartiers_de_demain/dist/assets/img/next-blanc.svg'; // 🔁 adapte ce chemin
|
||||
nextImg.alt = 'Suivant';
|
||||
nextBtn.appendChild(nextImg);
|
||||
lightbox.appendChild(nextBtn);
|
||||
|
||||
// Fonction d'affichage
|
||||
function showImage(index) {
|
||||
if (index < 0) index = images.length - 1;
|
||||
if (index >= images.length) index = 0;
|
||||
currentIndex = index;
|
||||
|
||||
img.src = images[currentIndex].getAttribute('src');
|
||||
|
||||
const captionText = images[currentIndex]
|
||||
.closest('.cadre-img-zoom')
|
||||
?.nextElementSibling?.querySelector('.image-field-caption p')
|
||||
?.textContent || '';
|
||||
|
||||
caption.textContent = captionText;
|
||||
lightbox.style.display = 'flex';
|
||||
}
|
||||
|
||||
// Clic sur une image
|
||||
images.forEach((image, index) => {
|
||||
image.addEventListener('click', (e) => {
|
||||
e.preventDefault(); // empêche le <a> de naviguer
|
||||
e.stopPropagation(); // (optionnel) empêche d'autres handlers de se déclencher
|
||||
showImage(index);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
// Navigation & fermeture
|
||||
closeBtn.addEventListener('click', () => lightbox.style.display = 'none');
|
||||
prevBtn.addEventListener('click', (e) => {
|
||||
e.stopPropagation();
|
||||
showImage(currentIndex - 1);
|
||||
});
|
||||
nextBtn.addEventListener('click', (e) => {
|
||||
e.stopPropagation();
|
||||
showImage(currentIndex + 1);
|
||||
});
|
||||
|
||||
// Clic en dehors de l'image pour fermer
|
||||
lightbox.addEventListener('click', (e) => {
|
||||
if (e.target === lightbox) lightbox.style.display = 'none';
|
||||
});
|
||||
|
||||
// Clavier
|
||||
document.addEventListener('keydown', (e) => {
|
||||
if (lightbox.style.display === 'flex') {
|
||||
if (e.key === 'Escape') lightbox.style.display = 'none';
|
||||
else if (e.key === 'ArrowLeft') showImage(currentIndex - 1);
|
||||
else if (e.key === 'ArrowRight') showImage(currentIndex + 1);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
//////////////// end lightbox galerie image page site////////////////////////
|
||||
|
||||
|
||||
|
||||
//////////////////// start wrapper views-row lessites /////////////////////////
|
||||
@@ -688,6 +294,8 @@ if (documentsLiensWrapper && blockRegionThird) {
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
/////////////////// start langswitcher position responsive//////////////////////
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
// Fonction pour déplacer le bloc en fonction de la taille de l'écran
|
||||
@@ -714,109 +322,7 @@ window.addEventListener("resize", moveLanguageSwitcher);
|
||||
/////////////////// end langswitcher position responsive///////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/////////////// start class à view-rows-ressources ////////
|
||||
$(document).ready(function () {
|
||||
$(".view-rows-wrapper").each(function () {
|
||||
let h3Container = $(this).prev("h3").find("div[class^='type-']");
|
||||
let classToAdd = h3Container.attr("class"); // Récupère la classe complète (ex: "type-Documentation")
|
||||
|
||||
if (classToAdd) {
|
||||
$(this).addClass(classToAdd); // Ajoute cette classe à .view-rows-wrapper
|
||||
}
|
||||
});
|
||||
|
||||
////////////////// end class à view-rows-wrapper ////////////////
|
||||
|
||||
|
||||
|
||||
/////////////////// start voir plus... ressources ////////////////////
|
||||
|
||||
|
||||
// Vérifier si on est sur la page avec l'ID #ressources
|
||||
if ($("#ressources").length > 0) {
|
||||
$(".view-rows-wrapper").each(function () {
|
||||
let container = $(this); // Cible uniquement cette section
|
||||
let items = container.find(".views-row"); // Les éléments à afficher progressivement
|
||||
let visibleCount = 4; // Nombre d'éléments visibles au départ (par défaut)
|
||||
|
||||
// Récupérer la classe `type-XXX`
|
||||
let typeClass = container.attr("class").split(" ").find(cls => cls.startsWith("type-"));
|
||||
let typeName = typeClass ? typeClass.replace("type-", "").replace(/-/g, " ") : "contenu"; // Nettoyer le nom
|
||||
|
||||
// >>> Exception : tout afficher pour type-Galerie-photos (pas de bouton)
|
||||
if (typeClass && typeClass.toLowerCase() === "type-galerie-photos") {
|
||||
items.show(); // aucun masquage
|
||||
return; // on sort : pas de "voir plus"
|
||||
}
|
||||
|
||||
// Ajuster le nombre d'éléments visibles en fonction du type
|
||||
if (typeClass && (typeClass === "type-podcast" || typeClass.toLowerCase() === "type-vidéo")) {
|
||||
visibleCount = 2; // Pour Podcast et Vidéo
|
||||
} else if (typeClass === "type-kit-de-communication") {
|
||||
visibleCount = 1; // Pour Kit de Communication
|
||||
}
|
||||
|
||||
// Si le nombre total d'éléments est inférieur ou égal à la limite, ne pas ajouter le bouton
|
||||
if (items.length <= visibleCount) {
|
||||
return; // Sortir de la boucle
|
||||
}
|
||||
|
||||
// Ajouter le bouton dynamiquement après chaque `.view-rows-wrapper`
|
||||
let button = $("<button>")
|
||||
.addClass("voir-plus")
|
||||
.text("Voir plus de " + typeName)
|
||||
.insertAfter(container);
|
||||
|
||||
// Cacher tous les éléments sauf ceux définis par `visibleCount`
|
||||
items.hide().slice(0, visibleCount).show();
|
||||
|
||||
// Action sur le bouton
|
||||
button.on("click", function () {
|
||||
let hiddenItems = container.find(".views-row:hidden").slice(0, 4); // Prochains éléments à afficher
|
||||
|
||||
if ($(this).text().includes("Voir plus")) {
|
||||
hiddenItems.slideDown(); // Afficher avec un effet de glissement
|
||||
|
||||
if (container.find(".views-row:hidden").length === 0) {
|
||||
$(this).text("Voir moins de " + typeName); // Changer le texte du bouton si tout est affiché
|
||||
}
|
||||
} else {
|
||||
container.find(".views-row").slice(visibleCount).slideUp(); // Replier les éléments
|
||||
$(this).text("Voir plus de " + typeName); // Revenir à l'état initial
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
// slimselect
|
||||
let ressource_type_select = new SlimSelect({
|
||||
select: '#edit-field-type-de-ressource-target-id--2',
|
||||
settings:{
|
||||
placeholderText: 'choisir',
|
||||
searchPlaceholder: 'choisir'
|
||||
}
|
||||
})
|
||||
let ressource_motscles_select = new SlimSelect({
|
||||
select: '#edit-field-mots-clefs-target-id--2',
|
||||
settings:{
|
||||
placeholderText: 'choisir',
|
||||
searchPlaceholder: 'choisir'
|
||||
}
|
||||
})
|
||||
let ressource_sites_select = new SlimSelect({
|
||||
select: '#edit-field-site-target-id-verf--2',
|
||||
settings:{
|
||||
placeholderText: 'choisir',
|
||||
searchPlaceholder: 'choisir'
|
||||
}
|
||||
})
|
||||
// console.log(('sites_select'), sites_select);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/////////////////// end voir plus... ressources ////////////////////
|
||||
|
||||
|
||||
|
||||
/////////////////// start voir plus... actualite dans /actualites & /home ////////////////////
|
||||
@@ -824,23 +330,45 @@ $(document).ready(function () {
|
||||
if ($("#actualites" ).length > 0 || $("#home").length > 0) {
|
||||
$(".node-type-actualite").each(function () {
|
||||
let article = $(this);
|
||||
|
||||
|
||||
let body = article.find(".field_body");
|
||||
let links = article.find(".field_field_liens");
|
||||
|
||||
|
||||
body.hide();
|
||||
links.hide();
|
||||
|
||||
|
||||
let toggleButton = $("<button>")
|
||||
.addClass("toggle-actualite")
|
||||
.insertAfter(article);
|
||||
|
||||
toggleButton.on("click", function () {
|
||||
|
||||
// Fonction de toggle (à utiliser partout)
|
||||
function toggleActu() {
|
||||
body.slideToggle();
|
||||
links.slideToggle();
|
||||
$(this).toggleClass("open");
|
||||
toggleButton.toggleClass("open");
|
||||
}
|
||||
|
||||
// Clic sur le bouton
|
||||
toggleButton.on("click", function (e) {
|
||||
e.stopPropagation();
|
||||
toggleActu();
|
||||
});
|
||||
});
|
||||
|
||||
// Clic sur le node entier sauf liens
|
||||
article.on("click", function (e) {
|
||||
if ($(e.target).closest("a").length) {
|
||||
return;
|
||||
}
|
||||
toggleActu();
|
||||
});
|
||||
|
||||
// 👉 Clic aussi sur le H2
|
||||
article.find("h2").on("click", function (e) {
|
||||
e.stopPropagation();
|
||||
toggleActu();
|
||||
});
|
||||
});
|
||||
|
||||
// slimselect
|
||||
// duplicated due to embeded view (archives)
|
||||
let actu_type_select = new SlimSelect({
|
||||
@@ -876,17 +404,6 @@ $(document).ready(function () {
|
||||
/////////////////// end voir plus... actualite dans /actualites & /home ////////////////////
|
||||
|
||||
|
||||
/////////////// start class à view-rows-ressources ////////
|
||||
|
||||
$(".view-rows-wrapper").each(function () {
|
||||
let h3Container = $(this).prev("h3").find("div[class^='type-']");
|
||||
let classToAdd = h3Container.attr("class"); // Récupère la classe complète (ex: "type-Documentation")
|
||||
|
||||
if (classToAdd) {
|
||||
$(this).addClass(classToAdd); // Ajoute cette classe à .view-rows-wrapper
|
||||
}
|
||||
});
|
||||
////////////////// end class à view-rows-wrapper ////////////////
|
||||
|
||||
//////////////start toggle partenaire //////////////////
|
||||
|
||||
@@ -916,38 +433,82 @@ $(document).ready(function () {
|
||||
|
||||
|
||||
////////////// start toggle page node projet //////////////////
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
|
||||
const photo = document.querySelector('.field_field_equipe_photo');
|
||||
const pres = document.querySelector('.field_field_equipe_presentation');
|
||||
|
||||
if (!pres) return;
|
||||
if (!photo || !pres) return;
|
||||
|
||||
// Création du bouton
|
||||
// 🔒 Forcer l'état FERMÉ au chargement
|
||||
photo.classList.remove('is-open');
|
||||
pres.classList.remove('is-open');
|
||||
|
||||
// 1. Créer un wrapper autour de photo + présentation
|
||||
const panel = document.createElement('div');
|
||||
panel.className = 'equipe-panel';
|
||||
|
||||
// Insérer le panel avant la photo, puis y déplacer photo + pres
|
||||
photo.parentNode.insertBefore(panel, photo);
|
||||
panel.appendChild(photo);
|
||||
panel.appendChild(pres);
|
||||
|
||||
// 2. Préparer le panel pour l'animation
|
||||
panel.style.overflow = 'hidden';
|
||||
panel.style.maxHeight = '0px';
|
||||
|
||||
// 3. Création du bouton
|
||||
const btn = document.createElement('button');
|
||||
btn.className = 'btn-equipe-toggle';
|
||||
btn.textContent = "EN SAVOIR PLUS SUR L'ÉQUIPE";
|
||||
btn.setAttribute('aria-expanded', false);
|
||||
btn.setAttribute('aria-expanded', 'false');
|
||||
|
||||
// Insertion du bouton juste après le bloc présentation
|
||||
pres.insertAdjacentElement('afterend', btn);
|
||||
// Insertion du bouton juste après le panel (et plus après "pres")
|
||||
panel.insertAdjacentElement('afterend', btn);
|
||||
|
||||
// 3. Ajout de la ligne après le bouton
|
||||
const separator = document.createElement('div');
|
||||
separator.className = 'equipe-separator';
|
||||
btn.insertAdjacentElement('afterend', separator);
|
||||
// Ligne de séparation après le bouton
|
||||
const separator = document.createElement('div');
|
||||
separator.className = 'equipe-separator';
|
||||
btn.insertAdjacentElement('afterend', separator);
|
||||
|
||||
// Toggle
|
||||
// --- Fonctions ouverture / fermeture ---
|
||||
|
||||
function openPanel() {
|
||||
panel.classList.add('is-open');
|
||||
photo.classList.add('is-open');
|
||||
pres.classList.add('is-open');
|
||||
|
||||
const fullHeight = panel.scrollHeight; // inclut photo + texte
|
||||
panel.style.maxHeight = fullHeight + 'px';
|
||||
|
||||
btn.textContent = "FERMER LA PRÉSENTATION DE L'ÉQUIPE";
|
||||
btn.setAttribute('aria-expanded', 'true');
|
||||
}
|
||||
|
||||
function closePanel() {
|
||||
const fullHeight = panel.scrollHeight;
|
||||
panel.style.maxHeight = fullHeight + 'px';
|
||||
|
||||
requestAnimationFrame(() => {
|
||||
panel.style.maxHeight = '0px';
|
||||
panel.classList.remove('is-open');
|
||||
photo.classList.remove('is-open');
|
||||
pres.classList.remove('is-open');
|
||||
});
|
||||
|
||||
btn.textContent = "EN SAVOIR PLUS SUR L'ÉQUIPE";
|
||||
btn.setAttribute('aria-expanded', 'false');
|
||||
}
|
||||
|
||||
// --- Toggle bouton ---
|
||||
btn.addEventListener('click', function () {
|
||||
const isOpen = pres.classList.toggle('is-open');
|
||||
|
||||
if (photo) photo.classList.toggle('is-open');
|
||||
|
||||
btn.textContent = isOpen
|
||||
? "FERMER LA PRÉSENTATION DE L'ÉQUIPE"
|
||||
: "EN SAVOIR PLUS SUR L'ÉQUIPE";
|
||||
|
||||
btn.setAttribute('aria-expanded', isOpen);
|
||||
const isOpen = btn.getAttribute('aria-expanded') === 'true';
|
||||
if (isOpen) {
|
||||
closePanel();
|
||||
} else {
|
||||
openPanel();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
@@ -957,6 +518,8 @@ btn.insertAdjacentElement('afterend', separator);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
})(jQuery, window);
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
/**
|
||||
* @file
|
||||
* quartiers_de_demain behaviors.
|
||||
*/
|
||||
(function (Drupal) {
|
||||
|
||||
'use strict';
|
||||
|
||||
Drupal.behaviors.quartiers_de_demain = {
|
||||
attach: function (context, settings) {
|
||||
console.log('It works!');
|
||||
}
|
||||
};
|
||||
} (Drupal));
|
||||
|
||||
|
||||
|
||||
(function($, window) {
|
||||
$(document).ready(function () {
|
||||
/////////////// start class à view-rows-ressources ////////
|
||||
$(".view-rows-wrapper").each(function () {
|
||||
let h3Container = $(this).prev("h3").find("div[class^='type-']");
|
||||
let classToAdd = h3Container.attr("class"); // Récupère la classe complète (ex: "type-Documentation")
|
||||
|
||||
if (classToAdd) {
|
||||
$(this).addClass(classToAdd); // Ajoute cette classe à .view-rows-wrapper
|
||||
}
|
||||
});
|
||||
////////////////// end class à view-rows-wrapper ////////////////
|
||||
|
||||
|
||||
|
||||
|
||||
/////////////////// start voir plus... ressources ////////////////////
|
||||
|
||||
|
||||
// Vérifier si on est sur la page avec l'ID #ressources
|
||||
if ($("#ressources").length > 0) {
|
||||
$(".view-rows-wrapper").each(function () {
|
||||
let container = $(this); // Cible uniquement cette section
|
||||
let items = container.find(".views-row"); // Les éléments à afficher progressivement
|
||||
let visibleCount = 4; // Nombre d'éléments visibles au départ (par défaut)
|
||||
|
||||
// Récupérer la classe `type-XXX`
|
||||
let typeClass = container.attr("class").split(" ").find(cls => cls.startsWith("type-"));
|
||||
let typeName = typeClass ? typeClass.replace("type-", "").replace(/-/g, " ") : "contenu"; // Nettoyer le nom
|
||||
|
||||
// >>> Exception : tout afficher pour type-Galerie-photos (pas de bouton)
|
||||
if (typeClass && typeClass.toLowerCase() === "type-mission-photo") {
|
||||
items.show(); // aucun masquage
|
||||
return; // on sort : pas de "voir plus"
|
||||
}
|
||||
|
||||
// Ajuster le nombre d'éléments visibles en fonction du type
|
||||
if (typeClass && (typeClass === "type-podcast" || typeClass.toLowerCase() === "type-vidéo")) {
|
||||
visibleCount = 2; // Pour Podcast et Vidéo
|
||||
} else if (typeClass === "type-kit-de-communication") {
|
||||
visibleCount = 1; // Pour Kit de Communication
|
||||
}
|
||||
|
||||
// Si le nombre total d'éléments est inférieur ou égal à la limite, ne pas ajouter le bouton
|
||||
if (items.length <= visibleCount) {
|
||||
return; // Sortir de la boucle
|
||||
}
|
||||
|
||||
// Ajouter le bouton dynamiquement après chaque `.view-rows-wrapper`
|
||||
let button = $("<button>")
|
||||
.addClass("voir-plus")
|
||||
.text("Voir plus de " + typeName)
|
||||
.insertAfter(container);
|
||||
|
||||
// Cacher tous les éléments sauf ceux définis par `visibleCount`
|
||||
items.hide().slice(0, visibleCount).show();
|
||||
|
||||
// Action sur le bouton
|
||||
button.on("click", function () {
|
||||
let hiddenItems = container.find(".views-row:hidden").slice(0, 4); // Prochains éléments à afficher
|
||||
|
||||
if ($(this).text().includes("Voir plus")) {
|
||||
hiddenItems.slideDown(); // Afficher avec un effet de glissement
|
||||
|
||||
if (container.find(".views-row:hidden").length === 0) {
|
||||
$(this).text("Voir moins de " + typeName); // Changer le texte du bouton si tout est affiché
|
||||
}
|
||||
} else {
|
||||
container.find(".views-row").slice(visibleCount).slideUp(); // Replier les éléments
|
||||
$(this).text("Voir plus de " + typeName); // Revenir à l'état initial
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
// slimselect
|
||||
let ressource_type_select = new SlimSelect({
|
||||
select: '#edit-field-type-de-ressource-target-id--2',
|
||||
settings:{
|
||||
placeholderText: 'choisir',
|
||||
searchPlaceholder: 'choisir'
|
||||
}
|
||||
})
|
||||
let ressource_motscles_select = new SlimSelect({
|
||||
select: '#edit-field-mots-clefs-target-id--2',
|
||||
settings:{
|
||||
placeholderText: 'choisir',
|
||||
searchPlaceholder: 'choisir'
|
||||
}
|
||||
})
|
||||
let ressource_sites_select = new SlimSelect({
|
||||
select: '#edit-field-site-target-id-verf--2',
|
||||
settings:{
|
||||
placeholderText: 'choisir',
|
||||
searchPlaceholder: 'choisir'
|
||||
}
|
||||
})
|
||||
// console.log(('sites_select'), sites_select);
|
||||
|
||||
}
|
||||
|
||||
/////////////////// end voir plus... ressources ////////////////////
|
||||
|
||||
///////////////////////// start ressource img clicable mission photo //////////////////////
|
||||
$('.view-rows-wrapper.type-Mission-photo .views-row').each(function () {
|
||||
var $row = $(this);
|
||||
|
||||
// Lien cible : d'abord le titre, sinon "Voir la gallerie photo"
|
||||
var $link = $row.find('.views-field-views-conditional-field-1 a, .views-field-views-conditional-field a').first();
|
||||
|
||||
// L'image
|
||||
var $img = $row.find('.views-field-field-images img').first();
|
||||
|
||||
if ($link.length && $img.length && !$img.data('missionPhotoBound')) {
|
||||
console.log('→ Bind click sur image pour', $link.attr('href'));
|
||||
|
||||
$img.css('cursor', 'pointer');
|
||||
$img.on('click', function () {
|
||||
window.location.href = $link.attr('href');
|
||||
});
|
||||
|
||||
// éviter de binder plusieurs fois (si AJAX / re-init)
|
||||
$img.data('missionPhotoBound', true);
|
||||
}
|
||||
});
|
||||
///////////////////////// end ressource img clicable mission photo //////////////////////
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
})(jQuery, window);
|
||||
@@ -0,0 +1,93 @@
|
||||
|
||||
(function($, window) {
|
||||
// //////////////////// start Timeline script ///////////////////////
|
||||
|
||||
// Update month field to only show the first 3 letters
|
||||
document.querySelectorAll('.paragraph--type--phase-deroulement').forEach(function(paragraph) {
|
||||
const monthField = paragraph.querySelector('.field_field_date_de_moi div:nth-of-type(2)');
|
||||
if (monthField) {
|
||||
const monthText = monthField.textContent.trim();
|
||||
if (monthText === "juillet") {
|
||||
monthField.textContent = monthText.slice(0, 4);
|
||||
monthField.classList.add('after');
|
||||
} else if (monthText === "juin") {
|
||||
monthField.textContent = monthText.slice(0, 4);
|
||||
} else if (monthText.length > 3) {
|
||||
monthField.textContent = monthText.slice(0, 3);
|
||||
monthField.classList.add('after');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Fonction pour ajouter ou retirer la classe .only
|
||||
function updateDateClasses() {
|
||||
document.querySelectorAll('.paragraph--type--phase-deroulement .date').forEach(function(dateElement) {
|
||||
const date2Element = dateElement.querySelector('.date2');
|
||||
const yearElement = dateElement.querySelector('.field_field_date_de_annee');
|
||||
|
||||
if (date2Element && !date2Element.textContent.trim()) {
|
||||
if (yearElement) {
|
||||
yearElement.classList.add('only');
|
||||
}
|
||||
} else {
|
||||
if (yearElement) {
|
||||
yearElement.classList.remove('only');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Exécuter la fonction une première fois pour le contenu déjà présent
|
||||
updateDateClasses();
|
||||
|
||||
// MutationObserver pour surveiller les changements dans le DOM
|
||||
const observer = new MutationObserver(function(mutationsList, observer) {
|
||||
for(let mutation of mutationsList) {
|
||||
if (mutation.type === 'childList') {
|
||||
updateDateClasses();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$(document).ready(function(){
|
||||
// ////////////////////// start calendrier home /////////////////////////////////
|
||||
|
||||
// // Aller au 9e élément à l'initialisation
|
||||
// $('.__timeline-content').on('init', function(event, slick){
|
||||
// slick.slickGoTo(11); // Index 8 = 9e item
|
||||
// });
|
||||
|
||||
$('.__timeline-content').slick({
|
||||
slidesToShow: 3,
|
||||
slidesToScroll: 1,
|
||||
dots: false,
|
||||
arrows: true,
|
||||
centerMode: false,
|
||||
draggable: true,
|
||||
infinite: false,
|
||||
initialSlide: 13,
|
||||
responsive: [
|
||||
{
|
||||
breakpoint: 810,
|
||||
settings: {
|
||||
slidesToShow: 1,
|
||||
adaptiveHeight: false,
|
||||
arrows: true,
|
||||
draggable: true,
|
||||
centerMode: false,
|
||||
infinite: false,
|
||||
initialSlide: 13,
|
||||
}
|
||||
}]
|
||||
});
|
||||
console.log('salut slick calendrier');
|
||||
|
||||
});
|
||||
|
||||
//////////////////////// end calendrier home /////////////////////////////////
|
||||
|
||||
|
||||
|
||||
//////////////////////// end Timeline script /////////////////////////////////////////////
|
||||
})(jQuery, window);
|
||||
@@ -64,13 +64,13 @@
|
||||
}
|
||||
.field_body{ ///// texte de présentation
|
||||
// width: 80%;
|
||||
width: 65%;
|
||||
width: 60%;
|
||||
margin: auto;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap ;
|
||||
position: relative;
|
||||
margin-left: 14rem;
|
||||
margin-left: 15rem;
|
||||
@media(max-width: 1090px){
|
||||
flex-direction: column;
|
||||
width: 90%;
|
||||
@@ -130,6 +130,8 @@
|
||||
text-transform: uppercase;
|
||||
font-size: 0.5rem;
|
||||
padding-left: 0.5rem;
|
||||
padding-top: 0.1rem;
|
||||
padding-bottom: 0.1rem;
|
||||
svg{
|
||||
display: none;
|
||||
}
|
||||
@@ -305,6 +307,7 @@
|
||||
|
||||
}
|
||||
.enjeux{
|
||||
display: none !important;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
|
||||
@@ -2,6 +2,9 @@ main{
|
||||
background-color: #f6f7f3;
|
||||
}
|
||||
#lesprojets{
|
||||
#header_right_container{
|
||||
visibility: hidden !important;
|
||||
}
|
||||
.content_container{
|
||||
// background-color: red;
|
||||
display: flex;
|
||||
@@ -56,6 +59,9 @@ main{
|
||||
margin-bottom: 2rem;
|
||||
font-size: 0.4rem;
|
||||
position: relative;
|
||||
@media(max-width: 810px){
|
||||
font-size: 1rem;
|
||||
}
|
||||
transition: transform 0.4s ease-in-out;
|
||||
&:hover {
|
||||
transform: scale(1.05);
|
||||
@@ -166,13 +172,13 @@ main{
|
||||
transition: transform 0.4s ease-in-out; // animation plus fluide
|
||||
&:hover {
|
||||
transform: scale(1.05); /* effet de zoom léger */
|
||||
}
|
||||
}
|
||||
position: relative;
|
||||
&:has(.laureat:not(:empty)){
|
||||
&.is-laureat{
|
||||
z-index: 0;
|
||||
|
||||
}
|
||||
&:has(.laureat:not(:empty))::before {
|
||||
&.is-laureat::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
// display: block;
|
||||
@@ -217,6 +223,9 @@ main{
|
||||
margin-bottom: 0.3rem;
|
||||
margin-top: 0.3rem;
|
||||
font-family: "gilroy-bold";
|
||||
@media(max-width: 810px){
|
||||
font-size: 1rem;
|
||||
}
|
||||
}
|
||||
.field_field_nom_de_l_equipe{
|
||||
order: 4;
|
||||
@@ -224,6 +233,9 @@ main{
|
||||
font-size: 0.5rem;
|
||||
margin: 0;
|
||||
text-transform: uppercase;
|
||||
@media(max-width: 810px){
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
.field_field_intro{
|
||||
|
||||
+172
-79
@@ -44,9 +44,9 @@
|
||||
display: none;
|
||||
}
|
||||
@media(max-width: 810px){
|
||||
width: 50% !important;
|
||||
// width: 50% !important;
|
||||
margin: auto;
|
||||
|
||||
margin-top: 3rem;
|
||||
}
|
||||
}
|
||||
.field_field_site_projet{
|
||||
@@ -54,10 +54,20 @@
|
||||
width: 65%;
|
||||
margin: auto;
|
||||
padding-left: 2rem;
|
||||
@media(max-width: 810px){
|
||||
padding-left: 0rem;
|
||||
width: 80%;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
.field_title{
|
||||
h2{
|
||||
text-transform: none;
|
||||
font-size: 0.60rem;
|
||||
@media(max-width: 810px){
|
||||
font-size:1rem;
|
||||
margin: 0;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
a{
|
||||
color: $blue_QDD;
|
||||
font-weight: 700;
|
||||
@@ -67,6 +77,11 @@
|
||||
.field_field_sous_titre{
|
||||
p{
|
||||
font-size: 0.55rem;
|
||||
@media(max-width: 810px){
|
||||
font-size:0.8rem ;
|
||||
margin: 0;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
.more-link{
|
||||
@@ -76,6 +91,7 @@
|
||||
background: black;
|
||||
@media (max-width:810px) {
|
||||
margin-left: 0;
|
||||
|
||||
}
|
||||
a{
|
||||
display: inline-flex;
|
||||
@@ -85,6 +101,9 @@
|
||||
text-transform: uppercase;
|
||||
font-size: 0.5rem;
|
||||
padding-left: 0.5rem;
|
||||
@media(max-width: 810px){
|
||||
font-size:0.7rem;
|
||||
}
|
||||
|
||||
svg{
|
||||
display: none;
|
||||
@@ -123,12 +142,11 @@
|
||||
flex-direction: column;
|
||||
padding-left: 2rem;
|
||||
@media(max-width: 810px){
|
||||
// margin-left: 2rem;
|
||||
// margin-top: 3rem;
|
||||
padding-left: 0rem;
|
||||
}
|
||||
.field_field_laureats{
|
||||
|
||||
&:has(.laureat:not(:empty))::before {
|
||||
&.is-laureat::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
// display: block;
|
||||
@@ -141,6 +159,10 @@
|
||||
background-position: center;
|
||||
background-size: contain;
|
||||
z-index: 0;
|
||||
@media(max-width: 810px){
|
||||
left: -1.5rem;
|
||||
top:0.5rem;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -148,10 +170,18 @@
|
||||
font-size: 0;
|
||||
}
|
||||
}
|
||||
.field_title{
|
||||
@media(max-width: 810px){
|
||||
font-size: 1.3rem;
|
||||
}
|
||||
}
|
||||
.field_field_nom_de_l_equipe{
|
||||
border-top: solid black 1px;
|
||||
padding-bottom: 0.5rem;
|
||||
text-transform: uppercase;
|
||||
@media(max-width: 810px){
|
||||
font-size: 1.3rem;
|
||||
}
|
||||
}
|
||||
.field_field_infos{
|
||||
column-count: 3;
|
||||
@@ -164,10 +194,16 @@
|
||||
margin: 0;
|
||||
font-size: 0.7em;
|
||||
font-family: 'gilroy-light';
|
||||
@media(max-width: 810px){
|
||||
font-size:0.8rem;
|
||||
}
|
||||
}
|
||||
.field_field_contenu{
|
||||
font-size: 0.8em;
|
||||
font-family: 'gilroy-bold';
|
||||
@media(max-width: 810px){
|
||||
font-size:0.8rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -183,9 +219,15 @@
|
||||
margin-left: 0;
|
||||
font-size: 0.5rem;
|
||||
font-family: "gilroy-light";
|
||||
@media(max-width: 810px){
|
||||
font-size:0.8rem;
|
||||
}
|
||||
p{
|
||||
margin-top: 0;
|
||||
font-size: 0.5rem;
|
||||
@media(max-width: 810px){
|
||||
font-size:0.8rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -193,22 +235,25 @@
|
||||
p{
|
||||
font-family: "gilroy-light";
|
||||
font-size: 0.6rem;
|
||||
@media(max-width: 810px){
|
||||
font-size:0.8rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
.field_field_equipe_photo,
|
||||
.field_field_equipe_presentation {
|
||||
.equipe-panel {
|
||||
overflow: hidden;
|
||||
max-height: 0;
|
||||
opacity: 0;
|
||||
margin-top: 1rem;
|
||||
transition:
|
||||
max-height 1s ease,
|
||||
opacity 0.8s ease;
|
||||
}
|
||||
|
||||
.field_field_equipe_photo.is-open,
|
||||
.field_field_equipe_presentation.is-open {
|
||||
max-height: 1000px;
|
||||
.equipe-panel.is-open {
|
||||
// max-height: 1500px;
|
||||
opacity: 1;
|
||||
|
||||
}
|
||||
|
||||
.btn-equipe-toggle{
|
||||
@@ -222,19 +267,27 @@
|
||||
margin: auto;
|
||||
display: flex;
|
||||
border: none;
|
||||
// margin-top: 1rem;
|
||||
@media(max-width: 810px){
|
||||
font-size:0.8rem;
|
||||
}
|
||||
|
||||
svg{
|
||||
display: none;
|
||||
}
|
||||
&::after{
|
||||
display: inline-flex;
|
||||
content: url("../img/noun-arrow-to-right.svg");
|
||||
content: url("../img/arrow-down-white.svg");
|
||||
padding-right: 0.2rem;
|
||||
padding-left: 0.2rem;
|
||||
// padding-bottom: 0.2rem;
|
||||
height: 25px;
|
||||
height: 12px;
|
||||
}
|
||||
margin-bottom: 1rem;
|
||||
|
||||
}
|
||||
.btn-equipe-toggle[aria-expanded="true"]::after {
|
||||
content: url("../img/arrow-up-white.svg");
|
||||
|
||||
}
|
||||
.equipe-separator {
|
||||
border-bottom: 1px solid black;
|
||||
@@ -257,6 +310,9 @@
|
||||
p{
|
||||
font-family: "gilroy-light";
|
||||
font-size: 0.6rem;
|
||||
@media(max-width: 810px){
|
||||
font-size:0.8rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -279,6 +335,10 @@
|
||||
object-fit: cover;
|
||||
width: 220px;
|
||||
height: 145px;
|
||||
@media (max-width:810px){
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
.image-field-caption{
|
||||
@@ -288,6 +348,9 @@
|
||||
margin-top: 0;
|
||||
font-size: 0.5rem;
|
||||
font-family: 'gilroy-light';
|
||||
@media(max-width: 810px){
|
||||
font-size:0.8rem;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -311,6 +374,9 @@
|
||||
color: white;
|
||||
text-transform: uppercase;
|
||||
font-size: 0.5rem;
|
||||
@media(max-width: 810px){
|
||||
font-size:0.8rem;
|
||||
}
|
||||
svg{
|
||||
display: none;
|
||||
}
|
||||
@@ -358,98 +424,125 @@
|
||||
flex: 0 1 24%;
|
||||
.block-region-third{
|
||||
position:relative;
|
||||
// width: 23% !important;
|
||||
margin-top: 4.5rem;
|
||||
margin-left: 2rem;
|
||||
@media(max-width: 810px){
|
||||
position: relative;
|
||||
margin-left: 0;
|
||||
margin-top: 2rem;
|
||||
}
|
||||
div{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@media(max-width: 810px){
|
||||
justify-content: center;
|
||||
margin: auto;
|
||||
margin-bottom: 1rem;
|
||||
width: fit-content;
|
||||
}
|
||||
@media(max-width: 500px){
|
||||
justify-content: center;
|
||||
margin: auto;
|
||||
margin-bottom: 1rem;
|
||||
width: fit-content;
|
||||
margin-bottom: 0rem;
|
||||
}
|
||||
h2{
|
||||
|
||||
font-family: "gilroy-light";
|
||||
text-transform: uppercase;
|
||||
font-size: 0.6rem;
|
||||
@media(max-width: 810px){
|
||||
font-size:0.8rem;
|
||||
margin: auto;
|
||||
margin-bottom: 1rem;
|
||||
width: 80%;
|
||||
}
|
||||
&::after{
|
||||
content: " :";
|
||||
}
|
||||
}
|
||||
.views-row{
|
||||
width: 80%;
|
||||
border-bottom: solid black 1px;
|
||||
padding-bottom: 0.5rem;
|
||||
padding-top: 0.5rem;
|
||||
transition: transform 0.4s ease-in-out; // animation plus fluide
|
||||
&:hover {
|
||||
transform: scale(1.05); /* effet de zoom léger */
|
||||
}
|
||||
.views-field-title {
|
||||
h2 {
|
||||
font-size: 0.5rem;
|
||||
margin-bottom: 0rem;
|
||||
// margin-top: 0.3rem;
|
||||
text-transform: none;
|
||||
font-family: "gilroy-regular";
|
||||
&::after{
|
||||
.view-rows-wrapper{
|
||||
@media(max-width: 810px){
|
||||
width: 80%;
|
||||
margin: auto;
|
||||
}
|
||||
.views-row{
|
||||
width: 80%;
|
||||
border-bottom: solid black 1px;
|
||||
padding-bottom: 0.5rem;
|
||||
padding-top: 0.5rem;
|
||||
@media(max-width: 810px){
|
||||
width: 80%;
|
||||
justify-content: start;
|
||||
padding-top: 1rem;
|
||||
}
|
||||
transition: transform 0.4s ease-in-out;
|
||||
&:hover {
|
||||
transform: scale(1.05);
|
||||
}
|
||||
.is-laureat{
|
||||
position: relative;
|
||||
padding-top: 1.5rem;
|
||||
::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0.5rem;
|
||||
left: -1.4rem;
|
||||
width: 2.5rem;
|
||||
height: 2.5rem;
|
||||
background-image: url("../img/laureat-ouvert.svg");
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: contain;
|
||||
z-index: 0;
|
||||
margin-top: 0.2rem;
|
||||
@media(max-width: 810px){
|
||||
top: 0rem;
|
||||
// left: -11.4rem;
|
||||
}
|
||||
}
|
||||
.field-content{
|
||||
font-size: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
.views-field-field-nom-de-l-equipe{
|
||||
h3 {
|
||||
margin-bottom: 0.3rem;
|
||||
margin-top:0.3rem;
|
||||
text-transform: uppercase;
|
||||
|
||||
.views-field-title {
|
||||
@media (max-width:810px){
|
||||
width: fit-content;
|
||||
margin: 0;
|
||||
}
|
||||
h2 {
|
||||
font-size: 0.5rem;
|
||||
margin-bottom: 0rem;
|
||||
text-transform: none;
|
||||
font-family: "gilroy-regular";
|
||||
&::after{
|
||||
content: "";
|
||||
}
|
||||
@media(max-width: 810px){
|
||||
font-size:0.8rem;
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
font-size: 0.4rem;
|
||||
p{
|
||||
font-family: "gilroy-semibold";
|
||||
margin-bottom: 0.5rem;
|
||||
.views-field-field-nom-de-l-equipe{
|
||||
@media (max-width:810px){
|
||||
width: fit-content;
|
||||
margin: 0;
|
||||
}
|
||||
h3 {
|
||||
margin-bottom: 0.3rem;
|
||||
margin-top:0.3rem;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
font-size: 0.4rem;
|
||||
@media(max-width: 810px){
|
||||
font-size:0.7rem;
|
||||
}
|
||||
p{
|
||||
font-family: "gilroy-semibold";
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
}
|
||||
.views-field-view-node{
|
||||
display: none;
|
||||
}
|
||||
|
||||
}
|
||||
.views-field-view-node{
|
||||
display: none;
|
||||
// width: fit-content;
|
||||
// padding-left: 0.5rem;
|
||||
// background: black;
|
||||
// @media (max-width:810px) {
|
||||
// margin-left: 0;
|
||||
// }
|
||||
// a{
|
||||
// display: inline-flex;
|
||||
// justify-content: space-between;
|
||||
// align-items: center;
|
||||
// color: white;
|
||||
// text-transform: uppercase;
|
||||
// font-size: 0.5rem;
|
||||
// svg{
|
||||
// display: none;
|
||||
// }
|
||||
// &::after{
|
||||
// display: inline-flex;
|
||||
// content: url("../img/noun-arrow-to-right.svg");
|
||||
// padding-right: 0.2rem;
|
||||
// padding-left: 0.2rem;
|
||||
// // padding-bottom: 0.2rem;
|
||||
// height: 25px;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.field_field_laureats{
|
||||
color: red;
|
||||
|
||||
+38
-38
@@ -13,8 +13,12 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
|
||||
}
|
||||
.layout__region--first{
|
||||
@media(max-width: 810px){
|
||||
order:2
|
||||
}
|
||||
.block-region-first{
|
||||
#sites-map-container{
|
||||
width: 100% !important;
|
||||
@@ -27,38 +31,12 @@
|
||||
&::after{
|
||||
content: " :";
|
||||
}
|
||||
}
|
||||
} .field_field_link{
|
||||
div{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
a{
|
||||
display: inline-flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
color: white;
|
||||
text-transform: uppercase;
|
||||
font-size: 0.5rem;
|
||||
padding-right: 0.5rem;
|
||||
background-color: black;
|
||||
padding-bottom: 0.1rem;
|
||||
padding-top: 0.1rem;
|
||||
padding-left: 0.2rem;
|
||||
|
||||
// svg{
|
||||
// display: none;
|
||||
// }
|
||||
&::before{
|
||||
display: inline-flex;
|
||||
content: url("../img/noun-arrow-to-left.svg");
|
||||
padding-right: 0.2rem;
|
||||
padding-left: 0.2rem;
|
||||
// padding-bottom: 0.2rem;
|
||||
height: 12px;
|
||||
@media(max-width: 810px){
|
||||
font-size: 1rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.field_field_link{
|
||||
div{
|
||||
display: flex;
|
||||
@@ -73,9 +51,12 @@
|
||||
font-size: 0.5rem;
|
||||
padding-right: 0.5rem;
|
||||
background-color: black;
|
||||
padding-bottom: 0.1rem;
|
||||
padding-top: 0.1rem;
|
||||
padding-bottom: 0.2rem;
|
||||
padding-top: 0.2rem;
|
||||
padding-left: 0.2rem;
|
||||
@media(max-width: 810px){
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
// svg{
|
||||
// display: none;
|
||||
@@ -100,15 +81,21 @@
|
||||
margin-top: 3rem;
|
||||
margin-right: 2rem;
|
||||
// width: 60%;
|
||||
@media(max-width: 810px){
|
||||
order:1;
|
||||
margin-top: 3rem;
|
||||
margin-right: 0;
|
||||
}
|
||||
.block-region-second{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-wrap: wrap;
|
||||
margin-left: 2rem;
|
||||
margin-right: 3rem;
|
||||
@media(max-width: 500px){
|
||||
margin-left: 0.5rem;
|
||||
margin-top: 1rem;
|
||||
@media(max-width: 810px){
|
||||
margin-left: 00rem;
|
||||
margin-top: 0rem;
|
||||
margin-right: 0rem;
|
||||
}
|
||||
.field_title,
|
||||
.field_field_sous_titre{
|
||||
@@ -206,9 +193,10 @@
|
||||
background: black;
|
||||
padding-left: 0.5rem;
|
||||
text-transform: uppercase;
|
||||
font-size: 0.6rem;
|
||||
font-size: 0.5rem;
|
||||
margin-bottom: 0.3rem;
|
||||
padding: 0.3rem;
|
||||
padding: 0.2rem 0.5rem;
|
||||
|
||||
svg{
|
||||
display: none;
|
||||
@@ -226,7 +214,7 @@
|
||||
background: black;
|
||||
padding-left: 0.5rem;
|
||||
text-transform: uppercase;
|
||||
font-size: 0.6rem;
|
||||
font-size: 0.5rem;
|
||||
margin-bottom: 0.3rem;
|
||||
|
||||
svg{
|
||||
@@ -237,6 +225,7 @@
|
||||
content: url("../img/noun-arrow-to-right.svg");
|
||||
padding-right: 0.2rem;
|
||||
padding-left: 0.2rem;
|
||||
height: 25px;
|
||||
}
|
||||
a{
|
||||
color: white;
|
||||
@@ -246,6 +235,7 @@
|
||||
div:has(.field_field_images){
|
||||
order: 10;
|
||||
width: 100%;
|
||||
|
||||
.diaporama{
|
||||
display: flex !important;
|
||||
flex-direction: row !important;
|
||||
@@ -258,10 +248,17 @@
|
||||
}
|
||||
.images{
|
||||
// margin: auto;
|
||||
@media (max-width:810px){
|
||||
margin: auto;
|
||||
}
|
||||
img{
|
||||
object-fit: cover;
|
||||
width: 220px !important;
|
||||
height: 145px;
|
||||
@media (max-width:810px){
|
||||
width: 100% !important;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
.image-field-caption{
|
||||
@@ -271,6 +268,9 @@
|
||||
margin-top: 0;
|
||||
font-size: 0.5rem;
|
||||
font-family: 'gilroy-light';
|
||||
@media (max-width:810px){
|
||||
font-size: 1rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -317,7 +317,7 @@
|
||||
gap: 20px;
|
||||
flex-wrap: wrap;
|
||||
margin-bottom: 2rem;
|
||||
@media(max-width: 500px){
|
||||
@media(max-width: 810px){
|
||||
flex-direction: column !important;
|
||||
}
|
||||
.cadre-img-zoom{
|
||||
@@ -326,6 +326,10 @@
|
||||
object-fit: cover;
|
||||
width: 220px;
|
||||
height: 145px;
|
||||
@media(max-width: 810px){
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
.image-field-caption{
|
||||
@@ -335,6 +339,9 @@
|
||||
margin-top: 0;
|
||||
font-size: 0.5rem;
|
||||
font-family: 'gilroy-light';
|
||||
@media(max-width: 810px){
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -391,24 +398,13 @@
|
||||
// width: 80%;
|
||||
@media(max-width: 810px){
|
||||
position: relative;
|
||||
margin-left: 1rem;
|
||||
margin-top: 3rem;
|
||||
}
|
||||
div{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
// margin-bottom: 1rem;
|
||||
@media(max-width: 810px){
|
||||
justify-content: center;
|
||||
margin: auto;
|
||||
margin-bottom: 1rem;
|
||||
width: fit-content;
|
||||
}
|
||||
@media(max-width: 500px){
|
||||
justify-content: center;
|
||||
margin: auto;
|
||||
margin-bottom: 1rem;
|
||||
width: fit-content;
|
||||
}
|
||||
div:has(h2){
|
||||
border-bottom: solid black 1px;
|
||||
padding-left: 0.3rem;
|
||||
@@ -423,83 +419,110 @@
|
||||
border-bottom: solid black 1px;
|
||||
margin-left: 0.5rem;
|
||||
padding-bottom: 0.5rem;
|
||||
@media(max-width: 810px){
|
||||
font-size:0.8rem;
|
||||
margin: 0;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
&::after{
|
||||
content: " :";
|
||||
}
|
||||
}
|
||||
.node-type-projet {
|
||||
position: relative;
|
||||
transition: transform 0.4s ease-in-out; // animation plus fluide
|
||||
&:hover {
|
||||
transform: scale(1.05); /* effet de zoom léger */
|
||||
}
|
||||
&:has(.laureat:not(:empty)){
|
||||
padding-top: 1.5rem;
|
||||
}
|
||||
&:has(.laureat:not(:empty))::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
// display: block;
|
||||
top: -0.1rem; // adapte la position selon ton visuel
|
||||
left: -1rem;
|
||||
width: 2.5rem;
|
||||
height: 2.5rem;
|
||||
// background-color: #f6f7f3;
|
||||
background-image: url("../img/laureat-ouvert.svg");
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: contain;
|
||||
z-index: 0;
|
||||
margin-top: 0.3rem;
|
||||
}
|
||||
.node-projet-title{
|
||||
.field_field_projets_lie{
|
||||
@media(max-width: 810px){
|
||||
width: 80%;
|
||||
padding-left: 0.5rem;
|
||||
font-size: 0.5rem;
|
||||
margin: 0;
|
||||
background-color: #f6f7f3;
|
||||
font-family: "gilroy-regular";
|
||||
justify-content: start;
|
||||
// padding-top: 1rem;
|
||||
|
||||
}
|
||||
.field_field_nom_de_l_equipe{
|
||||
width: 80%;
|
||||
padding-left: 0.5rem;
|
||||
font-size: 0.4rem;
|
||||
background-color: #f6f7f3;
|
||||
text-transform: uppercase;
|
||||
div{
|
||||
border-bottom: solid black 1px;
|
||||
margin-bottom: 0.5rem;
|
||||
.node-type-projet {
|
||||
position: relative;
|
||||
transition: transform 0.4s ease-in-out;
|
||||
|
||||
&.is-laureat{
|
||||
padding-top: 1.2rem;
|
||||
}
|
||||
p{
|
||||
font-family: "gilroy-semibold";
|
||||
margin-bottom: 0.5rem;
|
||||
&:hover {
|
||||
transform: scale(1.05);
|
||||
}
|
||||
.node-projet-title{
|
||||
width: 80%;
|
||||
padding-left: 0.5rem;
|
||||
font-size: 0.5rem;
|
||||
margin-top: 0.2rem;
|
||||
}
|
||||
div.more-link{
|
||||
display: none;
|
||||
margin-bottom: 1rem;
|
||||
padding-left: 0rem;
|
||||
a{
|
||||
font-size: 0.5rem;
|
||||
margin: 0;
|
||||
background-color: #f6f7f3;
|
||||
font-family: "gilroy-regular";
|
||||
@media(max-width: 810px){
|
||||
font-size:0.8rem;
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.field_field_laureats{
|
||||
color:$red_QDD;
|
||||
text-transform: uppercase;
|
||||
display: inline-flex;
|
||||
align-items: flex-start;
|
||||
height: auto;
|
||||
font-size: 0px;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.field_field_nom_de_l_equipe{
|
||||
width: 80%;
|
||||
padding-left: 0.5rem;
|
||||
font-size: 0.4rem;
|
||||
background-color: #f6f7f3;
|
||||
text-transform: uppercase;
|
||||
@media(max-width: 810px){
|
||||
font-size:0.8rem;
|
||||
width: 100% !important;
|
||||
}
|
||||
div{
|
||||
border-bottom: solid black 1px;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
p{
|
||||
font-family: "gilroy-semibold";
|
||||
margin-bottom: 0.5rem;
|
||||
font-size: 0.5rem;
|
||||
margin-top: 0.2rem;
|
||||
@media(max-width: 810px){
|
||||
font-size:0.8rem;
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
div.more-link{
|
||||
display: none;
|
||||
margin-bottom: 1rem;
|
||||
padding-left: 0rem;
|
||||
a{
|
||||
font-size: 0.5rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.field_field_laureats{
|
||||
color:$red_QDD;
|
||||
text-transform: uppercase;
|
||||
display: inline-flex;
|
||||
align-items: flex-start;
|
||||
height: auto;
|
||||
font-size: 0px;
|
||||
&.is-laureat{
|
||||
position: relative;
|
||||
}
|
||||
&.is-laureat::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: -4.2rem;
|
||||
left: -1rem;
|
||||
width: 2.5rem;
|
||||
height: 2.5rem;
|
||||
background-image: url("../img/laureat-ouvert.svg");
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: contain;
|
||||
z-index: 0;
|
||||
margin-top: 0.3rem;
|
||||
@media(max-width: 810px){
|
||||
top: -6rem;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
.prevnext{
|
||||
display: none;
|
||||
|
||||
@@ -199,7 +199,16 @@
|
||||
@media(max-width: 810px){
|
||||
width: 50%;
|
||||
}
|
||||
.views-field-field-documents a{
|
||||
h2{margin-bottom: 0.2rem;}
|
||||
.views-field-field-date-ressource{
|
||||
padding-top: 0.3rem;
|
||||
}
|
||||
.views-field-body-1 p{
|
||||
margin-top: 0.2rem;
|
||||
margin-bottom: 0.2rem;
|
||||
}
|
||||
.views-field-field-documents a,
|
||||
.views-field-field-liens a{
|
||||
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
@@ -311,7 +320,7 @@
|
||||
width: 100%;
|
||||
background-color: $blue_QDD;
|
||||
}
|
||||
&.type-Galerie-photos{
|
||||
&.type-Mission-photo{
|
||||
justify-content: space-between;
|
||||
.views-row{
|
||||
width: 18%;
|
||||
|
||||
+28
-14
@@ -22,6 +22,7 @@
|
||||
}
|
||||
}
|
||||
.content-actus{
|
||||
width: 100%;
|
||||
.slick-list{
|
||||
padding-bottom: 1rem;
|
||||
@media(max-width: 810px){
|
||||
@@ -31,7 +32,7 @@
|
||||
|
||||
.view-rows-wrapper{
|
||||
margin-left: 25%;
|
||||
width: 65%;
|
||||
width: 55%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-wrap: wrap;
|
||||
@@ -54,6 +55,7 @@
|
||||
.node-type-actualite{
|
||||
width: 85%;
|
||||
// padding-bottom: 2rem;
|
||||
cursor: pointer;
|
||||
|
||||
.content-wrapper-actu{
|
||||
display: grid;
|
||||
@@ -250,21 +252,32 @@
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
a{
|
||||
width: 5em;
|
||||
display: block;
|
||||
display: inline-flex;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
font-size: 0px;
|
||||
align-items: baseline;
|
||||
&::before{
|
||||
content: "En savoir";
|
||||
display: block;
|
||||
// width: 20px;
|
||||
padding-left: 0.4rem;
|
||||
font-size: 0.7rem;
|
||||
height: fit-content;
|
||||
}
|
||||
&::after{
|
||||
content: " +";
|
||||
display: flex;
|
||||
padding-left: 0.3rem;
|
||||
font-size: 1rem;
|
||||
height: 26px;
|
||||
margin: auto;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
&::after{
|
||||
content: "+";
|
||||
display: block;
|
||||
// width: 20px;
|
||||
padding-left: 0.4rem;
|
||||
font-size: 1.8rem;
|
||||
height: fit-content;
|
||||
}
|
||||
|
||||
}
|
||||
.field_field_liens{
|
||||
order: 7;
|
||||
@@ -281,7 +294,8 @@
|
||||
text-transform: uppercase;
|
||||
font-size: 0.5rem;
|
||||
margin-bottom: 0.5rem;
|
||||
|
||||
padding-top: 0.1rem;
|
||||
padding-bottom: 0.1rem;
|
||||
svg{
|
||||
display: none;
|
||||
}
|
||||
@@ -330,8 +344,8 @@
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
padding-left: 0.5rem;
|
||||
// padding-top: 0.2rem;
|
||||
// padding-bottom: 0.2rem;
|
||||
padding-top: 0.1rem;
|
||||
padding-bottom: 0.1rem;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
color: white;
|
||||
|
||||
+25
-21
@@ -3,39 +3,42 @@ header{
|
||||
.field_field_logo{
|
||||
.qdd-header{
|
||||
opacity: 0;
|
||||
animation-delay: 0.9s;
|
||||
animation-name: scale;
|
||||
animation-duration: 2.8s;
|
||||
&.animated{
|
||||
opacity: 1;
|
||||
transform: scale(2);
|
||||
transform: scale(2);
|
||||
@media(max-width:820px) {
|
||||
transform: scale(1);
|
||||
}
|
||||
.blink-blue {
|
||||
opacity: 0;
|
||||
// animation: blink 3s 3;
|
||||
animation-delay: 0.2s;
|
||||
animation-delay: 0.1s;
|
||||
animation-name: blink;
|
||||
animation-duration: 10s;
|
||||
animation-duration: 5s;
|
||||
}
|
||||
|
||||
.blink-red {
|
||||
opacity: 0;
|
||||
animation-delay: 0.8s;
|
||||
animation-delay: 0.3s;
|
||||
animation-name: blink;
|
||||
animation-duration: 10s;
|
||||
animation-duration: 5s;
|
||||
}
|
||||
|
||||
.blink-black {
|
||||
opacity: 0;
|
||||
animation-delay: 1.5s;
|
||||
animation-delay: 0.5s;
|
||||
animation-name: blink;
|
||||
animation-duration: 10s;
|
||||
animation-duration: 5s;
|
||||
}
|
||||
|
||||
.blink-black2 {
|
||||
opacity: 0;
|
||||
animation-delay: 2s;
|
||||
animation-delay: 0.7s;
|
||||
animation-name: blink;
|
||||
animation-duration: 10s;
|
||||
animation-duration: 5s;
|
||||
}
|
||||
@keyframes blink {
|
||||
0%, 100% {
|
||||
@@ -49,8 +52,8 @@ header{
|
||||
.consultation{
|
||||
display: none;
|
||||
animation-name: slideIn;
|
||||
animation-delay: 1s;
|
||||
animation-duration: 3s;
|
||||
animation-delay: 0.5s;
|
||||
animation-duration: 1s;
|
||||
}
|
||||
|
||||
@keyframes slideIn {
|
||||
@@ -62,15 +65,14 @@ header{
|
||||
}
|
||||
}
|
||||
|
||||
// @keyframes scale {
|
||||
// 0%{
|
||||
// transform: scale(2);
|
||||
// }
|
||||
// 90%{transform: scale(2);}
|
||||
// 100% {
|
||||
// transform: scale(1);
|
||||
// }
|
||||
// }
|
||||
@keyframes scale {
|
||||
0%{
|
||||
transform: scale(2);
|
||||
}
|
||||
100% {
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -78,4 +80,6 @@ header{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -7,11 +7,13 @@ header[role="banner"]{
|
||||
max-width: 100vw;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
transition: none;
|
||||
|
||||
// transition: none;
|
||||
// transition: height 0.5s ease-in-out, width 0.5s ease-in-out;
|
||||
// transition: height 2s ease-in-out, width 2s ease-in-out; /* Transition pour le changement de taille */
|
||||
// transition: height 0.3s, padding 0.3s; /* Add transition for smooth resizing */
|
||||
|
||||
// transition: height 1s, padding 1s; /* Add transition for smooth resizing */
|
||||
transition: height 1.4s ease-in-out,
|
||||
width 1.4s ease-in-out;
|
||||
|
||||
.language-switcher-language-url{
|
||||
text-transform: uppercase;
|
||||
color: white;
|
||||
@@ -68,8 +70,13 @@ header[role="banner"]{
|
||||
flex: 0 0 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
transition: height 2s ease-in-out, width 2s ease-in-out; /* Transition pour le changement de taille */
|
||||
// transition: height 2s ease-in-out, width 2s ease-in-out; /* Transition pour le changement de taille */
|
||||
background-color: $white-header;
|
||||
// 🔥 On anime la largeur via flex-basis (et width au cas où)
|
||||
transition:
|
||||
flex-basis 0.9s ease-in-out,
|
||||
width 0.9s ease-in-out;
|
||||
|
||||
img{display: none;}
|
||||
@media(max-width: 660px){
|
||||
height: inherit;
|
||||
@@ -120,7 +127,7 @@ header[role="banner"]{
|
||||
}
|
||||
}
|
||||
.header_right_container{
|
||||
// display: none;
|
||||
display: none;
|
||||
flex: 0 0 0%;
|
||||
width: fit-content;
|
||||
min-width: fit-content;
|
||||
@@ -187,7 +194,11 @@ header[role="banner"]{
|
||||
background: $blue_QDD;
|
||||
text-align: center;
|
||||
transform: translateX(0);
|
||||
transition: transform 0.3s ease-in-out;
|
||||
// transition: transform 0.3s ease-in-out;
|
||||
transition:
|
||||
flex-basis 0.9s ease-in-out,
|
||||
width 0.9s ease-in-out,
|
||||
transform 0.3s ease-in-out; // pour tes slides
|
||||
z-index: -1 ;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -307,12 +318,16 @@ header[role="banner"]{
|
||||
height: 170px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Taille définitive du header après l'animation */
|
||||
header[role="banner"].header--collapsed {
|
||||
height: $header-height; /* Ou la hauteur que vous souhaitez pour votre header */
|
||||
width: 35%;
|
||||
transform-origin: bottom right;
|
||||
transition: all 1s ease-in-out;
|
||||
// transition: all 1s ease-in-out;
|
||||
// transition: all 1.4s ease-in-out;
|
||||
transition: all 1.4s ease-in-out;
|
||||
@media(max-width: 1090px) {
|
||||
height: $header-height-pad;
|
||||
}
|
||||
@@ -327,14 +342,17 @@ header[role="banner"].header--collapsed {
|
||||
height: 170px;
|
||||
}
|
||||
.header_left_container{
|
||||
flex: 1 0 65%;
|
||||
// flex: 1 0 65%;
|
||||
flex-basis: 65%;
|
||||
|
||||
transform-origin: bottom right;
|
||||
@media(max-width: 810px){
|
||||
flex: 1 0 100%;
|
||||
}
|
||||
}
|
||||
.header_nav_container{
|
||||
flex: 0 0 30%;
|
||||
// flex: 0 0 30%;
|
||||
flex-basis: 30%;
|
||||
transform-origin: bottom right;
|
||||
min-width: fit-content;
|
||||
@media(max-width: 810px){
|
||||
@@ -363,14 +381,16 @@ header[role="banner"].header--collapsed-already{
|
||||
height: $header-height-big;
|
||||
}
|
||||
.header_left_container{
|
||||
flex: 1 0 65%;
|
||||
// flex: 1 0 65%;
|
||||
flex-basis: 65%;
|
||||
transform-origin: bottom right;
|
||||
@media(max-width: 810px){
|
||||
flex: 1 0 100%;
|
||||
}
|
||||
}
|
||||
.header_nav_container{
|
||||
flex: 0 0 30%;
|
||||
// flex: 0 0 30%;
|
||||
flex-basis: 30%;
|
||||
min-width: fit-content;
|
||||
transform-origin: bottom right;
|
||||
@media(max-width: 810px){
|
||||
@@ -385,3 +405,51 @@ header[role="banner"].header--collapsed-already{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* Empêcher le scroll pendant l'intro */
|
||||
body.logo-intro-animating {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Header plein écran au tout début */
|
||||
body.logo-intro-active header[role="banner"] {
|
||||
height: 100vh;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* État normal du SVG (dans le header) */
|
||||
#block-quartiers-de-demain-logoquartiersdedemain svg {
|
||||
position: relative;
|
||||
top: auto;
|
||||
left: auto;
|
||||
transform: none; // donc scale(1)
|
||||
transform-origin: center center;
|
||||
transition:
|
||||
transform 1.4s ease-in-out,
|
||||
top 1.4s ease-in-out,
|
||||
left 1.4s ease-in-out;
|
||||
}
|
||||
|
||||
/* État intro : logo centré, scale(2) */
|
||||
body.logo-intro-active #block-quartiers-de-demain-logoquartiersdedemain svg {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%) scale(2);
|
||||
z-index: 9999;
|
||||
}
|
||||
/* Pendant l'intro : même si le header est "collapsed",
|
||||
on garde TOUT l'espace pour le bloc gauche,
|
||||
la nav ne prend AUCUNE place (0%) */
|
||||
|
||||
body.logo-intro-animating header[role="banner"].header--collapsed .header_left_container {
|
||||
flex: 0 0 100%;
|
||||
}
|
||||
|
||||
body.logo-intro-animating header[role="banner"].header--collapsed .header_nav_container {
|
||||
flex: 0 0 0%;
|
||||
width: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@@ -212,6 +212,8 @@
|
||||
text-transform: uppercase;
|
||||
font-size: 0.6rem;
|
||||
margin: auto;
|
||||
padding-top: 0.1rem;
|
||||
padding-bottom: 0.1rem;
|
||||
@media (max-width:810px) {
|
||||
margin-left: 0;
|
||||
margin: auto;
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
@import "global/layout";
|
||||
@import "global/reset";
|
||||
@import "global/mediaquerries";
|
||||
|
||||
// @import "global/_animated-logo";
|
||||
|
||||
|
||||
@@ -24,12 +25,12 @@
|
||||
@import "partials/header";
|
||||
@import "partials/footer";
|
||||
@import "partials/aside";
|
||||
@import "partials/animation-logo";
|
||||
// @import "partials/animation-logo";
|
||||
@import "partials/slick-theme";
|
||||
@import "partials/slick";
|
||||
@import "partials/timeline";
|
||||
@import "partials/actu-caroussel-home";
|
||||
@import "partials/animation-logo-header";
|
||||
// @import "partials/animation-logo-header";
|
||||
@import "partials/formes-animees";
|
||||
@import "partials/animation-pilliers";
|
||||
@import "partials/map";
|
||||
|
||||
@@ -50,6 +50,15 @@
|
||||
{%
|
||||
set ancre_href = '#paragraph-id--' ~ paragraph.id()
|
||||
%}
|
||||
|
||||
{# Vrai si au moins un item a du contenu (donc booléen "vrai") #}
|
||||
{% set is_laureat = false %}
|
||||
{% for item in items %}
|
||||
{% if item.content|render|trim is not empty %}
|
||||
{% set is_laureat = true %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if label_hidden %}
|
||||
{% if multiple %}
|
||||
<div{{ attributes }}>
|
||||
@@ -63,17 +72,16 @@
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<div{{ attributes }}>
|
||||
<div{{ attributes.addClass(is_laureat ? 'is-laureat') }}>
|
||||
<div{{ title_attributes.addClass(title_classes) }}>{{ label }}</div>
|
||||
{% if multiple %}
|
||||
<div>
|
||||
{% endif %}
|
||||
{% for item in items %}
|
||||
{# {% for item in items %}
|
||||
<div class="laureat"{{ item.attributes }}>{{ item.content }}</div>
|
||||
{% endfor %}
|
||||
{% endfor %} #}
|
||||
{% if multiple %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
@@ -62,7 +62,10 @@
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
<article{{ attributes }}>
|
||||
{# On calcule une variable Twig pour savoir si le node est lauréat #}
|
||||
{% set is_laureat = node.field_laureats.value ?? 0 %}
|
||||
|
||||
<article{{ attributes.addClass(is_laureat ? 'is-laureat' : '') }}>
|
||||
|
||||
{{ title_prefix }}
|
||||
{% if label and not page %}
|
||||
|
||||
@@ -62,7 +62,11 @@
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
<article{{ attributes }}>
|
||||
|
||||
{# Le node est lauréat si field_laureats vaut "1" #}
|
||||
{% set is_laureat = node.field_laureats is defined and node.field_laureats.value == '1' %}
|
||||
|
||||
<article{{ attributes.addClass(is_laureat ? 'is-laureat') }}>
|
||||
|
||||
{{ title_prefix }}
|
||||
{% if label and not page %}
|
||||
@@ -89,14 +93,35 @@
|
||||
{% set node_title = node.label %}
|
||||
{% set node_url = (url is defined and url) ? url : path('entity.node.canonical', {'node': node.id}) %}
|
||||
|
||||
{% if node_title %}
|
||||
{# {% if node_title %}
|
||||
{{ title_prefix }}
|
||||
<h3{{ title_attributes }} class="node-projet-title">
|
||||
<a href="{{ node_url }}" rel="bookmark">{{ node_title }}</a>
|
||||
</h3>
|
||||
{{ title_suffix }}
|
||||
{% endif %}
|
||||
{{ content }}
|
||||
{{ content }} #}
|
||||
|
||||
{% if node_title %}
|
||||
{{ title_prefix }}
|
||||
<a href="{{ node_url }}" rel="bookmark" class="node-projet-link">
|
||||
<h3{{ title_attributes.addClass('node-projet-title') }}>
|
||||
{{ node_title }}
|
||||
</h3>
|
||||
|
||||
{# Champ "Nom de l'équipe" inclus dans le lien #}
|
||||
{% if content.field_nom_de_l_equipe is defined %}
|
||||
{{ content.field_nom_de_l_equipe }}
|
||||
{% endif %}
|
||||
</a>
|
||||
{{ title_suffix }}
|
||||
|
||||
{# On affiche le reste des champs, sans field_nom_de_l_equipe #}
|
||||
{{ content|without('field_nom_de_l_equipe') }}
|
||||
{% else %}
|
||||
{{ content }}
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
|
||||
{#
|
||||
|
||||
|
||||
{% for field in fields -%}
|
||||
@@ -54,5 +54,45 @@
|
||||
{%- if field.wrapper_element -%}
|
||||
</{{ field.wrapper_element }}>
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- endfor %} #}
|
||||
|
||||
{# Vrai si le champ field_laureats a une valeur brute #}
|
||||
{# On récupère la valeur brute du champ field_laureats sur l'entité #}
|
||||
{% set laureat_value = row._entity.field_laureats.value ?? null %}
|
||||
|
||||
|
||||
{% set laureat_value = row._entity.field_laureats.value ?? null %}
|
||||
|
||||
{% for id, field in fields -%}
|
||||
{{ field.separator }}
|
||||
|
||||
{%- if field.wrapper_element -%}
|
||||
{# On part des attributs existants du wrapper #}
|
||||
{% set wrapper_attributes = field.wrapper_attributes %}
|
||||
|
||||
{# Si c'est le champ field_laureats ET qu'il a une valeur, on ajoute la classe #}
|
||||
{% if id == 'field_laureats' and laureat_value %}
|
||||
{% set wrapper_attributes = wrapper_attributes.addClass('is-laureat') %}
|
||||
{% endif %}
|
||||
|
||||
<{{ field.wrapper_element }}{{ wrapper_attributes }}>
|
||||
{%- endif %}
|
||||
|
||||
{%- if field.label -%}
|
||||
{%- if field.label_element -%}
|
||||
<{{ field.label_element }}{{ field.label_attributes }}>{{ field.label }}{{ field.label_suffix }}</{{ field.label_element }}>
|
||||
{%- else -%}
|
||||
{{ field.label }}{{ field.label_suffix }}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
|
||||
{%- if field.element_type -%}
|
||||
<{{ field.element_type }}{{ field.element_attributes }}>
|
||||
{{ field.content }}
|
||||
</{{ field.element_type }}>
|
||||
{%- endif %}
|
||||
|
||||
{%- if field.wrapper_element -%}
|
||||
</{{ field.wrapper_element }}>
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
|
||||
@@ -9,6 +9,10 @@ let config = {
|
||||
|
||||
// "./src/assets/js/animated_logo.js",
|
||||
"./src/assets/js/animated_formes.js",
|
||||
"./src/assets/js/lightbox.js",
|
||||
"./src/assets/js/header.js",
|
||||
"./src/assets/js/timeline.js",
|
||||
"./src/assets/js/ressources.js",
|
||||
"./src/assets/scss/quartiers_de_demain.scss",
|
||||
// "./src/assets/fonts/*",
|
||||
// "./src/assets/css/animated_logo.css",
|
||||
@@ -66,11 +70,18 @@ let config = {
|
||||
|
||||
],
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
externals: {
|
||||
drupal: 'Drupal',
|
||||
Drupal: 'Drupal',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
module.exports = config;
|
||||
module.exports = config;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user