architecture de contenu + theming in parrallele

This commit is contained in:
2026-01-14 12:01:01 +01:00
parent 367d8b21e9
commit 7664d33892
48 changed files with 2710 additions and 704 deletions

View File

@@ -16,9 +16,11 @@
],
"require": {
"composer/installers": "^2.0",
"drupal/cer": "^5.0@beta",
"drupal/core-composer-scaffold": "^10.4",
"drupal/core-project-message": "^10.4",
"drupal/core-recommended": "^10.4",
"drupal/upgrade_status": "^4.3",
"wikimedia/composer-merge-plugin": "^2.1"
},
"conflict": {

1835
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -2,3 +2,7 @@ _core:
default_config_hash: RumewwAShocwpN5KgIf0U8Z2yd4_f7mQJpYnwLTzhhQ
langcode: fr
menu_depth: 4
hoverintent_behavior:
enabled: true
timeout: 500
enable_toggle_shortcut: false

View File

@@ -0,0 +1,34 @@
uuid: 98c5dec5-5186-42c9-9a0e-de3eafee1512
langcode: fr
status: true
dependencies:
config:
- system.menu.contenu
module:
- menu_block
theme:
- mathallo
id: mathallo_contenu
theme: mathallo
region: header_right
weight: -2
provider: null
plugin: 'menu_block:contenu'
settings:
id: 'menu_block:contenu'
label: Contenu
label_display: '0'
provider: menu_block
follow: false
follow_parent: child
display_empty: false
label_link: false
label_type: block
level: 1
depth: 0
expand_all_items: true
parent: 'contenu:'
render_parent: false
suggestion: contenu
hide_on_nonactive: false
visibility: { }

View File

@@ -0,0 +1,13 @@
uuid: 68e5f638-641a-4830-bf38-8f413c4aa77e
langcode: fr
status: true
dependencies: { }
id: chapitre_partie
label: 'Chapitre - Partie'
enabled: true
first_field: field_chapitre
second_field: field_parties
add_direction: append
bundles:
node:
- '*'

View File

@@ -1,4 +1,5 @@
_core:
default_config_hash: LzdDtE3Im_Ysio7g1Eo8ymSMq0mgSQMPzv0khsr_J64
langcode: fr
mode: simple
ignored_config_entities: { }

View File

@@ -0,0 +1,22 @@
uuid: 87d1d336-1183-4547-b0f4-86da7290fa5b
langcode: fr
status: true
dependencies:
config:
- node.type.chapitre
id: node.chapitre.promote
field_name: promote
entity_type: node
bundle: chapitre
label: "Promu en page d'accueil"
description: ''
required: false
translatable: true
default_value:
-
value: 0
default_value_callback: ''
settings:
on_label: Activé
off_label: Désactivé
field_type: boolean

View File

@@ -0,0 +1,22 @@
uuid: 913b3f33-7447-4dc2-b5f6-0abd8f6375c0
langcode: fr
status: true
dependencies:
config:
- node.type.partie
id: node.partie.promote
field_name: promote
entity_type: node
bundle: partie
label: "Promu en page d'accueil"
description: ''
required: false
translatable: true
default_value:
-
value: 0
default_value_callback: ''
settings:
on_label: Activé
off_label: Désactivé
field_type: boolean

View File

@@ -0,0 +1,141 @@
uuid: 0755edd0-24d7-42ca-997c-e0affcb7d8e2
langcode: fr
status: true
dependencies:
config:
- field.field.node.chapitre.body
- field.field.node.chapitre.field_chapitre_num
- field.field.node.chapitre.field_parties
- node.type.chapitre
module:
- field_group
- path
- text
third_party_settings:
field_group:
group_tabs:
children:
- group_corps
- group_parties
label: Tabs
region: content
parent_name: ''
weight: 1
format_type: tabs
format_settings:
classes: ''
show_empty_fields: false
id: ''
label_as_html: false
direction: horizontal
width_breakpoint: 640
group_corps:
children:
- body
label: Corps
region: content
parent_name: group_tabs
weight: 20
format_type: tab
format_settings:
classes: ''
show_empty_fields: false
id: ''
label_as_html: false
formatter: open
description: ''
required_fields: true
group_parties:
children:
- field_parties
label: Parties
region: content
parent_name: group_tabs
weight: 21
format_type: tab
format_settings:
classes: ''
show_empty_fields: false
id: ''
label_as_html: false
formatter: closed
description: ''
required_fields: true
group_details:
children:
- field_chapitre_num
- status
- path
label: Details
region: content
parent_name: ''
weight: 2
format_type: details_sidebar
format_settings:
classes: ''
show_empty_fields: false
id: ''
label_as_html: false
open: true
description: ''
required_fields: true
weight: -100
id: node.chapitre.default
targetEntityType: node
bundle: chapitre
mode: default
content:
body:
type: text_textarea_with_summary
weight: 9
region: content
settings:
rows: 9
summary_rows: 3
placeholder: ''
show_summary: false
third_party_settings: { }
field_chapitre_num:
type: number
weight: 26
region: content
settings:
placeholder: 'numéro de chapitre'
third_party_settings: { }
field_parties:
type: entity_reference_autocomplete
weight: 10
region: content
settings:
match_operator: CONTAINS
match_limit: 10
size: 60
placeholder: ''
third_party_settings: { }
path:
type: path
weight: 28
region: content
settings: { }
third_party_settings: { }
status:
type: boolean_checkbox
weight: 27
region: content
settings:
display_label: true
third_party_settings: { }
title:
type: string_textfield
weight: 0
region: content
settings:
size: 60
placeholder: ''
third_party_settings: { }
hidden:
created: true
langcode: true
promote: true
sticky: true
uid: true

View File

@@ -0,0 +1,125 @@
uuid: 57e7ff25-6775-4326-ad22-a074f529bee8
langcode: fr
status: true
dependencies:
config:
- field.field.node.partie.body
- field.field.node.partie.field_chapitre
- field.field.node.partie.field_partie
- node.type.partie
module:
- field_group
- path
- text
third_party_settings:
field_group:
group_tabs:
children:
- group_corps
label: Tabs
region: content
parent_name: ''
weight: 1
format_type: tabs
format_settings:
classes: ''
show_empty_fields: false
id: ''
label_as_html: false
direction: horizontal
width_breakpoint: 640
group_details:
children:
- field_chapitre
- field_partie
- status
- path
label: Details
region: content
parent_name: ''
weight: 4
format_type: details_sidebar
format_settings:
classes: ''
show_empty_fields: false
id: ''
label_as_html: false
open: true
description: ''
required_fields: true
weight: -100
group_corps:
children:
- body
label: Corps
region: content
parent_name: group_tabs
weight: 20
format_type: tab
format_settings:
classes: ''
show_empty_fields: false
id: ''
label_as_html: false
formatter: open
description: ''
required_fields: true
id: node.partie.default
targetEntityType: node
bundle: partie
mode: default
content:
body:
type: text_textarea_with_summary
weight: 2
region: content
settings:
rows: 9
summary_rows: 3
placeholder: ''
show_summary: false
third_party_settings: { }
field_chapitre:
type: entity_reference_autocomplete
weight: 3
region: content
settings:
match_operator: CONTAINS
match_limit: 10
size: 60
placeholder: ''
third_party_settings: { }
field_partie:
type: number
weight: 4
region: content
settings:
placeholder: 'Partie numéro ...'
third_party_settings: { }
path:
type: path
weight: 6
region: content
settings: { }
third_party_settings: { }
status:
type: boolean_checkbox
weight: 5
region: content
settings:
display_label: true
third_party_settings: { }
title:
type: string_textfield
weight: 0
region: content
settings:
size: 60
placeholder: ''
third_party_settings: { }
hidden:
created: true
langcode: true
promote: true
sticky: true
uid: true

View File

@@ -0,0 +1,50 @@
uuid: debec4a8-db13-4673-b93d-91deb3a95447
langcode: fr
status: true
dependencies:
config:
- field.field.node.chapitre.body
- field.field.node.chapitre.field_chapitre_num
- field.field.node.chapitre.field_parties
- node.type.chapitre
module:
- text
- user
id: node.chapitre.default
targetEntityType: node
bundle: chapitre
mode: default
content:
body:
type: text_default
label: hidden
settings: { }
third_party_settings: { }
weight: 1
region: content
field_chapitre_num:
type: number_integer
label: inline
settings:
thousand_separator: ''
prefix_suffix: true
third_party_settings: { }
weight: 0
region: content
field_parties:
type: entity_reference_entity_view
label: visually_hidden
settings:
view_mode: default
link: true
third_party_settings: { }
weight: 2
region: content
links:
settings: { }
third_party_settings: { }
weight: 3
region: content
hidden:
langcode: true
search_api_excerpt: true

View File

@@ -0,0 +1,36 @@
uuid: 84ac1255-53c7-4bf2-a263-b23bc4fc4725
langcode: fr
status: true
dependencies:
config:
- core.entity_view_mode.node.teaser
- field.field.node.chapitre.body
- field.field.node.chapitre.field_chapitre_num
- field.field.node.chapitre.field_parties
- node.type.chapitre
module:
- text
- user
id: node.chapitre.teaser
targetEntityType: node
bundle: chapitre
mode: teaser
content:
body:
type: text_summary_or_trimmed
label: hidden
settings:
trim_length: 600
third_party_settings: { }
weight: 101
region: content
links:
settings: { }
third_party_settings: { }
weight: 100
region: content
hidden:
field_chapitre_num: true
field_parties: true
langcode: true
search_api_excerpt: true

View File

@@ -0,0 +1,42 @@
uuid: 5c74be42-7a87-4688-b0f0-f074744e4ba0
langcode: fr
status: true
dependencies:
config:
- field.field.node.partie.body
- field.field.node.partie.field_chapitre
- field.field.node.partie.field_partie
- node.type.partie
module:
- text
- user
id: node.partie.default
targetEntityType: node
bundle: partie
mode: default
content:
body:
type: text_default
label: hidden
settings: { }
third_party_settings: { }
weight: 1
region: content
field_partie:
type: number_integer
label: inline
settings:
thousand_separator: ''
prefix_suffix: true
third_party_settings: { }
weight: 0
region: content
links:
settings: { }
third_party_settings: { }
weight: 2
region: content
hidden:
field_chapitre: true
langcode: true
search_api_excerpt: true

View File

@@ -0,0 +1,36 @@
uuid: b7d3b4c1-6194-4829-9895-1a0103729bf5
langcode: fr
status: true
dependencies:
config:
- core.entity_view_mode.node.teaser
- field.field.node.partie.body
- field.field.node.partie.field_chapitre
- field.field.node.partie.field_partie
- node.type.partie
module:
- text
- user
id: node.partie.teaser
targetEntityType: node
bundle: partie
mode: teaser
content:
body:
type: text_summary_or_trimmed
label: hidden
settings:
trim_length: 600
third_party_settings: { }
weight: 101
region: content
links:
settings: { }
third_party_settings: { }
weight: 100
region: content
hidden:
field_chapitre: true
field_partie: true
langcode: true
search_api_excerpt: true

View File

@@ -13,6 +13,7 @@ module:
block_class: 0
breakpoint: 0
bulkdelete: 0
cer: 0
ckeditor5: 0
config: 0
config_devel: 0
@@ -58,6 +59,7 @@ module:
linkit: 0
locale: 0
maillog: 0
mathallomod: 0
maxlength: 0
menu_block: 0
menu_link_content: 0
@@ -87,6 +89,7 @@ module:
toolbar: 0
translation_views: 0
update: 0
upgrade_status: 0
user: 0
video_embed_field: 0
views_bulk_edit: 0

View File

@@ -3,17 +3,29 @@ _core:
langcode: fr
extlink_target: false
extlink_target_no_override: false
extlink_target_display_default_title: true
extlink_target_default_title_text: '(opens in a new window)'
extlink_title_no_override: false
extlink_nofollow: false
extlink_follow_no_override: false
extlink_subdomains: true
extlink_alert: false
extlink_alert_text: 'Ce lien vous dirige vers un site externe. Nous ne sommes pas responsables de son contenu.'
extlink_additional_link_classes: ''
extlink_additional_mailto_classes: ''
extlink_additional_tel_classes: ''
extlink_exclude: ''
extlink_include: ''
extlink_exclude_noreferrer: ''
extlink_class: ext
extlink_label: '(le lien est externe)'
extlink_img_class: false
extlink_css_exclude: ''
extlink_css_include: ''
extlink_css_explicit: ''
extlink_mailto_class: mailto
extlink_mailto_label: '(link sends email)'
extlink_tel_class: ''
extlink_tel_label: '(link is a phone number)'
extlink_prevent_orphan: false
allowed_domains: null

View File

@@ -0,0 +1,24 @@
uuid: 826144e7-2e37-486b-a972-85ea06449a1a
langcode: fr
status: true
dependencies:
config:
- field.storage.node.body
- node.type.chapitre
module:
- text
id: node.chapitre.body
field_name: body
entity_type: node
bundle: chapitre
label: Body
description: ''
required: false
translatable: true
default_value: { }
default_value_callback: ''
settings:
display_summary: true
required_summary: false
allowed_formats: { }
field_type: text_with_summary

View File

@@ -0,0 +1,23 @@
uuid: 7a5e4ccc-27a9-43a8-97f8-f55f5d89a841
langcode: fr
status: true
dependencies:
config:
- field.storage.node.field_chapitre_num
- node.type.chapitre
id: node.chapitre.field_chapitre_num
field_name: field_chapitre_num
entity_type: node
bundle: chapitre
label: Chapitre
description: ''
required: true
translatable: false
default_value: { }
default_value_callback: ''
settings:
min: 1
max: null
prefix: ''
suffix: ''
field_type: integer

View File

@@ -0,0 +1,29 @@
uuid: 87cfa701-0cda-469a-8c5c-521c2aa6fd5c
langcode: fr
status: true
dependencies:
config:
- field.storage.node.field_parties
- node.type.chapitre
- node.type.partie
id: node.chapitre.field_parties
field_name: field_parties
entity_type: node
bundle: chapitre
label: Parties
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings:
handler: 'default:node'
handler_settings:
target_bundles:
partie: partie
sort:
field: _none
direction: ASC
auto_create: false
auto_create_bundle: ''
field_type: entity_reference

View File

@@ -0,0 +1,24 @@
uuid: abf259c9-da36-4e3f-8054-ed802e26352c
langcode: fr
status: true
dependencies:
config:
- field.storage.node.body
- node.type.partie
module:
- text
id: node.partie.body
field_name: body
entity_type: node
bundle: partie
label: Body
description: ''
required: false
translatable: true
default_value: { }
default_value_callback: ''
settings:
display_summary: true
required_summary: false
allowed_formats: { }
field_type: text_with_summary

View File

@@ -0,0 +1,29 @@
uuid: 5de4c43c-e2b0-4d2e-bf35-d7d597adc318
langcode: fr
status: true
dependencies:
config:
- field.storage.node.field_chapitre
- node.type.chapitre
- node.type.partie
id: node.partie.field_chapitre
field_name: field_chapitre
entity_type: node
bundle: partie
label: Chapitre
description: ''
required: true
translatable: false
default_value: { }
default_value_callback: ''
settings:
handler: 'default:node'
handler_settings:
target_bundles:
chapitre: chapitre
sort:
field: _none
direction: ASC
auto_create: false
auto_create_bundle: ''
field_type: entity_reference

View File

@@ -0,0 +1,23 @@
uuid: 49f2a2bd-2121-43a0-ad27-bd94c1f90e6d
langcode: fr
status: true
dependencies:
config:
- field.storage.node.field_partie
- node.type.partie
id: node.partie.field_partie
field_name: field_partie
entity_type: node
bundle: partie
label: Partie
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings:
min: 1
max: null
prefix: ''
suffix: ''
field_type: integer

View File

@@ -0,0 +1,19 @@
uuid: f71ed056-f8f4-4944-a9e9-d3e2cd7da8db
langcode: fr
status: true
dependencies:
module:
- node
id: node.field_chapitre
field_name: field_chapitre
entity_type: node
type: entity_reference
settings:
target_type: node
module: core
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false

View File

@@ -0,0 +1,20 @@
uuid: 171a0846-800c-4392-bb96-b2fd4e46e763
langcode: fr
status: true
dependencies:
module:
- node
id: node.field_chapitre_num
field_name: field_chapitre_num
entity_type: node
type: integer
settings:
unsigned: false
size: normal
module: core
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false

View File

@@ -0,0 +1,20 @@
uuid: fa8e1cf7-efc5-4626-9fea-779ba67be507
langcode: fr
status: true
dependencies:
module:
- node
id: node.field_partie
field_name: field_partie
entity_type: node
type: integer
settings:
unsigned: false
size: normal
module: core
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false

View File

@@ -0,0 +1,19 @@
uuid: 63f62ed3-cada-4770-9bdc-3a832ce09e2f
langcode: fr
status: true
dependencies:
module:
- node
id: node.field_parties
field_name: field_parties
entity_type: node
type: entity_reference
settings:
target_type: node
module: core
locked: false
cardinality: -1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false

View File

@@ -0,0 +1,11 @@
uuid: 6cb5f4b9-065f-437d-8f57-e5c199a03d5e
langcode: fr
status: true
dependencies:
config:
- node.type.chapitre
id: node.chapitre
target_entity_type_id: node
target_bundle: chapitre
default_langcode: site_default
language_alterable: false

View File

@@ -0,0 +1,11 @@
uuid: 5dad359d-702e-4203-bd7c-c04157be696e
langcode: fr
status: true
dependencies:
config:
- node.type.partie
id: node.partie
target_entity_type_id: node
target_bundle: partie
default_langcode: site_default
language_alterable: false

View File

@@ -0,0 +1,18 @@
uuid: cde6754a-223e-47eb-92ff-efe32860b625
langcode: fr
status: true
dependencies:
module:
- menu_ui
third_party_settings:
menu_ui:
available_menus:
- contenu
parent: 'contenu:'
name: Chapitre
type: chapitre
description: null
help: null
new_revision: true
preview_mode: 1
display_submitted: false

View File

@@ -0,0 +1,18 @@
uuid: ba2dbd7c-3be3-45ab-9deb-336f29c37032
langcode: fr
status: true
dependencies:
module:
- menu_ui
third_party_settings:
menu_ui:
available_menus:
- contenu
parent: 'contenu:'
name: Partie
type: partie
description: null
help: null
new_revision: true
preview_mode: 1
display_submitted: false

View File

@@ -0,0 +1,22 @@
uuid: 3a3ac08d-1ed5-4615-a5c9-c5ae4bab40d6
langcode: fr
status: true
dependencies:
module:
- node
id: chapitre
label: Chapitres
type: 'canonical_entities:node'
pattern: '/chapitre/[node:title]'
selection_criteria:
b4a1a156-e751-4de3-9d06-73536a58d5b2:
id: 'entity_bundle:node'
negate: false
uuid: b4a1a156-e751-4de3-9d06-73536a58d5b2
context_mapping:
node: node
bundles:
chapitre: chapitre
selection_logic: and
weight: -5
relationships: { }

View File

@@ -0,0 +1,22 @@
uuid: b86c9e0e-5c9d-4f13-bb11-4f295ffdd5d7
langcode: fr
status: true
dependencies:
module:
- node
id: parties
label: Parties
type: 'canonical_entities:node'
pattern: '/partie/[node:title]'
selection_criteria:
0bae5579-20e6-4ba3-9d18-5fb5df9dd0ac:
id: 'entity_bundle:node'
negate: false
uuid: 0bae5579-20e6-4ba3-9d18-5fb5df9dd0ac
context_mapping:
node: node
bundles:
partie: partie
selection_logic: and
weight: -5
relationships: { }

View File

@@ -0,0 +1,8 @@
uuid: 03e9d842-53ea-4615-82dd-15d2abf8de7a
langcode: fr
status: true
dependencies: { }
id: contenu
label: Contenu
description: ''
locked: false

View File

@@ -0,0 +1,3 @@
_core:
default_config_hash: BqkUHiXXGvu2L7NR_nblxtP6f03MdD16XSMWwVM0QEc
paths_per_scan: 30

View File

@@ -3,6 +3,8 @@ langcode: fr
status: true
dependencies:
config:
- node.type.chapitre
- node.type.partie
- node.type.static
module:
- actions_permissions
@@ -19,11 +21,21 @@ weight: -7
is_admin: null
permissions:
- 'access administration pages'
- 'access content overview'
- 'access files overview'
- 'access toolbar'
- 'administer nodes'
- 'administer users'
- 'change own username'
- 'create chapitre content'
- 'create content translations'
- 'create partie content'
- 'create static content'
- 'delete chapitre revisions'
- 'delete partie revisions'
- 'delete static revisions'
- 'edit any chapitre content'
- 'edit any partie content'
- 'edit any static content'
- 'execute entity:save_action menu_link_content'
- 'execute entity:save_action node'
@@ -37,7 +49,12 @@ permissions:
- 'execute user_unblock_user_action user'
- 'execute vbo_cancel_user_action user'
- 'execute views_bulk_edit all'
- 'revert chapitre revisions'
- 'revert partie revisions'
- 'revert static revisions'
- 'update content translations'
- 'view chapitre revisions'
- 'view own unpublished content'
- 'view partie revisions'
- 'view static revisions'
- 'view the administration theme'

View File

@@ -4,12 +4,15 @@ status: true
dependencies:
config:
- filter.format.wysiwyg
- node.type.chapitre
- node.type.partie
- node.type.static
module:
- actions_permissions
- content_translation
- filter
- locale
- menu_admin_per_menu
- node
- system
- toolbar
@@ -23,20 +26,32 @@ permissions:
- 'access administration pages'
- 'access content overview'
- 'access toolbar'
- 'administer contenu menu items'
- 'administer nodes'
- 'create chapitre content'
- 'create content translations'
- 'create partie content'
- 'create static content'
- 'delete chapitre revisions'
- 'delete partie revisions'
- 'delete static revisions'
- 'edit any chapitre content'
- 'edit any partie content'
- 'edit any static content'
- 'execute entity:save_action node'
- 'execute node_make_sticky_action node'
- 'execute node_make_unsticky_action node'
- 'execute node_promote_action node'
- 'execute node_unpromote_action node'
- 'revert chapitre revisions'
- 'revert partie revisions'
- 'revert static revisions'
- 'translate editable entities'
- 'translate interface'
- 'update content translations'
- 'use text format wysiwyg'
- 'view chapitre revisions'
- 'view own unpublished content'
- 'view partie revisions'
- 'view static revisions'
- 'view the administration theme'

View File

@@ -2,6 +2,9 @@ uuid: f50a9af5-05ea-4292-bf23-47dfcf0baf18
langcode: fr
status: true
dependencies:
config:
- field.storage.node.field_chapitre_num
- field.storage.node.field_partie
module:
- node
- user
@@ -124,6 +127,198 @@ display:
multi_type: separator
separator: ', '
field_api_classes: false
field_chapitre_num:
id: field_chapitre_num
table: node__field_chapitre_num
field: field_chapitre_num
relationship: none
group_type: group
admin_label: ''
plugin_id: field
label: 'Chapitre | Partie'
exclude: false
alter:
alter_text: true
text: 'Chapitre {{ field_chapitre_num }}'
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: true
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: number_integer
settings:
thousand_separator: ''
prefix_suffix: true
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
field_chapitre_num_1:
id: field_chapitre_num_1
table: node__field_chapitre_num
field: field_chapitre_num
relationship: field_chapitre
group_type: group
admin_label: ''
plugin_id: field
label: ''
exclude: true
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: number_integer
settings:
thousand_separator: ''
prefix_suffix: true
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
field_partie:
id: field_partie
table: node__field_partie
field: field_partie
relationship: none
group_type: group
admin_label: ''
plugin_id: field
label: 'Partie num'
exclude: false
alter:
alter_text: true
text: 'Chapitre {{ field_chapitre_num_1 }} | Partie {{ field_partie }}'
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: true
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: number_integer
settings:
thousand_separator: ''
prefix_suffix: true
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
name:
id: name
table: users_field_data
@@ -249,13 +444,13 @@ display:
pager:
type: full
options:
pagination_heading_level: h4
items_per_page: 50
tags:
next: 'Suivant '
previous: ' Précédent'
first: '« Premier'
last: 'Dernier »'
pagination_heading_level: h4
exposed_form:
type: basic
options:
@@ -485,32 +680,53 @@ display:
node_bulk_form: node_bulk_form
title: title
type: type
field_chapitre_num: field_chapitre_num
field_chapitre_num_1: field_chapitre_num_1
field_partie: field_chapitre_num
name: name
status: status
changed: changed
edit_node: edit_node
delete_node: delete_node
dropbutton: dropbutton
timestamp: title
operations: operations
default: changed
info:
node_bulk_form:
align: ''
separator: ''
empty_column: false
empty_column: true
responsive: ''
title:
sortable: true
default_sort_order: asc
align: ''
separator: ''
empty_column: false
empty_column: true
responsive: ''
type:
sortable: true
default_sort_order: asc
align: ''
separator: ''
empty_column: true
responsive: ''
field_chapitre_num:
sortable: false
default_sort_order: asc
align: ''
separator: ''
empty_column: true
responsive: ''
field_chapitre_num_1:
sortable: false
default_sort_order: asc
align: ''
separator: ''
empty_column: false
responsive: ''
field_partie:
sortable: false
default_sort_order: asc
align: ''
separator: ''
empty_column: false
responsive: ''
name:
@@ -518,49 +734,26 @@ display:
default_sort_order: asc
align: ''
separator: ''
empty_column: false
empty_column: true
responsive: priority-low
status:
sortable: true
default_sort_order: asc
align: ''
separator: ''
empty_column: false
empty_column: true
responsive: ''
changed:
sortable: true
default_sort_order: desc
align: ''
separator: ''
empty_column: false
empty_column: true
responsive: priority-low
edit_node:
sortable: false
default_sort_order: asc
operations:
align: ''
separator: ''
empty_column: false
responsive: ''
delete_node:
sortable: false
default_sort_order: asc
align: ''
separator: ''
empty_column: false
responsive: ''
dropbutton:
sortable: false
default_sort_order: asc
align: ''
separator: ''
empty_column: false
responsive: ''
timestamp:
sortable: false
default_sort_order: asc
align: ''
separator: ''
empty_column: false
empty_column: true
responsive: ''
override: true
sticky: true
@@ -580,6 +773,15 @@ display:
admin_label: author
plugin_id: standard
required: true
field_chapitre:
id: field_chapitre
table: node__field_chapitre
field: field_chapitre
relationship: none
group_type: group
admin_label: 'field_chapitre : Contenu'
plugin_id: standard
required: false
show_admin_links: false
display_extenders: { }
cache_metadata:
@@ -592,7 +794,9 @@ display:
- user
- 'user.node_grants:view'
- user.permissions
tags: { }
tags:
- 'config:field.storage.node.field_chapitre_num'
- 'config:field.storage.node.field_partie'
page_1:
id: page_1
display_title: Page
@@ -624,4 +828,6 @@ display:
- user
- 'user.node_grants:view'
- user.permissions
tags: { }
tags:
- 'config:field.storage.node.field_chapitre_num'
- 'config:field.storage.node.field_partie'

View File

@@ -0,0 +1,5 @@
name: 'mathallomod'
type: module
description: 'helpers for mathallo'
core_version_requirement: ^10.6 || ^11.0
package: 'mathallo'

View File

@@ -0,0 +1,15 @@
<?php
/**
* @file
* Contains mathallomod.module.
*/
function mathallomod_link_alter(&$variables) {
// $url = $variables['url'];
// if($url->getRouteName() === "entity.node.canonical"){
// $nid = $url->getRouteParameters()['node'];
// $node =
// }
}

View File

@@ -42,10 +42,20 @@ gsap.registerPlugin(ScrollTrigger, ScrollSmoother);
// |___|_||_|_|\__|
function init () {
console.log('MathalloTheme init()')
initBurgerMenu();
initBgAnime()
initVues()
}
function initBurgerMenu() {
let header_right = document.getElementById('burger-btn');
header_right.parentElement.addEventListener('click', function(e){
// console.log('click header_right', this);
this.firstElementChild.toggleAttribute('opened');
this.firstElementChild.nextElementSibling.toggleAttribute('opened');
})
}
function initBgAnime(){
// gsap.to('body', {
// scrollTrigger: 'main[role="main"]', // start animation when ".box" enters the viewport

View File

@@ -13,6 +13,8 @@ body{
background-position: center;
}
$header_height: 50px;
div.layout-container{
// display: flex;
// flex-direction: column;
@@ -25,6 +27,7 @@ div.layout-container{
position: fixed;
top:0;
width: 100vw;
height: $header_height;
}
main[role="main"]{
// flex: 1 1 auto;
@@ -49,7 +52,7 @@ header[role="banner"]{
.header-middle{
display: flex;
justify-content:space-between;
align-items: baseline;
align-items: center;
padding: 0.2em 2em;
}
@@ -72,16 +75,117 @@ header[role="banner"]{
}
.header-right{
// position: relative;
height:20px; width:20px;
cursor: pointer;
// background-color: green;
#block-mathallo-navigationprincipale{
ul{
display: flex;
list-style: none;
li:not(:first-child){
margin-left: 1em;
>div#burger-btn{
position:relative;
&, &::before, &::after{
// position: absolute;
width:20px; height:3px;
background-color: $bleu_site;
}
top: 8.5px;
&::before, &::after{
content: "";
position: absolute;
left: 0;
// background-color: red;
}
&::before{
top:6px;
}
&::after{
bottom: 6px;
}
transition-duration: 0.5s;
&[opened]{
transform: rotate(90deg);
}
}
&>div.wrapper{
position:absolute;
top:$header_height; left:0;
// z-index: 99;
background-color: rgba(0,0,0,0.75);
width:100vw;
height: 0;
overflow: hidden;
&[opened]{
height: calc(100vh - $header_height);
}
transition-duration: 0.5s;
&>nav{
padding-top: 10px;
background-color: #fff;
>ul{
margin: 0;
}
}
nav#block-mathallo-contenu{
padding: 1em;
ul,li{
padding: 0;
margin:0;
list-style: none;
}
li{
padding:0 0 1em 0;
&:first-child{
padding:0.25em 0 1em;
}
}
label{
color:$bleu_site;
font-weight: 600;
display: block;
font-size: 0.756em;
padding:0 0 0.25em 0;
}
a{
font-size: 1.13em;
}
&>ul{ // chapitres
display: flex;
flex-direction: row;
gap: 2em;
>li{
>ul{ // parties
margin:0.75em 0 0;
padding:0 0 0 1em;
border-left: 2px solid $bleu_site;
>li{
}
}
}
}
}
nav#block-mathallo-navigationprincipale{
padding: 2em 1em;
ul{
display: flex;
justify-content: flex-end;
list-style: none;
li{
&:not(:last-child){
}
margin-right: 1em;
background-color: $bleu_site;
color: #fff;
padding:0.5em 1em;
}
}
}
}
}
} // end of header[role="banner"]{

View File

@@ -29,6 +29,40 @@ function mathallo_preprocess_page(&$variables) {
}
function mathallo_preprocess_region(&$variables) {
if (isset($variables["attributes"]['class'])) {
$variables["attributes"]['class'] = [];
}
$variables["attributes"]['class'][] = "wrapper";
}
function mathallo_preprocess_block__mathallo_contenu(&$variables) {
foreach ($variables['content']['#items'] as $key => $item) {
parse_menu_item($variables['content']['#items'], $key);
}
}
function parse_menu_item(&$items, $key){
if ($items[$key]['url']->getRouteName() === "entity.node.canonical") {
$nid = $items[$key]['url']->getRouteParameters()['node'];
$node = \Drupal\node\Entity\Node::load($nid);
if ($node->getType() === "chapitre") {
$chapitre = $node->get('field_chapitre_num')->getValue()[0]['value'];
$items[$key]['prefix'] = "Chapitre {$chapitre}";
}
if ($node->getType() === "partie") {
$partie = $node->get('field_partie')->getValue()[0]['value'];
$items[$key]['prefix'] = "Partie {$partie}";
}
}
if (count($items[$key]['below']) > 0) {
foreach ($items[$key]['below'] as $key_b => $item_b) {
parse_menu_item($items[$key]['below'], $key_b);
}
}
}
/**
* Implements hook_preprocess_HOOK() for node.html.twig.
*/

View File

@@ -0,0 +1,51 @@
{#
/**
* @file
* Default theme implementation for a menu block.
*
* Available variables:
* - plugin_id: The ID of the block implementation.
* - label: The configured label of the block if visible.
* - configuration: A list of the block's configuration values.
* - label: The configured label for the block.
* - label_display: The display settings for the label.
* - provider: The module or other provider that provided this block plugin.
* - Block plugin specific settings will also be stored here.
* - in_preview: Whether the plugin is being rendered in preview mode.
* - content: The content of this block.
* - attributes: HTML attributes for the containing element.
* - id: A valid HTML ID and guaranteed unique.
* - title_attributes: HTML attributes for the title element.
* - content_attributes: HTML attributes for the content element.
* - title_prefix: Additional output populated by modules, intended to be
* displayed in front of the main title tag that appears in the template.
* - title_suffix: Additional output populated by modules, intended to be
* displayed after the main title tag that appears in the template.
*
* Headings should be used on navigation menus that consistently appear on
* multiple pages. When this menu block's label is configured to not be
* displayed, it is automatically made invisible using the 'visually-hidden' CSS
* class, which still keeps it visible for screen-readers and assistive
* technology. Headings allow screen-reader and keyboard only users to navigate
* to or skip the links.
* See http://juicystudio.com/article/screen-readers-display-none.php and
* https://www.w3.org/TR/WCAG-TECHS/H42.html for more information.
*
* @ingroup themeable
*/
#}
{% set heading_id = attributes.id ~ '-menu'|clean_id %}
<nav role="navigation" aria-labelledby="{{ heading_id }}"{{ attributes|without('role', 'aria-labelledby') }}>
{# Label. If not displayed, we still provide it for screen readers. #}
{% if not configuration.label_display %}
{% set title_attributes = title_attributes.addClass('visually-hidden') %}
{% endif %}
{{ title_prefix }}
<h2{{ title_attributes.setAttribute('id', heading_id) }}>{{ configuration.label }}</h2>
{{ title_suffix }}
{# Menu. #}
{% block content %}
{{ content }}
{% endblock %}
</nav>

View File

@@ -0,0 +1,51 @@
{#
/**
* @file
* Default theme implementation for a menu block.
*
* Available variables:
* - plugin_id: The ID of the block implementation.
* - label: The configured label of the block if visible.
* - configuration: A list of the block's configuration values.
* - label: The configured label for the block.
* - label_display: The display settings for the label.
* - provider: The module or other provider that provided this block plugin.
* - Block plugin specific settings will also be stored here.
* - in_preview: Whether the plugin is being rendered in preview mode.
* - content: The content of this block.
* - attributes: HTML attributes for the containing element.
* - id: A valid HTML ID and guaranteed unique.
* - title_attributes: HTML attributes for the title element.
* - content_attributes: HTML attributes for the content element.
* - title_prefix: Additional output populated by modules, intended to be
* displayed in front of the main title tag that appears in the template.
* - title_suffix: Additional output populated by modules, intended to be
* displayed after the main title tag that appears in the template.
*
* Headings should be used on navigation menus that consistently appear on
* multiple pages. When this menu block's label is configured to not be
* displayed, it is automatically made invisible using the 'visually-hidden' CSS
* class, which still keeps it visible for screen-readers and assistive
* technology. Headings allow screen-reader and keyboard only users to navigate
* to or skip the links.
* See http://juicystudio.com/article/screen-readers-display-none.php and
* https://www.w3.org/TR/WCAG-TECHS/H42.html for more information.
*
* @ingroup themeable
*/
#}
{% set heading_id = attributes.id ~ '-menu'|clean_id %}
<nav role="navigation" aria-labelledby="{{ heading_id }}"{{ attributes|without('role', 'aria-labelledby') }}>
{# Label. If not displayed, we still provide it for screen readers. #}
{% if not configuration.label_display %}
{% set title_attributes = title_attributes.addClass('visually-hidden') %}
{% endif %}
{{ title_prefix }}
<h2{{ title_attributes.setAttribute('id', heading_id) }}>{{ configuration.label }}</h2>
{{ title_suffix }}
{# Menu. #}
{% block content %}
{{ content }}
{% endblock %}
</nav>

View File

@@ -0,0 +1,52 @@
{#
/**
* @file
* Default theme implementation to display a menu.
*
* Available variables:
* - menu_name: The machine name of the menu.
* - items: A nested list of menu items. Each menu item contains:
* - attributes: HTML attributes for the menu item.
* - below: The menu item child items.
* - title: The menu link title.
* - url: The menu link URL, instance of \Drupal\Core\Url
* - localized_options: Menu link localized options.
* - is_expanded: TRUE if the link has visible children within the current
* menu tree.
* - is_collapsed: TRUE if the link has children within the current menu tree
* that are not currently visible.
* - in_active_trail: TRUE if the link is in the active trail.
*
* @ingroup themeable
*/
#}
{% import _self as menus %}
{#
We call a macro which calls itself to render the full tree.
https://twig.symfony.com/doc/3.x/tags/macro.html
#}
{{ menus.menu_links(items, attributes, 0) }}
{% macro menu_links(items, attributes, menu_level) %}
{% import _self as menus %}
{% if items %}
{% if menu_level == 0 %}
<ul{{ attributes }}>
{% else %}
<ul>
{% endif %}
{% for item in items %}
<li{{ item.attributes }}>
{% if item.prefix %}
<label class="link-prefix">{{ item.prefix }}</label>
{% endif %}
{{ link(item.title, item.url) }}
{% if item.below %}
{{ menus.menu_links(item.below, attributes, menu_level + 1) }}
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
{% endmacro %}

View File

@@ -0,0 +1,22 @@
{#
/**
* @file
* Default theme implementation to display a region.
*
* Available variables:
* - content: The content for this region, typically blocks.
* - attributes: HTML attributes for the region <div>.
* - region: The name of the region variable as defined in the theme's
* .info.yml file.
*
* @see template_preprocess_region()
*
* @ingroup themeable
*/
#}
{% if content %}
<div id="burger-btn"></div>
<div{{ attributes }}>
{{ content }}
</div>
{% endif %}

View File

@@ -0,0 +1,21 @@
{#
/**
* @file
* Default theme implementation to display a region.
*
* Available variables:
* - content: The content for this region, typically blocks.
* - attributes: HTML attributes for the region <div>.
* - region: The name of the region variable as defined in the theme's
* .info.yml file.
*
* @see template_preprocess_region()
*
* @ingroup themeable
*/
#}
{% if content %}
<div{{ attributes }}>
{{ content }}
</div>
{% endif %}