Compare commits

..

No commits in common. "2ca44f2550de2a6cc55be4b945e05f4ed3ff465b" and "8b2938de0e7f7f0eea000396c9475065d6b7ce8e" have entirely different histories.

18 changed files with 679 additions and 519 deletions

190
composer.lock generated
View File

@ -2369,17 +2369,17 @@
}, },
{ {
"name": "drupal/block_class", "name": "drupal/block_class",
"version": "2.0.12", "version": "3.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://git.drupalcode.org/project/block_class.git", "url": "https://git.drupalcode.org/project/block_class.git",
"reference": "2.0.12" "reference": "3.0.0"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://ftp.drupal.org/files/projects/block_class-2.0.12.zip", "url": "https://ftp.drupal.org/files/projects/block_class-3.0.0.zip",
"reference": "2.0.12", "reference": "3.0.0",
"shasum": "cc3945f8038bcc9bb48eff897df332aa952d62e6" "shasum": "41993c9ee6b925ec30e927cb557bafd9d5c05461"
}, },
"require": { "require": {
"drupal/core": "^9 || ^10 || ^11" "drupal/core": "^9 || ^10 || ^11"
@ -2387,8 +2387,8 @@
"type": "drupal-module", "type": "drupal-module",
"extra": { "extra": {
"drupal": { "drupal": {
"version": "2.0.12", "version": "3.0.0",
"datestamp": "1723243074", "datestamp": "1723241676",
"security-coverage": { "security-coverage": {
"status": "covered", "status": "covered",
"message": "Covered by Drupal's security advisory policy" "message": "Covered by Drupal's security advisory policy"
@ -2692,27 +2692,30 @@
}, },
{ {
"name": "drupal/config_ignore", "name": "drupal/config_ignore",
"version": "2.4.0", "version": "3.3.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://git.drupalcode.org/project/config_ignore.git", "url": "https://git.drupalcode.org/project/config_ignore.git",
"reference": "8.x-2.4" "reference": "8.x-3.3"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://ftp.drupal.org/files/projects/config_ignore-8.x-2.4.zip", "url": "https://ftp.drupal.org/files/projects/config_ignore-8.x-3.3.zip",
"reference": "8.x-2.4", "reference": "8.x-3.3",
"shasum": "e0e45dde2d6927c5d26de59f352792fb6cf26554" "shasum": "4446811ecb023820a57c227d35c034e0d4363a70"
}, },
"require": { "require": {
"drupal/config_filter": "^1 || ^2", "drupal/core": "^8.8 || ^9 || ^10 || ^11"
"drupal/core": "^8 || ^9 || ^10" },
"require-dev": {
"drupal/config_filter": "^1.8||^2.2",
"drush/drush": "^10 || ^11 || ^12"
}, },
"type": "drupal-module", "type": "drupal-module",
"extra": { "extra": {
"drupal": { "drupal": {
"version": "8.x-2.4", "version": "8.x-3.3",
"datestamp": "1676045435", "datestamp": "1713299496",
"security-coverage": { "security-coverage": {
"status": "covered", "status": "covered",
"message": "Covered by Drupal's security advisory policy" "message": "Covered by Drupal's security advisory policy"
@ -2740,12 +2743,11 @@
"homepage": "https://www.drupal.org/user/413139" "homepage": "https://www.drupal.org/user/413139"
} }
], ],
"description": "Ignore certain configuration during import.", "description": "Ignore certain configuration during import and export.",
"homepage": "http://drupal.org/project/config_ignore", "homepage": "http://drupal.org/project/config_ignore",
"support": { "support": {
"source": "https://git.drupalcode.org/project/config_ignore", "source": "https://git.drupalcode.org/project/config_ignore",
"issues": "https://drupal.org/project/config_ignore", "issues": "http://drupal.org/project/config_ignore"
"irc": "irc://irc.freenode.org/drupal-contribute"
} }
}, },
{ {
@ -4369,26 +4371,26 @@
}, },
{ {
"name": "drupal/extlink", "name": "drupal/extlink",
"version": "1.7.0", "version": "2.0.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://git.drupalcode.org/project/extlink.git", "url": "https://git.drupalcode.org/project/extlink.git",
"reference": "8.x-1.7" "reference": "2.0.4"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://ftp.drupal.org/files/projects/extlink-8.x-1.7.zip", "url": "https://ftp.drupal.org/files/projects/extlink-2.0.4.zip",
"reference": "8.x-1.7", "reference": "2.0.4",
"shasum": "38650688b5a58496db59f40b2a7f36c4bedcbfb4" "shasum": "0331ef3457d3a1701f01e04f8256bdd823ea3512"
}, },
"require": { "require": {
"drupal/core": "^8 || ^9 || ^10" "drupal/core": "^10 || ^11"
}, },
"type": "drupal-module", "type": "drupal-module",
"extra": { "extra": {
"drupal": { "drupal": {
"version": "8.x-1.7", "version": "2.0.4",
"datestamp": "1665770295", "datestamp": "1732565828",
"security-coverage": { "security-coverage": {
"status": "covered", "status": "covered",
"message": "Covered by Drupal's security advisory policy" "message": "Covered by Drupal's security advisory policy"
@ -5877,17 +5879,17 @@
}, },
{ {
"name": "drupal/leaflet", "name": "drupal/leaflet",
"version": "10.2.42", "version": "10.2.41",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://git.drupalcode.org/project/leaflet.git", "url": "https://git.drupalcode.org/project/leaflet.git",
"reference": "10.2.42" "reference": "10.2.41"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://ftp.drupal.org/files/projects/leaflet-10.2.42.zip", "url": "https://ftp.drupal.org/files/projects/leaflet-10.2.41.zip",
"reference": "10.2.42", "reference": "10.2.41",
"shasum": "7480d4b3c5ea8952191b9fea9b55528ad2ac9f0b" "shasum": "aec6763b23e035d2c92b7f8374ac4f7626e26756"
}, },
"require": { "require": {
"drupal/core": "^9.3 || ^10 || ^11", "drupal/core": "^9.3 || ^10 || ^11",
@ -5896,8 +5898,8 @@
"type": "drupal-module", "type": "drupal-module",
"extra": { "extra": {
"drupal": { "drupal": {
"version": "10.2.42", "version": "10.2.41",
"datestamp": "1740753317", "datestamp": "1739919738",
"security-coverage": { "security-coverage": {
"status": "covered", "status": "covered",
"message": "Covered by Drupal's security advisory policy" "message": "Covered by Drupal's security advisory policy"
@ -6566,7 +6568,7 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://git.drupalcode.org/project/menu_block.git", "url": "https://git.drupalcode.org/project/menu_block.git",
"reference": "217779758c6b6c729155595fc90e86375ca6bc5b" "reference": "b798eff46f2ee54dbb4510cb0cbb873cc7f1aacf"
}, },
"require": { "require": {
"drupal/core": "^10.1 || ^11" "drupal/core": "^10.1 || ^11"
@ -6577,8 +6579,8 @@
"dev-1.x": "1.x-dev" "dev-1.x": "1.x-dev"
}, },
"drupal": { "drupal": {
"version": "8.x-1.13+8-dev", "version": "8.x-1.13+6-dev",
"datestamp": "1740622280", "datestamp": "1739495736",
"security-coverage": { "security-coverage": {
"status": "not-covered", "status": "not-covered",
"message": "Dev releases are not covered by Drupal security advisories." "message": "Dev releases are not covered by Drupal security advisories."
@ -8246,20 +8248,21 @@
}, },
{ {
"name": "drupal/views_bulk_edit", "name": "drupal/views_bulk_edit",
"version": "2.9.0", "version": "3.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://git.drupalcode.org/project/views_bulk_edit.git", "url": "https://git.drupalcode.org/project/views_bulk_edit.git",
"reference": "8.x-2.9" "reference": "3.0.0"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://ftp.drupal.org/files/projects/views_bulk_edit-8.x-2.9.zip", "url": "https://ftp.drupal.org/files/projects/views_bulk_edit-3.0.0.zip",
"reference": "8.x-2.9", "reference": "3.0.0",
"shasum": "db45a8cc9ac629859374b24974eafcef257e4387" "shasum": "3b16079aa95fb4834561fcfd1197cce73b7f4b88"
}, },
"require": { "require": {
"drupal/core": "^9.4 || ^10" "drupal/core": "^9.4 || ^10 || ^11",
"php": ">=8.1"
}, },
"require-dev": { "require-dev": {
"drupal/views_bulk_operations": "~4.2.4" "drupal/views_bulk_operations": "~4.2.4"
@ -8270,8 +8273,8 @@
"type": "drupal-module", "type": "drupal-module",
"extra": { "extra": {
"drupal": { "drupal": {
"version": "8.x-2.9", "version": "3.0.0",
"datestamp": "1690222256", "datestamp": "1725358398",
"security-coverage": { "security-coverage": {
"status": "covered", "status": "covered",
"message": "Covered by Drupal's security advisory policy" "message": "Covered by Drupal's security advisory policy"
@ -11103,16 +11106,16 @@
}, },
{ {
"name": "symfony/dependency-injection", "name": "symfony/dependency-injection",
"version": "v6.4.19", "version": "v6.4.16",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/dependency-injection.git", "url": "https://github.com/symfony/dependency-injection.git",
"reference": "b343c3b2f1539fe41331657b37d5c96c1d1ea842" "reference": "7a379d8871f6a36f01559c14e11141cc02eb8dc8"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/dependency-injection/zipball/b343c3b2f1539fe41331657b37d5c96c1d1ea842", "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/7a379d8871f6a36f01559c14e11141cc02eb8dc8",
"reference": "b343c3b2f1539fe41331657b37d5c96c1d1ea842", "reference": "7a379d8871f6a36f01559c14e11141cc02eb8dc8",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -11164,7 +11167,7 @@
"description": "Allows you to standardize and centralize the way objects are constructed in your application", "description": "Allows you to standardize and centralize the way objects are constructed in your application",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/dependency-injection/tree/v6.4.19" "source": "https://github.com/symfony/dependency-injection/tree/v6.4.16"
}, },
"funding": [ "funding": [
{ {
@ -11180,7 +11183,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-02-20T10:02:49+00:00" "time": "2024-11-25T14:52:46+00:00"
}, },
{ {
"name": "symfony/deprecation-contracts", "name": "symfony/deprecation-contracts",
@ -11251,16 +11254,16 @@
}, },
{ {
"name": "symfony/error-handler", "name": "symfony/error-handler",
"version": "v6.4.19", "version": "v6.4.18",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/error-handler.git", "url": "https://github.com/symfony/error-handler.git",
"reference": "3d4e55cd2b8f1979a65eba9ab749d6466c316f71" "reference": "e8d3b5b1975e67812a54388b1ba8e9ec28eb770e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/error-handler/zipball/3d4e55cd2b8f1979a65eba9ab749d6466c316f71", "url": "https://api.github.com/repos/symfony/error-handler/zipball/e8d3b5b1975e67812a54388b1ba8e9ec28eb770e",
"reference": "3d4e55cd2b8f1979a65eba9ab749d6466c316f71", "reference": "e8d3b5b1975e67812a54388b1ba8e9ec28eb770e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -11306,7 +11309,7 @@
"description": "Provides tools to manage errors and ease debugging PHP code", "description": "Provides tools to manage errors and ease debugging PHP code",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/error-handler/tree/v6.4.19" "source": "https://github.com/symfony/error-handler/tree/v6.4.18"
}, },
"funding": [ "funding": [
{ {
@ -11322,7 +11325,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-02-02T20:16:33+00:00" "time": "2025-01-06T09:38:16+00:00"
}, },
{ {
"name": "symfony/event-dispatcher", "name": "symfony/event-dispatcher",
@ -11689,16 +11692,16 @@
}, },
{ {
"name": "symfony/http-kernel", "name": "symfony/http-kernel",
"version": "v6.4.19", "version": "v6.4.18",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/http-kernel.git", "url": "https://github.com/symfony/http-kernel.git",
"reference": "88f2c9f7feff86bb7b9105c5151bc2c1404cd64c" "reference": "fca7197bfe9e99dfae7fb1ad3f7f5bd9ef80e1b7"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/88f2c9f7feff86bb7b9105c5151bc2c1404cd64c", "url": "https://api.github.com/repos/symfony/http-kernel/zipball/fca7197bfe9e99dfae7fb1ad3f7f5bd9ef80e1b7",
"reference": "88f2c9f7feff86bb7b9105c5151bc2c1404cd64c", "reference": "fca7197bfe9e99dfae7fb1ad3f7f5bd9ef80e1b7",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -11783,7 +11786,7 @@
"description": "Provides a structured process for converting a Request into a Response", "description": "Provides a structured process for converting a Request into a Response",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/http-kernel/tree/v6.4.19" "source": "https://github.com/symfony/http-kernel/tree/v6.4.18"
}, },
"funding": [ "funding": [
{ {
@ -11799,7 +11802,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-02-26T10:51:37+00:00" "time": "2025-01-29T07:25:58+00:00"
}, },
{ {
"name": "symfony/mailer", "name": "symfony/mailer",
@ -11883,16 +11886,16 @@
}, },
{ {
"name": "symfony/mime", "name": "symfony/mime",
"version": "v6.4.19", "version": "v6.4.18",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/mime.git", "url": "https://github.com/symfony/mime.git",
"reference": "ac537b6c55ccc2c749f3c979edfa9ec14aaed4f3" "reference": "917d77981eb1ea963608d5cda4d9c0cf72eaa68e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/mime/zipball/ac537b6c55ccc2c749f3c979edfa9ec14aaed4f3", "url": "https://api.github.com/repos/symfony/mime/zipball/917d77981eb1ea963608d5cda4d9c0cf72eaa68e",
"reference": "ac537b6c55ccc2c749f3c979edfa9ec14aaed4f3", "reference": "917d77981eb1ea963608d5cda4d9c0cf72eaa68e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -11948,7 +11951,7 @@
"mime-type" "mime-type"
], ],
"support": { "support": {
"source": "https://github.com/symfony/mime/tree/v6.4.19" "source": "https://github.com/symfony/mime/tree/v6.4.18"
}, },
"funding": [ "funding": [
{ {
@ -11964,7 +11967,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-02-17T21:23:52+00:00" "time": "2025-01-23T13:10:52+00:00"
}, },
{ {
"name": "symfony/polyfill-ctype", "name": "symfony/polyfill-ctype",
@ -12601,16 +12604,16 @@
}, },
{ {
"name": "symfony/process", "name": "symfony/process",
"version": "v6.4.19", "version": "v6.4.15",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/process.git", "url": "https://github.com/symfony/process.git",
"reference": "7a1c12e87b08ec9c97abdd188c9b3f5a40e37fc3" "reference": "3cb242f059c14ae08591c5c4087d1fe443564392"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/process/zipball/7a1c12e87b08ec9c97abdd188c9b3f5a40e37fc3", "url": "https://api.github.com/repos/symfony/process/zipball/3cb242f059c14ae08591c5c4087d1fe443564392",
"reference": "7a1c12e87b08ec9c97abdd188c9b3f5a40e37fc3", "reference": "3cb242f059c14ae08591c5c4087d1fe443564392",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -12642,7 +12645,7 @@
"description": "Executes commands in sub-processes", "description": "Executes commands in sub-processes",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/process/tree/v6.4.19" "source": "https://github.com/symfony/process/tree/v6.4.15"
}, },
"funding": [ "funding": [
{ {
@ -12658,7 +12661,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-02-04T13:35:48+00:00" "time": "2024-11-06T14:19:14+00:00"
}, },
{ {
"name": "symfony/psr-http-message-bridge", "name": "symfony/psr-http-message-bridge",
@ -12828,16 +12831,16 @@
}, },
{ {
"name": "symfony/serializer", "name": "symfony/serializer",
"version": "v6.4.19", "version": "v6.4.18",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/serializer.git", "url": "https://github.com/symfony/serializer.git",
"reference": "a221b2f6066af304d760cff7a26f201b4fab4aef" "reference": "6ad986f62276da4c8c69754decfaa445a89cb6e3"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/serializer/zipball/a221b2f6066af304d760cff7a26f201b4fab4aef", "url": "https://api.github.com/repos/symfony/serializer/zipball/6ad986f62276da4c8c69754decfaa445a89cb6e3",
"reference": "a221b2f6066af304d760cff7a26f201b4fab4aef", "reference": "6ad986f62276da4c8c69754decfaa445a89cb6e3",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -12906,7 +12909,7 @@
"description": "Handles serializing and deserializing data structures, including object graphs, into array structures or other formats like XML and JSON.", "description": "Handles serializing and deserializing data structures, including object graphs, into array structures or other formats like XML and JSON.",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/serializer/tree/v6.4.19" "source": "https://github.com/symfony/serializer/tree/v6.4.18"
}, },
"funding": [ "funding": [
{ {
@ -12922,7 +12925,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-02-24T08:42:36+00:00" "time": "2025-01-28T18:47:02+00:00"
}, },
{ {
"name": "symfony/service-contracts", "name": "symfony/service-contracts",
@ -13173,16 +13176,16 @@
}, },
{ {
"name": "symfony/validator", "name": "symfony/validator",
"version": "v6.4.19", "version": "v6.4.18",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/validator.git", "url": "https://github.com/symfony/validator.git",
"reference": "f3e853dffe7c5db675686b8216d6d890dad8c885" "reference": "ce20367d07b2592202e9c266b16a93fa50145207"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/validator/zipball/f3e853dffe7c5db675686b8216d6d890dad8c885", "url": "https://api.github.com/repos/symfony/validator/zipball/ce20367d07b2592202e9c266b16a93fa50145207",
"reference": "f3e853dffe7c5db675686b8216d6d890dad8c885", "reference": "ce20367d07b2592202e9c266b16a93fa50145207",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -13250,7 +13253,7 @@
"description": "Provides tools to validate values", "description": "Provides tools to validate values",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/validator/tree/v6.4.19" "source": "https://github.com/symfony/validator/tree/v6.4.18"
}, },
"funding": [ "funding": [
{ {
@ -13266,7 +13269,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-02-19T13:12:02+00:00" "time": "2025-01-27T16:05:44+00:00"
}, },
{ {
"name": "symfony/var-dumper", "name": "symfony/var-dumper",
@ -13355,16 +13358,16 @@
}, },
{ {
"name": "symfony/var-exporter", "name": "symfony/var-exporter",
"version": "v6.4.19", "version": "v6.4.13",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/var-exporter.git", "url": "https://github.com/symfony/var-exporter.git",
"reference": "be6e71b0c257884c1107313de5d247741cfea172" "reference": "0f605f72a363f8743001038a176eeb2a11223b51"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/var-exporter/zipball/be6e71b0c257884c1107313de5d247741cfea172", "url": "https://api.github.com/repos/symfony/var-exporter/zipball/0f605f72a363f8743001038a176eeb2a11223b51",
"reference": "be6e71b0c257884c1107313de5d247741cfea172", "reference": "0f605f72a363f8743001038a176eeb2a11223b51",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -13412,7 +13415,7 @@
"serialize" "serialize"
], ],
"support": { "support": {
"source": "https://github.com/symfony/var-exporter/tree/v6.4.19" "source": "https://github.com/symfony/var-exporter/tree/v6.4.13"
}, },
"funding": [ "funding": [
{ {
@ -13428,7 +13431,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-02-13T09:33:32+00:00" "time": "2024-09-25T14:18:03+00:00"
}, },
{ {
"name": "symfony/yaml", "name": "symfony/yaml",
@ -13754,7 +13757,6 @@
"drupal/advanced_text_formatter": 5, "drupal/advanced_text_formatter": 5,
"drupal/bulkdelete": 20, "drupal/bulkdelete": 20,
"drupal/config_devel": 20, "drupal/config_devel": 20,
"drupal/config_ignore": 5,
"drupal/config_update": 15, "drupal/config_update": 15,
"drupal/context": 5, "drupal/context": 5,
"drupal/date_range_formatter": 20, "drupal/date_range_formatter": 20,

View File

@ -20,5 +20,4 @@ content:
weight: 0 weight: 0
region: content region: content
hidden: hidden:
field_titre: true
search_api_excerpt: true search_api_excerpt: true

View File

@ -284,7 +284,7 @@ display:
popupAnchor: popupAnchor:
x: '' x: ''
'y': '' 'y': ''
html: "<div class=\"url\">[node:url]</div>\r\n<div class=\"couleur\">[node:field_couleur]</div>" html: "<div></div>\r\n<div></div>\r\n<div></div>\r\n<div class=\"url\">[node:url]</div>\r\n<div class=\"couleur\">[node:field_couleur]</div>"
html_class: 'leaflet-map-divicon ' html_class: 'leaflet-map-divicon '
circle_marker_options: '{"radius":100,"color":"red","fillColor":"#f03","fillOpacity":0.5}' circle_marker_options: '{"radius":100,"color":"red","fillColor":"#f03","fillOpacity":0.5}'
leaflet_markercluster: leaflet_markercluster:
@ -299,7 +299,6 @@ display:
geocoder: geocoder:
control: false control: false
settings: settings:
popup: false
autocomplete: autocomplete:
placeholder: 'Search Address' placeholder: 'Search Address'
title: 'Search an Address on the Map' title: 'Search an Address on the Map'
@ -312,6 +311,7 @@ display:
min_terms: 4 min_terms: 4
delay: 800 delay: 800
zoom: 16 zoom: 16
popup: false
options: '' options: ''
map_lazy_load: map_lazy_load:
lazy_load: true lazy_load: true
@ -1195,18 +1195,7 @@ display:
defaults: defaults:
fields: false fields: false
display_description: '' display_description: ''
display_extenders: display_extenders: { }
matomo:
enabled: false
keyword_gets: ''
keyword_behavior: first
keyword_concat_separator: ' '
category_behavior: none
category_gets: ''
category_concat_separator: ' '
category_fallback: ''
category_facets: { }
category_facets_concat_separator: ', '
cache_metadata: cache_metadata:
max-age: -1 max-age: -1
contexts: contexts:

@ -1 +1 @@
Subproject commit 18c6b02464fdc76846d9ed4261a9403fb7d0dc18 Subproject commit 9eab6ebc8d0bfaede4486d8695cd9f92cfc8ddbe

View File

@ -39,9 +39,8 @@ import '../scss/main.scss'
generalListLinks, generalListLinks,
logoLink, logoLink,
mapIcons, mapIcons,
mapContainer,
} = processClickableElements(); } = processClickableElements();
const clickableElements = [...etapeListLinks, ...generalListLinks, logoLink, ...mapIcons, mapContainer]; const clickableElements = [...etapeListLinks, ...generalListLinks, logoLink, ...mapIcons];
setupMapStore(mapStore, map, settings); setupMapStore(mapStore, map, settings);

View File

@ -3,25 +3,6 @@
import { defineStore } from 'pinia'; import { defineStore } from 'pinia';
import REST from '../api/rest-axios'; import REST from '../api/rest-axios';
import { findContentByPath } from '../utils/content/findContentByPath';
import {
getCleanDate,
fetchFromRelationships,
getRelatedEtape,
} from '../utils/content/contentFetchUtils';
import {
getCarteSensible,
getTitreTexte,
getChiffresCles,
getDiaporama,
getEntretien,
getVideos,
} from '../utils/content/cleanParties';
import {
getPartenaires,
getGouvernance,
} from '../utils/content/multiItemPages';
export const useContentStore = defineStore('content', { export const useContentStore = defineStore('content', {
state: () => ({ state: () => ({
contentType: '', contentType: '',
@ -33,7 +14,7 @@ export const useContentStore = defineStore('content', {
etape_number: '', etape_number: '',
couleur: '', couleur: '',
dates: {}, dates: {},
previous: {}, previous : {},
next: {}, next: {},
vignette: {}, vignette: {},
parties: [], parties: [],
@ -49,23 +30,105 @@ export const useContentStore = defineStore('content', {
}), }),
actions: { actions: {
async fetchContentData(path) { async fetchContentData(path) {
console.log('start fetch content');
this.resetStore(false); this.resetStore(false);
const contentTypes = ['etape', 'static', 'gouvernance', 'partenaire']; const contentTypes = [ 'etape', 'static', 'gouvernance', 'partenaire' ];
try { try {
const findContentByPath = async (contentTypes, path) => {
for (let type of contentTypes) {
const response = await REST.get(`/jsonapi/node/${type}/`);
const content = response.data.data.find(content =>
content.attributes.metatag.some(tag =>
tag.tag === "link" && tag.attributes.href === path
)
);
if (content) {
console.log('content found');
return {
contentType: type,
rawContent: content,
};
}
// Handle special case for governance/partners (multiple items per page)
const pageRequested = window.location.href.split('/').pop().replace(/s?$/, '');
if (type === pageRequested
|| (type === 'gouvernance' && pageRequested === 'contact')
) {
return {
contentType: type,
rawContent: response.data.data,
};
}
}
return null;
};
const { contentType, rawContent } = await findContentByPath(contentTypes, path); const { contentType, rawContent } = await findContentByPath(contentTypes, path);
this.contentType = contentType; this.contentType = contentType;
if (this.contentType !== 'gouvernance' && this.contentType !== 'partenaire') { // console.log(`current type: ${contentType}`);
const vignettePromise = fetchFromRelationships('field_vignette', rawContent.relationships);
const partiesPromise = fetchFromRelationships('field_parties', rawContent.relationships);
let previousEtapePromise, nextEtapePromise; // TO DEBUG
const cleanContentMethod = 'original';
if (this.contentType !== 'gouvernance' && this.contentType !== 'partenaire'
&& cleanContentMethod === 'original'
) {
console.time('etape content processing');
// pageTitle
for (let tag of rawContent.attributes.metatag) {
if (tag.tag === "meta") {
this.pageTitle = tag.attributes.content;
break;
}
}
// contentTitle
this.content.contentTitle = rawContent.attributes.title;
// vignette
const vignetteFetch = await this.fetchFromRelationships('field_vignette', rawContent.relationships);
if (vignetteFetch) {
this.content.vignette = {
url: {
original: vignetteFetch.attributes.uri.url,
small: vignetteFetch.attributes.image_style_uri.content_small,
medium: vignetteFetch.attributes.image_style_uri.content_medium,
large: vignetteFetch.attributes.image_style_uri.content_large,
},
alt: rawContent.relationships.field_vignette.data.meta.alt
};
}
// liens
if (rawContent.attributes.field_liens.length) {
this.content.liens = [];
for (let lien of rawContent.attributes.field_liens) {
this.content.liens.push({
title: lien.title,
url: lien.uri,
});
}
}
// pièces jointes
if (rawContent.relationships.field_pieces_jointes.data.length) {
this.content.pieces_jointes = [];
for (let pieceJointe of rawContent.relationships.field_pieces_jointes.data) {
if (pieceJointe.meta.display) {
const uuid = pieceJointe.id;
const response = await REST.get(`/jsonapi/file/file/${uuid}`);
this.content.pieces_jointes.push({
title: pieceJointe.meta.description,
url: response.data.data.attributes.uri.url,
});
}
}
}
if (contentType === 'etape') { if (contentType === 'etape') {
// related étapes
previousEtapePromise = getRelatedEtape('previous', path);
nextEtapePromise = getRelatedEtape('next', path);
// coordinates // coordinates
this.content.coordinates = { this.content.coordinates = {
lat: rawContent.attributes.field_geofield.lat, lat: rawContent.attributes.field_geofield.lat,
@ -79,9 +142,185 @@ export const useContentStore = defineStore('content', {
this.content.couleur = rawContent.attributes.field_couleur; this.content.couleur = rawContent.attributes.field_couleur;
// dates // dates
this.content.dates = { this.content.dates = {
start: getCleanDate(rawContent.attributes.field_dates.value), start: this.getCleanDate(rawContent.attributes.field_dates.value),
end: getCleanDate(rawContent.attributes.field_dates.end_value), end: this.getCleanDate(rawContent.attributes.field_dates.end_value),
} }
// previous / next
await this.getRelatedEtape('previous', path);
await this.getRelatedEtape('next', path);
}
// parties
const fieldParties = contentType === 'etape' ? 'field_parties' : 'field_parties_static';
const partiesFetch = await this.fetchFromRelationships(fieldParties, rawContent.relationships);
console.log(this.content);
console.timeEnd('etape content processing');
if (partiesFetch) {
this.content.parties = [];
for (let partie of partiesFetch) {
const partieType = partie.type.replace(/^paragraph--/, "");
let partieContent = {
type: partieType,
};
switch (partieType) {
case 'carte_sensible':
const carteSensibleFetch = await this.fetchFromRelationships('field_image_carte', partie.relationships);
if (carteSensibleFetch) {
partieContent.carteSensible = {
url: {
original: carteSensibleFetch.attributes.uri.url,
small: carteSensibleFetch.attributes.image_style_uri.content_small,
medium: carteSensibleFetch.attributes.image_style_uri.content_medium,
large: carteSensibleFetch.attributes.image_style_uri.content_large,
xlarge: carteSensibleFetch.attributes.image_style_uri.content_x_large,
},
alt: partie.relationships.field_image_carte.data.meta.alt,
};
}
break;
case 'titre_texte':
console.time('get images from text original')
partieContent.titre = partie.attributes.field_titre;
partieContent.texte = partie.attributes.field_texte.value;
// get the resized images from the text
const imgRegex = /<img[^>]+>/g;
const uuidRegex = /data-entity-uuid="([^"]+)"/;
const imgTags = partieContent.texte.match(imgRegex);
if (imgTags) {
for (const imgTag of imgTags) {
const uuidMatch = imgTag.match(uuidRegex);
if (uuidMatch && uuidMatch[1]) {
const uuid = uuidMatch[1];
const response = await REST.get(`/jsonapi/file/file/${uuid}`);
const imagesFetch = response.data.data;
const newImgTag = imgTag
.replace(/src="[^"]+"/,`src="${imagesFetch.attributes.image_style_uri.content_medium}"`)
.replace('>',' data-large-src="' + imagesFetch.attributes.image_style_uri.content_large + '">');
partieContent.texte = partieContent.texte.replace(imgTag, newImgTag);
}
}
}
console.timeEnd('get images from text original')
break;
case 'chiffres_cles':
const chiffresClesFetch = await this.fetchFromRelationships('field_chiffres_clefs', partie.relationships);
if (chiffresClesFetch) {
partieContent.chiffresCles = [];
for (let chiffre of chiffresClesFetch) {
partieContent.chiffresCles.push({
chiffre: chiffre.attributes.field_chiffre,
description: chiffre.attributes.field_description,
});
}
}
break;
case 'diaporama':
const diaporamaFetch = await this.fetchFromRelationships('field_diaporama', partie.relationships);
if (diaporamaFetch) {
partieContent.diaporama = [];
for (let [index, image] of diaporamaFetch.entries()) {
partieContent.diaporama.push({
url: {
original: image.attributes.uri.url,
small: image.attributes.image_style_uri.content_small,
medium: image.attributes.image_style_uri.content_medium,
large: image.attributes.image_style_uri.content_large,
},
alt: partie.relationships.field_diaporama.data[index].meta.alt,
});
}
}
break;
case 'entretien':
partieContent.entretien = {};
partieContent.entretien.titre = partie.attributes.field_titre;
const personnesFetch = await this.fetchFromRelationships('field_personne_s', partie.relationships);
const questionsReponsesFetch = await this.fetchFromRelationships('field_questions_reponses', partie.relationships);
if (personnesFetch && questionsReponsesFetch) {
partieContent.entretien.personnes = [];
for (let personne of personnesFetch) {
const portraitFetch = await this.fetchFromRelationships('field_portrait', personne.relationships);
if (portraitFetch) {
partieContent.entretien.personnes.push({
portrait: {
original: portraitFetch.attributes.uri.url,
small: portraitFetch.attributes.image_style_uri.content_small,
medium: portraitFetch.attributes.image_style_uri.content_medium,
large: portraitFetch.attributes.image_style_uri.content_large,
},
alt: personne.relationships.field_portrait.data.meta.alt,
description: personne.attributes.field_description,
});
}
}
partieContent.entretien.questionsReponses = [];
for (let qr of questionsReponsesFetch) {
partieContent.entretien.questionsReponses.push({
question: qr.attributes.field_question,
reponse: qr.attributes.field_reponse.value,
});
}
}
break;
case 'exergue':
partieContent.exergue = partie.attributes.field_texte_exergue.value;
break;
case 'video':
partieContent.videos = [];
for (let video of partie.attributes.field_videos) {
const videoId = video.split('?v=')[1];
const videoUrl = `https://www.youtube.com/embed/${videoId}`;
partieContent.videos.push(videoUrl);
}
break;
}
this.content.parties.push(partieContent);
}
}
console.log('content cleaned');
} else if (this.contentType !== 'gouvernance' && this.contentType !== 'partenaire'
&& cleanContentMethod === 'promise'
) {
console.time('etape content promise processing');
const vignettePromise = this.fetchFromRelationships('field_vignette', rawContent.relationships);
const partiesPromise = this.fetchFromRelationships('field_parties', rawContent.relationships);
const previousEtapePromise = contentType === 'etape'? this.getRelatedEtape('previous', path) : null;
const nextEtapePromise = contentType === 'etape' ? this.getRelatedEtape('next', path) : null;
if (contentType === 'etape') {
// coordinates
this.content.coordinates = {
lat: rawContent.attributes.field_geofield.lat,
lon: rawContent.attributes.field_geofield.lon,
};
// adresse
this.content.adresse = rawContent.attributes.field_adresse;
// étape number
this.content.etape_number = rawContent.attributes.field_arret_numero;
// couleur
this.content.couleur = rawContent.attributes.field_couleur;
// dates
this.content.dates = {
start: this.getCleanDate(rawContent.attributes.field_dates.value),
end: this.getCleanDate(rawContent.attributes.field_dates.end_value),
}
} }
// pageTitle // pageTitle
@ -114,29 +353,74 @@ export const useContentStore = defineStore('content', {
const partieType = partie.type.replace(/^paragraph--/, ""); const partieType = partie.type.replace(/^paragraph--/, "");
let partieContent = { type: partieType }; let partieContent = { type: partieType };
switch (partieType) { switch(partieType) {
case 'carte_sensible': case 'carte_sensible':
partieContent.carteSensible = await getCarteSensible(partie); const carteSensiblePromise = this.fetchFromRelationships('field_image_carte', partie.relationships);
const carteSensibleData = await carteSensiblePromise;
if (carteSensibleData) {
partieContent.carteSensible = {
url: {
original: carteSensibleData.attributes.uri.url,
small: carteSensibleData.attributes.image_style_uri.content_small,
medium: carteSensibleData.attributes.image_style_uri.content_medium,
large: carteSensibleData.attributes.image_style_uri.content_large,
xlarge: carteSensibleData.attributes.image_style_uri.content_x_large,
},
alt: partie.relationships.field_image_carte.data.meta.alt,
};
}
break; break;
case 'titre_texte': case 'titre_texte':
const { titre, texte } = await getTitreTexte(partie); partieContent.titre = partie.attributes.field_titre;
partieContent.titre = titre; partieContent.texte = partie.attributes.field_texte.value;
partieContent.texte = texte;
// get the resized images from the text
const imgRegex = /<img[^>]+>/g;
const uuidRegex = /data-entity-uuid="([^"]+)"/;
const imgTags = partieContent.texte.match(imgRegex);
if (imgTags) {
const imagePromises = imgTags.map(imgTag => {
const uuidMatch = imgTag.match(uuidRegex);
if (uuidMatch && uuidMatch[1]) {
return REST.get(`/jsonapi/file/file/${uuidMatch[1]}`)
.then(response => ({
originalTag: imgTag,
imageData: response.data.data
}));
}
});
const images = await Promise.all(imagePromises);
images.forEach(({originalTag, imageData}) => {
const newImgTag = originalTag
.replace(/src="[^"]+"/,`src="${imageData.attributes.image_style_uri.content_medium}"`)
.replace('>',' data-large-src="' + imageData.attributes.image_style_uri.content_large + '">');
partieContent.texte = partieContent.texte.replace(originalTag, newImgTag);
});
}
break; break;
case 'chiffres_cles': case 'chiffres_cles':
partieContent.chiffresCles = await getChiffresCles(partie); const chiffresClesFetch = await this.fetchFromRelationships('field_chiffres_clefs', partie.relationships);
if (chiffresClesFetch) {
partieContent.chiffresCles = [];
for (let chiffre of chiffresClesFetch) {
partieContent.chiffresCles.push({
chiffre: chiffre.attributes.field_chiffre,
description: chiffre.attributes.field_description,
});
}
}
break; break;
case 'diaporama': case 'diaporama':
partieContent.diaporama = await getDiaporama(partie);
break; break;
case 'entretien': case 'entretien':
partieContent.entretien = await getEntretien(partie);
break; break;
case 'exergue': case 'exergue':
partieContent.exergue = partie.attributes.field_texte_exergue.value;
break; break;
case 'video': case 'video':
partieContent.videos = getVideos(partie);
break; break;
} }
return partieContent; return partieContent;
@ -146,32 +430,72 @@ export const useContentStore = defineStore('content', {
} }
// related étapes // related étapes
if (contentType === 'etape') { if (contentType === 'etape') await Promise.all([previousEtapePromise, nextEtapePromise]);
const [prevContent, nextContent] = await Promise.all([previousEtapePromise, nextEtapePromise]);
this.content.previous = prevContent; console.log(this.content);
this.content.next = nextContent; console.timeEnd('etape content promise processing');
}
} else { } else {
// pages gouvernance (contact) et partenaire // pages gouvernance (contact) et partenaire
// ont plusieurs items par pages // ont plusieurs items par pages
const intro = await REST.get(`/jsonapi/config_pages/intro_${this.contentType}/`); const intro = await REST.get(`/jsonapi/config_pages/intro_${this.contentType}/`);
const introContent = intro.data.data[0]; const introContent = intro.data.data[0];
this.pageTitle = this.pageTitle =
`${introContent.attributes.field_titre} ${introContent.attributes.metatag.find(tag => tag.tag === "meta")?.attributes.content}`; `${introContent.attributes.field_titre} ${introContent.attributes.metatag.find(tag => tag.tag === "meta")?.attributes.content}`;
this.content.contentTitle = introContent.attributes.field_titre; this.content.contentTitle = introContent.attributes.field_titre;
this.content.intro = introContent.attributes.field_intro?.value; this.content.intro = introContent.attributes.field_intro?.value;
let multiItemPageArray = []; const multiItemPageArray = [];
if (this.contentType === 'partenaire') { if (this.contentType === 'partenaire') {
multiItemPageArray = await getPartenaires(rawContent); for (let item of rawContent) {
const logoFetch = await REST.get(item.relationships.field_logo.links.related.href);
multiItemPageArray.push({
title: item.attributes.title,
description: item.attributes.body.value,
weight: item.attributes.field_poid,
link_url: item.attributes.field_lien.uri ,
logo_alt: item.relationships.field_logo.data.meta.alt,
logo_url: {
original: logoFetch.data.data.attributes.uri.url,
small: logoFetch.data.data.attributes.image_style_uri.content_small,
medium: logoFetch.data.data.attributes.image_style_uri.content_medium,
large: logoFetch.data.data.attributes.image_style_uri.content_large,
},
});
}
} else if (this.contentType === 'gouvernance') { } else if (this.contentType === 'gouvernance') {
multiItemPageArray = await getGouvernance(rawContent); for (let item of rawContent) {
const personnesFetch = await REST.get(item.relationships.field_personne_s.links.related.href);
let personnes = [];
for (let personne of personnesFetch.data.data) {
const portraitFetch = await REST.get(personne.relationships.field_portrait.links.related.href);
personnes.push({
nom: personne.attributes.field_nom,
prenom: personne.attributes.field_prenom,
description: personne.attributes.field_description,
photo_meta: personne.relationships.field_portrait.data?.meta.alt,
photo_url: portraitFetch.data.data ? {
original: portraitFetch.data.data.attributes.uri.url,
small: portraitFetch.data.data.attributes.image_style_uri.content_small,
medium: portraitFetch.data.data.attributes.image_style_uri.content_medium,
large: portraitFetch.data.data.attributes.image_style_uri.content_large,
} : null
});
}
multiItemPageArray.push({
title: item.attributes.title,
weight: item.attributes.field_poid,
personnes: personnes,
});
}
} }
this.content[`${this.contentType}s`] = multiItemPageArray; this.content[`${this.contentType}s`] = multiItemPageArray;
// console.log(this.content);
} }
} catch (error) { } catch (error) {
this.error = 'Failed to fetch data'; this.error = 'Failed to fetch data';
@ -180,6 +504,107 @@ export const useContentStore = defineStore('content', {
this.loading = false; this.loading = false;
} }
}, },
getCleanDate(date) {
return {
d: date.split('-')[2],
m: new Intl.DateTimeFormat('fr-FR', { month: 'long' }).format(new Date(date)),
y: date.split('-')[0],
}
},
async getRelatedEtape(direction, path) {
const getRelatedEtapeContent = async (relatedEtapeData) => {
if (relatedEtapeData) {
const vignetteFetch = await REST.get(relatedEtapeData.relationships.field_vignette.links.related.href);
if (vignetteFetch.data.data) {
this.content[direction] = {
url: relatedEtapeData.attributes.metatag.find(tag => tag.tag === "link")?.attributes.href,
couleur: relatedEtapeData.attributes.field_couleur,
title: relatedEtapeData.attributes.title,
postalCode: relatedEtapeData.attributes.field_adresse.postal_code,
dates: {
start: this.getCleanDate(relatedEtapeData.attributes.field_dates.value),
end: this.getCleanDate(relatedEtapeData.attributes.field_dates.end_value),
},
vignette: {
url: {
original: vignetteFetch.data.data.attributes.uri.url,
small: vignetteFetch.data.data.attributes.image_style_uri.content_small,
medium: vignetteFetch.data.data.attributes.image_style_uri.content_medium,
large: vignetteFetch.data.data.attributes.image_style_uri.content_large,
},
alt: relatedEtapeData.relationships.field_vignette.data.meta.alt,
},
}
}
}
}
const allEtapesData = await REST.get('/jsonapi/views/etapes/block_1/');
for (let [index, etape] of allEtapesData.data.data.entries()) {
if (etape.attributes.metatag.some(tag =>
tag.tag === "link" && tag.attributes.href === path
)) {
const relatedEtapeIndex = direction === 'next' ? index + 1 : index - 1;
await getRelatedEtapeContent(allEtapesData.data.data[relatedEtapeIndex]);
}
}
},
async getRelatedEtape(direction, path) {
const getRelatedEtapeContent = (relatedEtapeData) => {
if (relatedEtapeData) {
return this.fetchFromRelationships('field_vignette', relatedEtapeData.relationships)
.then(vignetteFetch => {
if (vignetteFetch) {
this.content[direction] = {
url: relatedEtapeData.attributes.metatag.find(tag => tag.tag === "link")?.attributes.href,
couleur: relatedEtapeData.attributes.field_couleur,
title: relatedEtapeData.attributes.title,
postalCode: relatedEtapeData.attributes.field_adresse.postal_code,
dates: {
start: this.getCleanDate(relatedEtapeData.attributes.field_dates.value),
end: this.getCleanDate(relatedEtapeData.attributes.field_dates.end_value),
},
vignette: {
url: {
original: vignetteFetch.attributes.uri.url,
small: vignetteFetch.attributes.image_style_uri.content_small,
medium: vignetteFetch.attributes.image_style_uri.content_medium,
large: vignetteFetch.attributes.image_style_uri.content_large,
},
alt: relatedEtapeData.relationships.field_vignette.data.meta.alt,
},
}
}
});
}
}
const allEtapesPromise = REST.get('/jsonapi/views/etapes/block_1/');
return allEtapesPromise.then(allEtapesData => {
for (let [index, etape] of allEtapesData.data.data.entries()) {
if (etape.attributes.metatag.some(tag =>
tag.tag === "link" && tag.attributes.href === path
)) {
const relatedEtapeIndex = direction === 'next' ? index + 1 : index - 1;
return getRelatedEtapeContent(allEtapesData.data.data[relatedEtapeIndex]);
}
}
});
},
async fetchFromRelationships(field, relationships) {
if (relationships[field].links) {
const contentLink = relationships[field].links.related.href;
return REST.get(contentLink)
.then(contentFetch => contentFetch.data.data)
.catch(error => {
this.error = 'Failed to fetch data';
console.error('Issue with getNodeData', error);
});
}
return null;
},
resetStore(forFrontDisplay) { resetStore(forFrontDisplay) {
this.contentType = ''; this.contentType = '';
this.pageTitle = ''; this.pageTitle = '';

View File

@ -16,14 +16,13 @@ export const useMapStore = defineStore('mapState', {
animationDuration: 3, animationDuration: 3,
}), }),
actions: { actions: {
zoomToPlace(lat, long) { zoomToPlace(lat, long) {
if (useLayoutStore().isDesktop) long = long - 0.03; if (useLayoutStore().isDesktop) long = long - 0.03;
this.map.flyTo( this.map.flyTo(
[lat, long], [lat, long],
this.maxZoom, this.maxZoom,
{ animate: this.animationsAreEnabled, duration: this.animationDuration }); { animate: this.animationsAreEnabled, duration: this.animationDuration });
this.currentZoom = this.maxZoom; this.currentZoom = this.maxZoom;
this.lockMap();
}, },
resetMap(animate = this.animationsAreEnabled, duration = this.animationDuration) { resetMap(animate = this.animationsAreEnabled, duration = this.animationDuration) {
this.map.flyTo( this.map.flyTo(
@ -31,7 +30,6 @@ export const useMapStore = defineStore('mapState', {
useLayoutStore().isDesktop ? this.defaultZoomDesktop : this.defaultZoomMobile, useLayoutStore().isDesktop ? this.defaultZoomDesktop : this.defaultZoomMobile,
{ animate, duration }); { animate, duration });
this.currentZoom = useLayoutStore().isDesktop ? this.defaultZoomDesktop : this.defaultZoomMobile; this.currentZoom = useLayoutStore().isDesktop ? this.defaultZoomDesktop : this.defaultZoomMobile;
this.unlockMap();
}, },
lockMap() { lockMap() {
setTimeout(() => { setTimeout(() => {
@ -44,7 +42,7 @@ export const useMapStore = defineStore('mapState', {
this.map.scrollWheelZoom.disable(); this.map.scrollWheelZoom.disable();
this.map.boxZoom.disable(); this.map.boxZoom.disable();
this.map.keyboard.disable(); this.map.keyboard.disable();
this.map._controlContainer.style.display = 'none'; // map.tap.disable();
}, },
unlockMap() { unlockMap() {
this.map.options.minZoom = useLayoutStore().isDesktop ? this.defaultZoomDesktop : this.defaultZoomMobile; this.map.options.minZoom = useLayoutStore().isDesktop ? this.defaultZoomDesktop : this.defaultZoomMobile;
@ -55,7 +53,7 @@ export const useMapStore = defineStore('mapState', {
this.map.scrollWheelZoom.enable(); this.map.scrollWheelZoom.enable();
this.map.boxZoom.enable(); this.map.boxZoom.enable();
this.map.keyboard.enable(); this.map.keyboard.enable();
this.map._controlContainer.style.display = 'block'; // map.tap.enable();
}, },
toggleAnimation() { toggleAnimation() {
this.animationsAreEnabled = !this.animationsAreEnabled; this.animationsAreEnabled = !this.animationsAreEnabled;

View File

@ -1,134 +0,0 @@
import REST from '../../api/rest-axios';
import { fetchFromRelationships } from './contentFetchUtils';
export async function getCarteSensible(partie) {
const carteSensiblePromise = fetchFromRelationships('field_image_carte', partie.relationships);
const carteSensibleData = await carteSensiblePromise;
if (carteSensibleData) {
return {
url: {
original: carteSensibleData.attributes.uri.url,
small: carteSensibleData.attributes.image_style_uri.content_small,
medium: carteSensibleData.attributes.image_style_uri.content_medium,
large: carteSensibleData.attributes.image_style_uri.content_large,
xlarge: carteSensibleData.attributes.image_style_uri.content_x_large,
},
alt: partie.relationships.field_image_carte.data.meta.alt,
};
}
}
export async function getTitreTexte(partie) {
let titre = partie.attributes.field_titre;
let texte = partie.attributes.field_texte.value;
// get the resized images from the text
const imgRegex = /<img[^>]+>/g;
const uuidRegex = /data-entity-uuid="([^"]+)"/;
const imgTags = texte.match(imgRegex);
if (imgTags) {
const imagePromises = imgTags.map(imgTag => {
const uuidMatch = imgTag.match(uuidRegex);
if (uuidMatch && uuidMatch[1]) {
return REST.get(`/jsonapi/file/file/${uuidMatch[1]}`)
.then(response => ({
originalTag: imgTag,
imageData: response.data.data
}));
}
});
const images = await Promise.all(imagePromises);
images.forEach(({originalTag, imageData}) => {
const newImgTag = originalTag
.replace(/src="[^"]+"/,`src="${imageData.attributes.image_style_uri.content_medium}"`)
.replace('>',' data-large-src="' + imageData.attributes.image_style_uri.content_large + '">');
texte = texte.replace(originalTag, newImgTag);
});
}
return { titre, texte };
}
export async function getChiffresCles(partie) {
const chiffresClesFetch = await fetchFromRelationships('field_chiffres_clefs', partie.relationships);
if (chiffresClesFetch) {
let chiffresCles = [];
for (let chiffre of chiffresClesFetch) {
chiffresCles.push({
chiffre: chiffre.attributes.field_chiffre,
description: chiffre.attributes.field_description,
});
}
return chiffresCles;
}
}
export async function getDiaporama(partie) {
const diaporamaFetch = await fetchFromRelationships('field_diaporama', partie.relationships);
if (diaporamaFetch) {
const diaporamaPromises = diaporamaFetch.map((image, index) => {
return {
url: {
original: image.attributes.uri.url,
small: image.attributes.image_style_uri.content_small,
medium: image.attributes.image_style_uri.content_medium,
large: image.attributes.image_style_uri.content_large,
},
alt: partie.relationships.field_diaporama.data[index].meta.alt,
};
});
return await Promise.all(diaporamaPromises);
}
}
export async function getEntretien(partie) {
const [personnesFetch, questionsReponsesFetch] = await Promise.all([
fetchFromRelationships('field_personne_s', partie.relationships),
fetchFromRelationships('field_questions_reponses', partie.relationships)
]);
if (personnesFetch && questionsReponsesFetch) {
const personnesPromises = personnesFetch.map(async (personne) => {
const portraitFetch = await fetchFromRelationships('field_portrait', personne.relationships);
if (portraitFetch) {
return {
portrait: {
original: portraitFetch.attributes.uri.url,
small: portraitFetch.attributes.image_style_uri.content_small,
medium: portraitFetch.attributes.image_style_uri.content_medium,
large: portraitFetch.attributes.image_style_uri.content_large,
},
alt: personne.relationships.field_portrait.data.meta.alt,
description: personne.attributes.field_description,
};
}
});
const questionsReponses = questionsReponsesFetch.map(qr => ({
question: qr.attributes.field_question,
reponse: qr.attributes.field_reponse.value,
}));
return {
titre: partie.attributes.field_titre,
personnes: await Promise.all(personnesPromises),
questionsReponses: questionsReponses
}
}
}
export function getVideos(partie) {
let videos = [];
for (let video of partie.attributes.field_videos) {
const videoId = video.split('?v=')[1];
const videoUrl = `https://www.youtube.com/embed/${videoId}`;
videos.push(videoUrl);
}
return videos;
}

View File

@ -1,68 +0,0 @@
import REST from '../../api/rest-axios';
export async function fetchFromRelationships(field, relationships) {
field = relationships[field] ? field : `${field}_static`;
if (relationships[field].links) {
const contentLink = relationships[field].links.related.href;
return REST.get(contentLink)
.then(contentFetch => contentFetch.data.data)
.catch(error => {
this.error = 'Failed to fetch data';
console.error('Issue with getNodeData', error);
});
}
return null;
}
export function getCleanDate(date) {
return {
d: date.split('-')[2],
m: new Intl.DateTimeFormat('fr-FR', { month: 'long' }).format(new Date(date)),
y: date.split('-')[0],
}
}
export async function getRelatedEtape(direction, path) {
const getRelatedEtapeContent = (relatedEtapeData) => {
if (relatedEtapeData) {
return fetchFromRelationships('field_vignette', relatedEtapeData.relationships)
.then(vignetteFetch => {
if (vignetteFetch) {
return {
url: relatedEtapeData.attributes.metatag.find(tag => tag.tag === "link")?.attributes.href,
couleur: relatedEtapeData.attributes.field_couleur,
title: relatedEtapeData.attributes.title,
postalCode: relatedEtapeData.attributes.field_adresse.postal_code,
dates: {
start: getCleanDate(relatedEtapeData.attributes.field_dates.value),
end: getCleanDate(relatedEtapeData.attributes.field_dates.end_value),
},
vignette: {
url: {
original: vignetteFetch.attributes.uri.url,
small: vignetteFetch.attributes.image_style_uri.content_small,
medium: vignetteFetch.attributes.image_style_uri.content_medium,
large: vignetteFetch.attributes.image_style_uri.content_large,
},
alt: relatedEtapeData.relationships.field_vignette.data.meta.alt,
},
}
}
});
}
}
const allEtapesPromise = REST.get('/jsonapi/views/etapes/block_1/');
return allEtapesPromise.then(allEtapesData => {
for (let [index, etape] of allEtapesData.data.data.entries()) {
if (etape.attributes.metatag.some(tag =>
tag.tag === "link" && tag.attributes.href === path
)) {
const relatedEtapeIndex = direction === 'next' ? index + 1 : index - 1;
return getRelatedEtapeContent(allEtapesData.data.data[relatedEtapeIndex]);
}
}
});
}

View File

@ -1,32 +0,0 @@
import REST from '../../api/rest-axios';
export async function findContentByPath(contentTypes, path) {
for (let type of contentTypes) {
const response = await REST.get(`/jsonapi/node/${type}/`);
const content = response.data.data.find(content =>
content.attributes.metatag.some(tag =>
tag.tag === "link" && tag.attributes.href === path
)
);
if (content) {
return {
contentType: type,
rawContent: content,
};
}
// Handle special case for governance/partners (multiple items per page)
const pageRequested = window.location.href.split('/').pop().replace(/s?$/, '');
if (type === pageRequested
|| (type === 'gouvernance' && pageRequested === 'contact')
) {
return {
contentType: type,
rawContent: response.data.data,
};
}
}
return null;
}

View File

@ -1,54 +0,0 @@
import REST from '../../api/rest-axios';
export async function getPartenaires(rawContent) {
const logoPromises = rawContent.map(item =>
REST.get(item.relationships.field_logo.links.related.href)
.then(logoFetch => ({
title: item.attributes.title,
description: item.attributes.body.value,
weight: item.attributes.field_poid,
link_url: item.attributes.field_lien.uri,
logo_alt: item.relationships.field_logo.data.meta.alt,
logo_url: {
original: logoFetch.data.data.attributes.uri.url,
small: logoFetch.data.data.attributes.image_style_uri.content_small,
medium: logoFetch.data.data.attributes.image_style_uri.content_medium,
large: logoFetch.data.data.attributes.image_style_uri.content_large,
}
}))
);
return await Promise.all(logoPromises);
}
export async function getGouvernance(rawContent) {
const itemPromises = rawContent.map(item =>
REST.get(item.relationships.field_personne_s.links.related.href)
.then(async personnesFetch => {
const portraitPromises = personnesFetch.data.data.map(personne =>
REST.get(personne.relationships.field_portrait.links.related.href)
.then(portraitFetch => ({
nom: personne.attributes.field_nom,
prenom: personne.attributes.field_prenom,
description: personne.attributes.field_description,
photo_meta: personne.relationships.field_portrait.data?.meta.alt,
photo_url: portraitFetch.data.data ? {
original: portraitFetch.data.data.attributes.uri.url,
small: portraitFetch.data.data.attributes.image_style_uri.content_small,
medium: portraitFetch.data.data.attributes.image_style_uri.content_medium,
large: portraitFetch.data.data.attributes.image_style_uri.content_large,
} : null
}))
);
return Promise.all(portraitPromises)
.then(personnes => ({
title: item.attributes.title,
weight: item.attributes.field_poid,
personnes
}));
})
);
return await Promise.all(itemPromises);
}

View File

@ -22,10 +22,12 @@ export function handleClickableElements(clickableElements, store, router, baseUr
let href = link.href || link.dataset.href; let href = link.href || link.dataset.href;
if (href.startsWith(baseUrl)) href = href.replace(baseUrl, ''); if (href.startsWith(baseUrl)) href = href.replace(baseUrl, '');
link.onclick = async function (e) { link.onclick = async function (e) {
console.log('click on link, route push');
router.push(href);
if (href !== window.location.pathname) { if (href !== window.location.pathname) {
router.push(href); pageChange(href, store, siteName, mapStore, baseUrl);
pageChange(href, store, siteName, mapStore, baseUrl);
} }
} }
} }
@ -38,6 +40,7 @@ export async function handleBrowserNavigation(store, baseUrl, siteName, mapStore
} }
export async function pageChange(href, store, siteName, mapStore, baseUrl) { export async function pageChange(href, store, siteName, mapStore, baseUrl) {
console.log('trigger page change');
if (href === '/') { if (href === '/') {
store.resetStore(true); store.resetStore(true);
document.title = siteName; document.title = siteName;

View File

@ -4,7 +4,6 @@ export function processClickableElements() {
generalListLinks: processStaticLinks(), generalListLinks: processStaticLinks(),
logoLink: processLogoLink(), logoLink: processLogoLink(),
mapIcons: processMapIcons(), mapIcons: processMapIcons(),
mapContainer: processMapContainer(),
}; };
} }
@ -15,9 +14,9 @@ function processEtapeLinks() {
etape_link.addEventListener('click', (e) => e.preventDefault()); etape_link.addEventListener('click', (e) => e.preventDefault());
const couleur = etape_link.dataset.couleur; const couleur = etape_link.dataset.couleur;
li.dataset.href = etape_link.attributes.href.value; li.dataset.href = etape_link.attributes.href.value;
const iconElements = li.querySelectorAll('.icone-arret'); const iconElements = li.querySelectorAll('.icone-arret > div');
for (let element of iconElements) { for (let element of iconElements) {
element.style.backgroundColor = couleur; element.style.backgroundColor = couleur;
} }
}); });
@ -47,10 +46,16 @@ function processMapIcons() {
const hrefContainer = icon.querySelector('.url'); const hrefContainer = icon.querySelector('.url');
icon.dataset.href = hrefContainer.innerText; icon.dataset.href = hrefContainer.innerText;
hrefContainer.style.display = "none";
const colorContainer = icon.querySelector('.couleur'); const colorContainer = icon.querySelector('.couleur');
let color = colorContainer.innerText; let color = colorContainer.innerText;
icon.style.backgroundColor = color; colorContainer.style.display = "none";
const iconElements = icon.querySelectorAll('div');
for (let iconElement of iconElements) {
iconElement.style.backgroundColor = color;
}
icon.addEventListener('mouseenter', () => { icon.addEventListener('mouseenter', () => {
icon.style.transform = `${icon.style.transform} scale(1.1)`; icon.style.transform = `${icon.style.transform} scale(1.1)`;
@ -65,11 +70,3 @@ function processMapIcons() {
return icons; return icons;
} }
function processMapContainer() {
let mapContainer = document.querySelector('.leaflet-layer');
mapContainer.style.height = "100vh";
mapContainer.style.width = "100vw";
mapContainer.dataset.href = "/";
return mapContainer;
}

View File

@ -5,8 +5,12 @@
</div> </div>
<div v-if="contentType === 'etape' && (content.previous || content.next)" class="related-etape-links"> <div v-if="contentType === 'etape' && (content.previous || content.next)" class="related-etape-links">
<div v-if="content.previous" class="card previous" :data-href="content.previous.url"> <div v-if="content.previous" class="card previous" @click="goToRelatedElement(content.previous.url)">
<div class="icon" :style="{ backgroundColor: content.previous.couleur }"></div> <div class="icon">
<div :style="{ backgroundColor: content.previous.couleur }"></div>
<div :style="{ backgroundColor: content.previous.couleur }"></div>
<div :style="{ backgroundColor: content.previous.couleur }"></div>
</div>
<div class="card-content"> <div class="card-content">
<div class="infos"> <div class="infos">
<div class="titre">{{ content.previous.title }} <span>({{ content.previous.postalCode.slice(0, 2) }})</span></div> <div class="titre">{{ content.previous.title }} <span>({{ content.previous.postalCode.slice(0, 2) }})</span></div>
@ -17,8 +21,12 @@
</div> </div>
</div> </div>
</div> </div>
<div v-if="content.next" class="card next" :data-href="content.next.url"> <div v-if="content.next" class="card next" @click="goToRelatedElement(content.next.url)">
<div class="icon" :style="{ backgroundColor: content.next.couleur }"></div> <div class="icon">
<div :style="{ backgroundColor: content.next.couleur }"></div>
<div :style="{ backgroundColor: content.next.couleur }"></div>
<div :style="{ backgroundColor: content.next.couleur }"></div>
</div>
<div class="card-content"> <div class="card-content">
<div class="infos"> <div class="infos">
<div class="titre">{{ content.next.title }} <span>({{ content.next.postalCode.slice(0, 2) }})</span></div> <div class="titre">{{ content.next.title }} <span>({{ content.next.postalCode.slice(0, 2) }})</span></div>
@ -34,18 +42,13 @@
</template> </template>
<script setup> <script setup>
import { onMounted } from 'vue';
import router from '../../router/router';
import { useContentStore } from '../../stores/content'; import { useContentStore } from '../../stores/content';
import { useMapStore } from '../../stores/map'; import { pageChange } from '../../utils/handle-navigation.js';
import { handleClickableElements } from '../../utils/handle-navigation.js';
const brandColor = "#80c8bf"; const brandColor = "#80c8bf";
const store = useContentStore(); const store = useContentStore();
const mapStore = useMapStore(); const mapStore = useContentStore();
const siteName = document.querySelector('#site_name').innerText; const siteName = document.querySelector('#site_name').innerText;
@ -56,9 +59,10 @@ const props = defineProps({
map: Object, map: Object,
}); });
onMounted(() => { async function goToRelatedElement(href) {
const relatedEtapesCards = document.querySelectorAll('.card'); const baseUrl = window.location.protocol + "//" + window.location.host;
const baseUrl = window.location.protocol + "//" + window.location.host; if (href.startsWith(baseUrl)) href = href.replace(baseUrl, '');
handleClickableElements(relatedEtapesCards, store, router, baseUrl, siteName, mapStore); pageChange(href, store, siteName, mapStore, baseUrl)
}); }
</script> </script>

View File

@ -1 +0,0 @@
<svg width="20" xmlns="http://www.w3.org/2000/svg" height="24" fill="none"><path d="M19.996,13.728L19.992,17.434L9.964,24.000L0.000,17.500L0.000,13.541L0.000,10.459L0.000,6.500L9.964,0.000L19.992,6.566L19.996,10.272L20.000,10.272L19.998,12.000L19.996,13.728ZL19.996,13.728ZL19.998,12.000" style="fill: rgb(0, 0, 0); fill-opacity: 1;" class="fills"/></svg>

Before

Width:  |  Height:  |  Size: 355 B

View File

@ -15,9 +15,6 @@ $modale-width-desktop: 50vw;
$brand-pattern-height: 110px; $brand-pattern-height: 110px;
$xsm-font-size-mobile: 0.5rem;
$xsm-font-size-desktop: 0.6rem;
$sm-font-size-mobile: 0.6rem; $sm-font-size-mobile: 0.6rem;
$sm-font-size-desktop: 0.8rem; $sm-font-size-desktop: 0.8rem;
@ -166,7 +163,7 @@ body{
} }
> #hamburger { > #hamburger {
position: fixed; position: fixed;
height: max(5vh, 40px); height: 5vh;
right: 0; right: 0;
top: 0; top: 0;
margin-right: $body-margin-x; margin-right: $body-margin-x;
@ -346,15 +343,27 @@ body{
left: 0; left: 0;
} }
.leaflet-map-divicon { .leaflet-map-divicon {
width: 20px !important; width: 10px;
height: 20px !important; height: 30px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
transition: transform 0.3s ease-out; transition: transform 0.3s ease-out;
transform-origin: center; > div {
mask-image: url("/themes/custom/caravane/assets/pictograms/hexagone.svg"); background-color: red;
mask-size: contain; display: block;
mask-repeat: no-repeat; width: 20px;
> .url, .couleur { height: 10px;
display: none; }
> div:first-of-type {
height: 8px;
clip-path: polygon(0 0, 100% 0, 50% 100%);
transform: rotate(180deg);
}
> div:nth-of-type(3) {
height: 8px;
clip-path: polygon(0 0, 100% 0, 50% 100%);
} }
} }
} }
@ -680,12 +689,24 @@ body{
} }
} }
> .icone-arret { > .icone-arret {
min-width: 20px; width: 10px;
height: 20px; height: 30px;
display: block; display: flex;
mask-image: url("/themes/custom/caravane/assets/pictograms/hexagone.svg"); flex-direction: column;
mask-size: contain; justify-content: center;
mask-repeat: no-repeat; align-items: center;
> div {
display: block;
width: 20px;
height: 10px;
&:first-of-type, &:last-of-type {
height: 8px;
clip-path: polygon(0 0, 100% 0, 50% 100%);
}
&:first-of-type {
transform: rotate(180deg);
}
}
} }
} }
> li:hover { > li:hover {
@ -905,8 +926,6 @@ body{
} }
} }
> main { > main {
z-index: 1;
position: relative;
width: 100%; width: 100%;
padding: 0 $modale-x-padding; padding: 0 $modale-x-padding;
padding-bottom: 5vh; padding-bottom: 5vh;
@ -1213,7 +1232,6 @@ body{
} }
} }
> footer { > footer {
position: relative;
z-index: 0; z-index: 0;
.pattern-bottom { .pattern-bottom {
mask-image: linear-gradient(to top, rgba(0,0,0,1), rgba(0,0,0,0)); mask-image: linear-gradient(to top, rgba(0,0,0,1), rgba(0,0,0,0));
@ -1269,12 +1287,24 @@ body{
} }
> .icon { > .icon {
z-index: 2; z-index: 2;
width: 25px; width: 10px;
height: 25px; height: 30px;
mask-image: url("/themes/custom/caravane/assets/pictograms/hexagone.svg"); display: flex;
mask-size: contain; flex-direction: column;
mask-repeat: no-repeat; justify-content: center;
margin-right: -8px; align-items: center;
> div {
display: block;
width: 20px;
height: 10px;
&:first-of-type, &:last-of-type {
height: 8px;
clip-path: polygon(0 0, 100% 0, 50% 100%);
}
&:first-of-type {
transform: rotate(180deg);
}
}
} }
> .card-content { > .card-content {
z-index: 1; z-index: 1;
@ -1288,21 +1318,21 @@ body{
padding: 1rem 0.5rem; padding: 1rem 0.5rem;
font-weight: bold; font-weight: bold;
font-family: 'Joost', sans-serif; font-family: 'Joost', sans-serif;
font-size: $labeur-font-size-mobile; font-size: $m-font-size-mobile;
@media screen and (min-width: $desktop-min-width) { @media screen and (min-width: $desktop-min-width) {
font-size: $labeur-font-size-desktop; font-size: $m-font-size-desktop;
} }
> span { > span {
font-weight: lighter; font-weight: lighter;
} }
} }
> .date { > .date {
font-size: $xsm-font-size-mobile; font-size: $sm-font-size-mobile;
font-family: 'Marianne', sans-serif; font-family: 'Marianne', sans-serif;
font-weight: lighter; font-weight: lighter;
padding-bottom: 1rem; padding-bottom: 1rem;
@media screen and (min-width: $desktop-min-width) { @media screen and (min-width: $desktop-min-width) {
font-size: $xsm-font-size-desktop; font-size: $sm-font-size-desktop;
} }
} }
} }

View File

@ -18,4 +18,4 @@ regions:
content: 'Content' content: 'Content'
sidebar_first: 'Sidebar first' sidebar_first: 'Sidebar first'
sidebar_second: 'Sidebar second' sidebar_second: 'Sidebar second'
footer: 'Footer' footer: 'Footer'

View File

@ -55,4 +55,7 @@
{%- endfor %} {%- endfor %}
</div> </div>
<div class="icone-arret"> <div class="icone-arret">
<div></div>
<div></div>
<div></div>
</div> </div>