Compare commits
8 Commits
11a9c33e26
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 367d8b21e9 | |||
| 8a4330894d | |||
| 4d0cfcf1ad | |||
| 8d74e1072a | |||
| 28c4a2d1b5 | |||
| b328d0a8b7 | |||
| 2e5260fed6 | |||
| 09cde37fdb |
31
.gitignore
vendored
@@ -1,24 +1,25 @@
|
||||
# Ignore directories generated by Composer
|
||||
/drush/contrib/
|
||||
/vendor/
|
||||
/web/core/
|
||||
/web/modules/contrib/
|
||||
/web/themes/contrib/
|
||||
/web/profiles/contrib/
|
||||
/web/libraries/
|
||||
/web_main/core/
|
||||
/web_main/modules/contrib/
|
||||
/web_main/themes/contrib/
|
||||
/web_main/profiles/contrib/
|
||||
/web_main/libraries/
|
||||
# Ignore sensitive information
|
||||
/web/sites/*/settings.php
|
||||
/web/sites/*/settings.local.php
|
||||
/web/sites/*/services*.yml
|
||||
/web/sites/*/salt.txt
|
||||
/web/sites/development.services.yml
|
||||
/web/sites/default/development.services.yml
|
||||
/web_main/sites/*/settings.php
|
||||
/web_main/sites/*/settings.local.php
|
||||
/web_main/sites/*/settings.dist.php
|
||||
/web_main/sites/*/services*.yml
|
||||
/web_main/sites/*/salt.txt
|
||||
/web_main/sites/development.services.yml
|
||||
/web_main/sites/default/development.services.yml
|
||||
|
||||
# Ignore Drupal's file directory
|
||||
/web/sites/*/files/
|
||||
/web_main/sites/*/files/
|
||||
|
||||
# Ignore SimpleTest multi-site environment.
|
||||
/web/sites/simpletest
|
||||
/web_main/sites/simpletest
|
||||
|
||||
# Ignore files generated by PhpStorm
|
||||
/.idea/
|
||||
@@ -43,5 +44,7 @@ node_modules/
|
||||
/update.php
|
||||
/web.config
|
||||
|
||||
/web/.vscode/*
|
||||
/web_main/.vscode/*
|
||||
.vscode/*
|
||||
|
||||
/log
|
||||
4
.gitmodules
vendored
@@ -1,3 +1,3 @@
|
||||
[submodule "web/profiles/drupal-starterkit-profile"]
|
||||
path = web/profiles/drupal-starterkit-profile
|
||||
[submodule "web_main/profiles/drupal-starterkit-profile"]
|
||||
path = web_main/profiles/drupal-starterkit-profile
|
||||
url = https://figureslibres.io/gogs/bachir/drupal-starterkit-profile.git
|
||||
|
||||
@@ -42,35 +42,35 @@
|
||||
"extra": {
|
||||
"drupal-scaffold": {
|
||||
"locations": {
|
||||
"web-root": "web/"
|
||||
"web-root": "web_main/"
|
||||
}
|
||||
},
|
||||
"installer-paths": {
|
||||
"web/core": [
|
||||
"web_main/core": [
|
||||
"type:drupal-core"
|
||||
],
|
||||
"web/libraries/{$name}": [
|
||||
"web_main/libraries/{$name}": [
|
||||
"type:drupal-library"
|
||||
],
|
||||
"web/modules/contrib/{$name}": [
|
||||
"web_main/modules/contrib/{$name}": [
|
||||
"type:drupal-module"
|
||||
],
|
||||
"web/profiles/contrib/{$name}": [
|
||||
"web_main/profiles/contrib/{$name}": [
|
||||
"type:drupal-profile"
|
||||
],
|
||||
"web/themes/contrib/{$name}": [
|
||||
"web_main/themes/contrib/{$name}": [
|
||||
"type:drupal-theme"
|
||||
],
|
||||
"drush/Commands/contrib/{$name}": [
|
||||
"type:drupal-drush"
|
||||
],
|
||||
"web/modules/custom/{$name}": [
|
||||
"web_main/modules/custom/{$name}": [
|
||||
"type:drupal-custom-module"
|
||||
],
|
||||
"web/profiles/custom/{$name}": [
|
||||
"web_main/profiles/custom/{$name}": [
|
||||
"type:drupal-custom-profile"
|
||||
],
|
||||
"web/themes/custom/{$name}": [
|
||||
"web_main/themes/custom/{$name}": [
|
||||
"type:drupal-custom-theme"
|
||||
]
|
||||
},
|
||||
@@ -97,7 +97,7 @@
|
||||
},
|
||||
"merge-plugin": {
|
||||
"include": [
|
||||
"web/profiles/drupal-starterkit-profile/composer.json"
|
||||
"web_main/profiles/drupal-starterkit-profile/composer.json"
|
||||
],
|
||||
"recurse": true,
|
||||
"replace": false,
|
||||
|
||||
454
composer.lock
generated
21
config/sync/block.block.mathallo_formulairederecherche.yml
Normal file
@@ -0,0 +1,21 @@
|
||||
uuid: 555155e0-e81b-4efd-8ad3-2edce0f4eaa2
|
||||
langcode: fr
|
||||
status: true
|
||||
dependencies:
|
||||
module:
|
||||
- search
|
||||
theme:
|
||||
- mathallo
|
||||
id: mathallo_formulairederecherche
|
||||
theme: mathallo
|
||||
region: header_left
|
||||
weight: -1
|
||||
provider: null
|
||||
plugin: search_form_block
|
||||
settings:
|
||||
id: search_form_block
|
||||
label: 'Formulaire de recherche'
|
||||
label_display: '0'
|
||||
provider: search
|
||||
page_id: node_search
|
||||
visibility: { }
|
||||
23
config/sync/block.block.mathallo_identitedusite.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
uuid: fe237667-cfc0-4c01-866d-e65e7742b644
|
||||
langcode: fr
|
||||
status: true
|
||||
dependencies:
|
||||
module:
|
||||
- system
|
||||
theme:
|
||||
- mathallo
|
||||
id: mathallo_identitedusite
|
||||
theme: mathallo
|
||||
region: header_center
|
||||
weight: -1
|
||||
provider: null
|
||||
plugin: system_branding_block
|
||||
settings:
|
||||
id: system_branding_block
|
||||
label: 'Identité du site'
|
||||
label_display: '0'
|
||||
provider: system
|
||||
use_site_logo: false
|
||||
use_site_name: true
|
||||
use_site_slogan: false
|
||||
visibility: { }
|
||||
34
config/sync/block.block.mathallo_navigationprincipale.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
uuid: 7c3c7ef7-6b0a-4ae6-8bf1-339e26ce01dd
|
||||
langcode: fr
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- system.menu.main
|
||||
module:
|
||||
- menu_block
|
||||
theme:
|
||||
- mathallo
|
||||
id: mathallo_navigationprincipale
|
||||
theme: mathallo
|
||||
region: header_right
|
||||
weight: -1
|
||||
provider: null
|
||||
plugin: 'menu_block:main'
|
||||
settings:
|
||||
id: 'menu_block:main'
|
||||
label: 'Navigation principale'
|
||||
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: false
|
||||
parent: 'main:'
|
||||
render_parent: false
|
||||
suggestion: main
|
||||
hide_on_nonactive: false
|
||||
visibility: { }
|
||||
34
config/sync/block.block.mathallo_navigationprincipale_2.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
uuid: fa6406a2-d0b2-4f16-90d8-7bfdb4199ab4
|
||||
langcode: fr
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- system.menu.main
|
||||
module:
|
||||
- menu_block
|
||||
theme:
|
||||
- mathallo
|
||||
id: mathallo_navigationprincipale_2
|
||||
theme: mathallo
|
||||
region: footer
|
||||
weight: 0
|
||||
provider: null
|
||||
plugin: 'menu_block:main'
|
||||
settings:
|
||||
id: 'menu_block:main'
|
||||
label: 'Navigation principale'
|
||||
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: false
|
||||
parent: 'main:'
|
||||
render_parent: false
|
||||
suggestion: main
|
||||
hide_on_nonactive: false
|
||||
visibility: { }
|
||||
@@ -74,6 +74,7 @@ module:
|
||||
persistent_login: 0
|
||||
redis: 0
|
||||
responsive_image: 0
|
||||
search: 0
|
||||
search_api: 0
|
||||
search_api_db: 0
|
||||
smart_trim: 0
|
||||
@@ -100,4 +101,6 @@ module:
|
||||
theme:
|
||||
seven: 0
|
||||
adminimal_theme: 0
|
||||
stark: 0
|
||||
mathallo: 0
|
||||
profile: figli_starter_kit
|
||||
|
||||
22
config/sync/pathauto.pattern.static.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
uuid: 7edda77d-9bf9-4311-8e98-3ffcf44d7017
|
||||
langcode: fr
|
||||
status: true
|
||||
dependencies:
|
||||
module:
|
||||
- node
|
||||
id: static
|
||||
label: static
|
||||
type: 'canonical_entities:node'
|
||||
pattern: '/[node:title]'
|
||||
selection_criteria:
|
||||
b031d977-2792-49d3-b66a-7b869c59b51c:
|
||||
id: 'entity_bundle:node'
|
||||
negate: false
|
||||
uuid: b031d977-2792-49d3-b66a-7b869c59b51c
|
||||
context_mapping:
|
||||
node: node
|
||||
bundles:
|
||||
static: static
|
||||
selection_logic: and
|
||||
weight: -5
|
||||
relationships: { }
|
||||
14
config/sync/search.page.help_search.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
uuid: 676bfdd2-7ad8-47f6-a482-7f4936f4e1b5
|
||||
langcode: fr
|
||||
status: true
|
||||
dependencies:
|
||||
module:
|
||||
- help
|
||||
_core:
|
||||
default_config_hash: RZ-bcSekNSsAbIPLW7Gmyd3uUjIOSrPvnb8RCCZYJm8
|
||||
id: help_search
|
||||
label: Aide
|
||||
path: help
|
||||
weight: 0
|
||||
plugin: help_search
|
||||
configuration: { }
|
||||
15
config/sync/search.page.node_search.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
uuid: d24f3825-3fd3-4017-aa34-2c1d4ac65b47
|
||||
langcode: fr
|
||||
status: true
|
||||
dependencies:
|
||||
module:
|
||||
- node
|
||||
_core:
|
||||
default_config_hash: 97tvtzGOa8_flb22CzSjgtm_YkiGMHvEBO-6q2K9V_U
|
||||
id: node_search
|
||||
label: Contenu
|
||||
path: node
|
||||
weight: -10
|
||||
plugin: node_search
|
||||
configuration:
|
||||
rankings: { }
|
||||
14
config/sync/search.page.user_search.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
uuid: e77baf8b-1675-4dcc-9b80-3bde5658917b
|
||||
langcode: fr
|
||||
status: true
|
||||
dependencies:
|
||||
module:
|
||||
- user
|
||||
_core:
|
||||
default_config_hash: k3aUaZXGDuhkek2TZIee0PApOPTvYZLadziekdyHA5A
|
||||
id: user_search
|
||||
label: Utilisateurs
|
||||
path: user
|
||||
weight: 0
|
||||
plugin: user_search
|
||||
configuration: { }
|
||||
22
config/sync/search.settings.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
_core:
|
||||
default_config_hash: hvVxL1G-ZCxaq32IZws0YsfuhvaDiQE_np-0g35KjUk
|
||||
and_or_limit: 7
|
||||
default_page: node_search
|
||||
index:
|
||||
cron_limit: 100
|
||||
overlap_cjk: true
|
||||
minimum_word_size: 3
|
||||
tag_weights:
|
||||
h1: 25
|
||||
h2: 18
|
||||
h3: 15
|
||||
h4: 14
|
||||
h5: 9
|
||||
h6: 6
|
||||
u: 3
|
||||
b: 3
|
||||
i: 3
|
||||
strong: 3
|
||||
em: 3
|
||||
a: 10
|
||||
logging: false
|
||||
37
config/sync/search_api.index.contents.yml
Normal file
@@ -0,0 +1,37 @@
|
||||
uuid: 41dd5bd9-1f15-4977-b77e-40d20befda4d
|
||||
langcode: fr
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- search_api.server.db
|
||||
module:
|
||||
- node
|
||||
id: contents
|
||||
name: contents
|
||||
description: ''
|
||||
read_only: false
|
||||
field_settings: { }
|
||||
datasource_settings:
|
||||
'entity:node':
|
||||
bundles:
|
||||
default: true
|
||||
selected: { }
|
||||
languages:
|
||||
default: true
|
||||
selected: { }
|
||||
processor_settings:
|
||||
add_url: { }
|
||||
aggregated_field: { }
|
||||
custom_value: { }
|
||||
entity_type: { }
|
||||
language_with_fallback: { }
|
||||
rendered_item: { }
|
||||
tracker_settings:
|
||||
default:
|
||||
indexing_order: fifo
|
||||
options:
|
||||
cron_limit: 50
|
||||
delete_on_fail: true
|
||||
index_directly: true
|
||||
track_changes_in_references: true
|
||||
server: db
|
||||
15
config/sync/search_api.server.db.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
uuid: 0bd3e228-d299-4f90-9dfe-cb81622a784f
|
||||
langcode: fr
|
||||
status: true
|
||||
dependencies:
|
||||
module:
|
||||
- search_api_db
|
||||
id: db
|
||||
name: db
|
||||
description: ''
|
||||
backend: search_api_db
|
||||
backend_config:
|
||||
database: 'default:default'
|
||||
min_chars: 2
|
||||
matching: partial
|
||||
phrase: bigram
|
||||
@@ -8,7 +8,7 @@ slogan: ''
|
||||
page:
|
||||
403: ''
|
||||
404: ''
|
||||
front: /user/login
|
||||
front: /node/1
|
||||
admin_compact_mode: false
|
||||
weight_select_max: 100
|
||||
default_langcode: fr
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
_core:
|
||||
default_config_hash: TpdA4rsOBAawnqeon9A-Ooht_4VO3hHKib79xyHcTyg
|
||||
admin: adminimal_theme
|
||||
langcode: fr
|
||||
admin: adminimal_theme
|
||||
default: mathallo
|
||||
|
||||
@@ -4,6 +4,7 @@ status: true
|
||||
dependencies:
|
||||
module:
|
||||
- devel
|
||||
- search
|
||||
- system
|
||||
_core:
|
||||
default_config_hash: jyuRv_5UazPqBsQ9L4kDkcVvxtGr0WytAUoWf1LhqOk
|
||||
@@ -14,3 +15,4 @@ is_admin: false
|
||||
permissions:
|
||||
- 'access content'
|
||||
- 'access devel information'
|
||||
- 'search content'
|
||||
|
||||
@@ -4,6 +4,7 @@ status: true
|
||||
dependencies:
|
||||
module:
|
||||
- devel
|
||||
- search
|
||||
- system
|
||||
_core:
|
||||
default_config_hash: OVp5431n1LmiRh_QaOpDS1hEEFvtjRqisASIU0tYIwo
|
||||
@@ -14,3 +15,4 @@ is_admin: false
|
||||
permissions:
|
||||
- 'access content'
|
||||
- 'access devel information'
|
||||
- 'search content'
|
||||
|
||||
5
web_main/modules/custom/decoupled/decoupled.info.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
name: 'decoupled'
|
||||
type: module
|
||||
description: 'helpers for progressive decoupling'
|
||||
core_version_requirement: ^8.8 || ^9.2 || ^10.2
|
||||
package: 'mathallo'
|
||||
107
web_main/modules/custom/decoupled/decoupled.module
Normal file
@@ -0,0 +1,107 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains decoupled.module.
|
||||
*/
|
||||
|
||||
use Drupal\Core\Routing\RouteMatchInterface;
|
||||
// use Drupal\pathauto\PathautoPatternInterface;
|
||||
// use Drupal\pathauto\PathautoPatternManagerInterface;
|
||||
use Drupal\pathauto\Entity\PathautoPattern;
|
||||
|
||||
/**
|
||||
* Implements hook_help().
|
||||
*/
|
||||
function decoupled_help($route_name, RouteMatchInterface $route_match) {
|
||||
switch ($route_name) {
|
||||
// Main module help for the decoupled module.
|
||||
case 'help.page.decoupled':
|
||||
$output = '';
|
||||
$output .= '<h3>' . t('About') . '</h3>';
|
||||
$output .= '<p>' . t('helpers for progressive decoupling') . '</p>';
|
||||
return $output;
|
||||
|
||||
default:
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Implements hook_page_attachments().
|
||||
* @param array $attachments
|
||||
*/
|
||||
function decoupled_page_attachments(array &$attachments) {
|
||||
$redirect = false;
|
||||
$current_path = \Drupal::service('path.current')->getPath();
|
||||
$route_name = \Drupal::routeMatch()->getRouteName();
|
||||
$current_language = \Drupal::languageManager()->getCurrentLanguage()->getId();
|
||||
$is_front = \Drupal::service('path.matcher')->isFrontPage();
|
||||
if (!$is_front) {
|
||||
$redirect = true;
|
||||
}
|
||||
if(preg_match('/^\/?user\/.*/', $current_path)){
|
||||
$redirect = false;
|
||||
}
|
||||
|
||||
$entity_type = null;
|
||||
$entity_bundle = null;
|
||||
$entity_id = null;
|
||||
$entity_uuid = null;
|
||||
$base_alias = null;
|
||||
|
||||
foreach (['node', 'taxonomy_term'] as $type) {
|
||||
$entity = \Drupal::routeMatch()->getParameter($type);
|
||||
if($entity){
|
||||
$entity_type = $type;
|
||||
$entity_bundle = $entity->bundle();
|
||||
$entity_id = $entity->id();
|
||||
$entity_uuid = $entity->uuid();
|
||||
|
||||
// $pathauto_patterns = \Drupal::entityTypeManager()->getStorage('pathauto_pattern')->loadByProperties(['type' => "canonical_entities:".$entity_type]);
|
||||
// foreach ($pathauto_patterns as $id => $pattern) {
|
||||
// $conditions = $pattern->getSelectionConditions();
|
||||
// $condition_config = $conditions->getConfiguration();
|
||||
// foreach ($condition_config as $key => $config) {
|
||||
// $bundles = array_keys($config['bundles']);
|
||||
// if (in_array($entity_bundle, $bundles)) {
|
||||
// $motif = $pattern->getPattern();
|
||||
// preg_match('/(\/.+)+\/\[[^]]+\]/', $motif, $matches);
|
||||
// $base_alias = $matches[1];
|
||||
// break 2;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// route_parameters:'".json_encode($route_parameters)."',\n
|
||||
$js_str = "var drupalDecoupled = {\n
|
||||
sys_path:'".$current_path."',\n
|
||||
route_name:'".$route_name."',\n
|
||||
is_front:".($is_front ? 'true':'false').",\n
|
||||
base_alias:'".$base_alias."',\n
|
||||
redirect:".($redirect ? 'true':'false').",\n
|
||||
lang_code:'".$current_language."',\n
|
||||
entity_type:'".$entity_type."',\n
|
||||
entity_bundle:'".$entity_bundle."',\n
|
||||
entity_id:'".$entity_id."',\n
|
||||
entity_uuid:'".$entity_uuid."',\n
|
||||
};";
|
||||
|
||||
$attachments['#attached']['html_head'][] = [
|
||||
[
|
||||
'#type' => 'html_tag',
|
||||
'#tag' => 'script',
|
||||
'#value' => $js_str,
|
||||
'#weight' => -999,
|
||||
'#group' => 'decoupled'
|
||||
],
|
||||
// A key, to make it possible to recognize this HTML element when altering.
|
||||
'decoupled',
|
||||
];
|
||||
}
|
||||
1
web_main/themes/custom/mathallo/assets/dist/main.css
vendored
Normal file
41
web_main/themes/custom/mathallo/assets/dist/main.js
vendored
Normal file
|
After Width: | Height: | Size: 950 KiB |
|
After Width: | Height: | Size: 985 KiB |
|
After Width: | Height: | Size: 1.0 MiB |
|
After Width: | Height: | Size: 1.0 MiB |
|
After Width: | Height: | Size: 1.0 MiB |
|
After Width: | Height: | Size: 1.0 MiB |
|
After Width: | Height: | Size: 980 KiB |
|
After Width: | Height: | Size: 1.0 MiB |
|
After Width: | Height: | Size: 1.0 MiB |
|
After Width: | Height: | Size: 954 KiB |
|
After Width: | Height: | Size: 1.0 MiB |