From ab595bd7f1f17b40b5aeb11b9021b97016591865 Mon Sep 17 00:00:00 2001 From: ouidade Date: Fri, 25 Jul 2025 17:50:23 +0200 Subject: [PATCH] legende, fleche mon espace --- web/themes/custom/reha/dist/bundle.js | 2 +- web/themes/custom/reha/dist/css/bundle.css | 10 ++- .../images/noun-arrow-1569918-black-left.svg | 64 +++++++++++++++++++ web/themes/custom/reha/js/reha.js | 17 +++++ .../custom/reha/scss/pages/node-site.scss | 4 +- .../custom/reha/scss/partials/_aside.scss | 3 +- .../reha/scss/partials/_links_content.scss | 8 +-- 7 files changed, 95 insertions(+), 13 deletions(-) create mode 100644 web/themes/custom/reha/dist/images/noun-arrow-1569918-black-left.svg diff --git a/web/themes/custom/reha/dist/bundle.js b/web/themes/custom/reha/dist/bundle.js index 6329d4c..fffc8c4 100644 --- a/web/themes/custom/reha/dist/bundle.js +++ b/web/themes/custom/reha/dist/bundle.js @@ -15,7 +15,7 @@ \********************/ /***/ (() => { -eval("/**\n * @file\n * reha behaviors.\n */\n(function (Drupal) {\n\n 'use strict';\n\n Drupal.behaviors.reha = {\n attach: function (context, settings) {\n\n console.log('It works!');\n\n }\n };\n\n \n} (Drupal));\n\njQuery(document).ready(function($){\n\n // menu déroulant\n\n ////////////// contacts ///////\n\n $(\".bouton-contact\").click(function(event) {\n // Fermer .connexion-full s'il est déroulé\n if ($(\".connexion-full\").is(\":visible\")) {\n $(\".connexion-full\").slideUp();\n }\n if ($(\".connected-full\").is(\":visible\")) {\n $(\".connected-full\").slideUp();\n }\n // Ouvrir .contacts-full\n $(\".contacts-full\").slideToggle();\n\n });\n\n////////////// connexion ///////\n\n $(\".bouton-connexion\").click(function(event) {\n // Fermer .contacts-full s'il est déroulé\n if ($(\".contacts-full\").is(\":visible\")) {\n $(\".contacts-full\").slideUp();\n }\n // Ouvrir .connexion-full\n $(\".connexion-full\").slideToggle();\n });\n \n $(\".bouton-connected\").click(function(event) {\n // Fermer .contacts-full s'il est déroulé\n if ($(\".contacts-full\").is(\":visible\")) {\n $(\".contacts-full\").slideUp();\n }\n // Ouvrir .connected-full\n $(\".connected-full\").slideToggle();\n });\n \n $(\".titre\").click(function(event) {\n if ($(\".connected-full\").is(\":visible\")) {\n $(\".connected-full\").slideUp();\n }\n if ($(\".contacts-full\").is(\":visible\")) {\n $(\".contacts-full\").slideUp();\n }\n if ($(\".connexion-full\").is(\":visible\")) {\n $(\".connexion-full\").slideUp();\n }\n // // Ouvrir .connexion-full\n // $(\".connected-full\").slideToggle();\n });\n \n $(\"#edit-field-dossier-de-candidature-0--label\").click(function(event) {\n event.preventDefault();\n // Ouvrir .connexion-full\n $(\"#edit-field-dossier-de-candidature-0--description>ul.main\").slideToggle();\n });\n\n\n ////////////// tiroir fichiers ///////\n\n $(document).ready(function() {\n // Vérifier l'état initial depuis sessionStorage\n if (sessionStorage.getItem('asideOpened') === 'true') {\n $(\".layout-sidebar-second\").addClass('close');\n $(\".layout-sidebar-second h2\").addClass('__close');\n }\n\n $(\".view-current-user-doc-profile\").click(function(event) {\n // Ouvrir .tiroir fichiers\n $(\".layout-sidebar-second\").addClass('close');\n $(\".layout-sidebar-second h2\").addClass('__close');\n sessionStorage.setItem('asideOpened', 'true');\n });\n\n $(\"#block-reha-views-block-current-user-doc-profile-block-1 > h2\").click(function(event) {\n // Fermer .tiroir fichiers\n $(\".layout-sidebar-second\").removeClass('close');\n $(\".layout-sidebar-second h2\").removeClass('__close');\n sessionStorage.setItem('asideOpened', 'false');\n });\n });\n\n});\n\n\n// slideshow home \n\n(function($, window) {\n console.log('hello slick')\n $(document).ready(function(){\n $('.view-id-sites.view-display-id-block_1').slick({\n slidesToShow: 1,\n // slidesToScroll: 1,\n dots: false,\n arrows: true,\n centerMode: true,\n adaptiveHeight: true,\n // centerPadding: '100px',\n responsive: [\n {\n breakpoint: 810,\n settings: {\n slidesToShow: 1,\n adaptiveHeight: true,\n arrows: false,\n draggable: true,\n centerMode: true,\n }\n }]\n });\n console.log('salut slick home');\n\n });\n\n $(document).ready(function(){\n $('.view-id-actus.view-display-id-block_1 ').slick({\n slidesToShow: 1,\n slidesToScroll: 1,\n // dots: true,\n arrows: true,\n // centerMode: true,\n draggable: true,\n centerPadding: '100px',\n responsive: [\n {\n breakpoint: 810,\n settings: {\n slidesToShow: 1,\n slidesToScroll: 1,\n adaptiveHeight: true,\n arrows: false,\n draggable: true,\n // centerMode: true,\n }\n }]\n });\n console.log('slick actu');\n });\n\n\n $(document).ready(function(){\n $('.node-type-site .page-node-site .field--name-field-image .field__items').slick({\n slidesToShow: 1,\n slidesToScroll: 1,\n dots: true,\n arrows: false,\n // adaptiveHeight: true,\n centerMode: true,\n // centerPadding: '100px',\n responsive: [\n {\n breakpoint: 810,\n settings: {\n slidesToShow: 1,\n adaptiveHeight: true,\n arrows: false,\n draggable: true,\n centerMode: true,\n }\n }]\n });\n console.log('slick site');\n });\n\n\n \n\n// /////////////////\n//// ancre dans texte au click parragraphe correspondant arrive en dessous du header \n\n function adjustAnchor() {\n var $anchor = $(window.location.hash); // Select the anchor element based on the hash in the URL\n var fixedElementHeight = $('.block-region-first').outerHeight(); // Get the height of the sticky element\n\n if ($anchor.length > 0) {\n $('html, body').stop().animate({\n scrollTop: $anchor.offset().top - fixedElementHeight // Adjust the scroll position to account for the sticky element height\n }, 0);\n }\n }\n\n // Call the function on page load if there's a hash\n if (window.location.hash) {\n adjustAnchor();\n }\n\n // Adjust the anchor on hash change\n $(window).on('hashchange', function() {\n adjustAnchor();\n });\n\n\n\n //////////////////////////////////////////\n // menu ancre paragraphe quand actif\n \n jQuery(function($) {\n // Function to set the active class based on the current path\n function setActiveLink() {\n var path = window.location.href;\n console.log(path);\n $(\".layout__region--first .block-region-first li a\").each(function() {\n if (this.href === path) {\n $(this).closest('a').addClass('active');\n }\n });\n }\n\n // Initially set the active link based on the current URL\n setActiveLink();\n\n // Update the active link on click\n $(\".layout__region--first .block-region-first li a\").on('click', function() {\n $(\".layout__region--first .block-region-first li a\").removeClass('active');\n $(this).addClass('active');\n });\n });\n\n\n})(jQuery, window);\n\n\n/////////////////// déplace synthèse de tous les sites (dans block config 3) dans node site pour faciliter css ///////////////////\n\n(function ($, Drupal) {\n Drupal.behaviors.moveFieldContent = {\n attach: function (context, settings) {\n // Vérifiez que les éléments existent avant de tenter de les manipuler\n if ($('#block-reha-config-pages-3 .field--name-field-fichier', context).length && $('.node-type-site .body-content-site .links-content', context).length) {\n // Déplacer le contenu de .field--name-field-fichier vers .links-content\n var fieldContent = $('#block-reha-config-pages-3 .field--name-field-fichier', context).detach();\n $('.node-type-site .body-content-site .links-content', context).append(fieldContent);\n }\n if ($('#block-reha-titredepage h1', context).length && $('.node-type-actualite .entete_actu .infos_content', context).length) {\n // Déplacer le contenu de .field--name-field-fichier vers .links-content\n var fieldContent = $('#block-reha-titredepage h1', context).detach();\n $('.node-type-actualite .entete_actu .infos_content', context).append(fieldContent);\n }\n }\n };\n})(jQuery, Drupal);\n\n\n\n\n// //////////////////// start déplacer block-reha-titredepage dans node-type-actu & ressource infos-content ////////////////////////\n\n// (function ($, Drupal) {\n// Drupal.behaviors.moveFieldContent = {\n// attach: function (context, settings) {\n// // Vérifiez que les éléments existent avant de tenter de les manipuler\n// if ($('#block-reha-titredepage h1', context).length && $('.node-type-actualite .entete_actu .infos_content', context).length) {\n// // Déplacer le contenu de .field--name-field-fichier vers .links-content\n// var fieldContent = $('#block-reha-titredepage h1', context).detach();\n// $('.node-type-actualite .entete_actu .infos_content', context).append(fieldContent);\n// }\n// }\n// };\n// })(jQuery, Drupal);\n// //////////////////// end div infos site ////////////////////////\n\n//# sourceURL=webpack://dev.reha.fr/./js/reha.js?"); +eval("/**\n * @file\n * reha behaviors.\n */\n(function (Drupal) {\n\n 'use strict';\n\n Drupal.behaviors.reha = {\n attach: function (context, settings) {\n\n console.log('It works!');\n\n }\n };\n\n \n} (Drupal));\n\njQuery(document).ready(function($){\n\n // menu déroulant\n\n ////////////// contacts ///////\n\n $(\".bouton-contact\").click(function(event) {\n // Fermer .connexion-full s'il est déroulé\n if ($(\".connexion-full\").is(\":visible\")) {\n $(\".connexion-full\").slideUp();\n }\n if ($(\".connected-full\").is(\":visible\")) {\n $(\".connected-full\").slideUp();\n }\n // Ouvrir .contacts-full\n $(\".contacts-full\").slideToggle();\n\n });\n\n////////////// connexion ///////\n\n $(\".bouton-connexion\").click(function(event) {\n // Fermer .contacts-full s'il est déroulé\n if ($(\".contacts-full\").is(\":visible\")) {\n $(\".contacts-full\").slideUp();\n }\n // Ouvrir .connexion-full\n $(\".connexion-full\").slideToggle();\n });\n \n $(\".bouton-connected\").click(function(event) {\n // Fermer .contacts-full s'il est déroulé\n if ($(\".contacts-full\").is(\":visible\")) {\n $(\".contacts-full\").slideUp();\n }\n // Ouvrir .connected-full\n $(\".connected-full\").slideToggle();\n });\n \n $(\".titre\").click(function(event) {\n if ($(\".connected-full\").is(\":visible\")) {\n $(\".connected-full\").slideUp();\n }\n if ($(\".contacts-full\").is(\":visible\")) {\n $(\".contacts-full\").slideUp();\n }\n if ($(\".connexion-full\").is(\":visible\")) {\n $(\".connexion-full\").slideUp();\n }\n // // Ouvrir .connexion-full\n // $(\".connected-full\").slideToggle();\n });\n \n $(\"#edit-field-dossier-de-candidature-0--label\").click(function(event) {\n event.preventDefault();\n // Ouvrir .connexion-full\n $(\"#edit-field-dossier-de-candidature-0--description>ul.main\").slideToggle();\n });\n\n\n ////////////// tiroir fichiers ///////\n\n $(document).ready(function() {\n \n // Check the initial state for mobile and add class if needed\n function checkMobileAndApplyClass() {\n if (window.innerWidth <= 768) { // Adjust the width to match your mobile breakpoint\n $(\".layout-sidebar-second\").addClass('display-none');\n } else {\n $(\".layout-sidebar-second\").removeClass('display-none');\n }\n }\n\n // Run the mobile check on page load\n checkMobileAndApplyClass();\n\n // Re-check when the window is resized\n $(window).resize(function() {\n checkMobileAndApplyClass();\n });\n // Vérifier l'état initial depuis sessionStorage\n if (sessionStorage.getItem('asideOpened') === 'true') {\n $(\".layout-sidebar-second\").addClass('close');\n $(\".layout-sidebar-second h2\").addClass('__close');\n }\n\n $(\".view-current-user-doc-profile\").click(function(event) {\n // Ouvrir .tiroir fichiers\n $(\".layout-sidebar-second\").addClass('close');\n $(\".layout-sidebar-second h2\").addClass('__close');\n sessionStorage.setItem('asideOpened', 'true');\n });\n\n $(\"#block-reha-views-block-current-user-doc-profile-block-1 > h2\").click(function(event) {\n // Fermer .tiroir fichiers\n $(\".layout-sidebar-second\").removeClass('close');\n $(\".layout-sidebar-second h2\").removeClass('__close');\n sessionStorage.setItem('asideOpened', 'false');\n });\n });\n\n});\n\n\n// slideshow home \n\n(function($, window) {\n console.log('hello slick')\n $(document).ready(function(){\n $('.view-id-sites.view-display-id-block_1').slick({\n slidesToShow: 1,\n // slidesToScroll: 1,\n dots: false,\n arrows: true,\n centerMode: true,\n adaptiveHeight: true,\n // centerPadding: '100px',\n responsive: [\n {\n breakpoint: 810,\n settings: {\n slidesToShow: 1,\n adaptiveHeight: true,\n arrows: false,\n draggable: true,\n centerMode: true,\n }\n }]\n });\n console.log('salut slick home');\n\n });\n\n $(document).ready(function(){\n $('.view-id-actus.view-display-id-block_1 ').slick({\n slidesToShow: 1,\n slidesToScroll: 1,\n // dots: true,\n arrows: true,\n // centerMode: true,\n draggable: true,\n centerPadding: '100px',\n responsive: [\n {\n breakpoint: 810,\n settings: {\n slidesToShow: 1,\n slidesToScroll: 1,\n adaptiveHeight: true,\n arrows: false,\n draggable: true,\n // centerMode: true,\n }\n }]\n });\n console.log('slick actu');\n });\n\n\n $(document).ready(function(){\n $('.node-type-site .page-node-site .field--name-field-image .field__items').slick({\n slidesToShow: 1,\n slidesToScroll: 1,\n dots: true,\n arrows: false,\n // adaptiveHeight: true,\n centerMode: true,\n // centerPadding: '100px',\n responsive: [\n {\n breakpoint: 810,\n settings: {\n slidesToShow: 1,\n adaptiveHeight: true,\n arrows: false,\n draggable: true,\n centerMode: true,\n }\n }]\n });\n console.log('slick site');\n });\n\n\n \n\n// /////////////////\n//// ancre dans texte au click parragraphe correspondant arrive en dessous du header \n\n function adjustAnchor() {\n var $anchor = $(window.location.hash); // Select the anchor element based on the hash in the URL\n var fixedElementHeight = $('.block-region-first').outerHeight(); // Get the height of the sticky element\n\n if ($anchor.length > 0) {\n $('html, body').stop().animate({\n scrollTop: $anchor.offset().top - fixedElementHeight // Adjust the scroll position to account for the sticky element height\n }, 0);\n }\n }\n\n // Call the function on page load if there's a hash\n if (window.location.hash) {\n adjustAnchor();\n }\n\n // Adjust the anchor on hash change\n $(window).on('hashchange', function() {\n adjustAnchor();\n });\n\n\n\n //////////////////////////////////////////\n // menu ancre paragraphe quand actif\n \n jQuery(function($) {\n // Function to set the active class based on the current path\n function setActiveLink() {\n var path = window.location.href;\n console.log(path);\n $(\".layout__region--first .block-region-first li a\").each(function() {\n if (this.href === path) {\n $(this).closest('a').addClass('active');\n }\n });\n }\n\n // Initially set the active link based on the current URL\n setActiveLink();\n\n // Update the active link on click\n $(\".layout__region--first .block-region-first li a\").on('click', function() {\n $(\".layout__region--first .block-region-first li a\").removeClass('active');\n $(this).addClass('active');\n });\n });\n\n\n})(jQuery, window);\n\n\n/////////////////// déplace synthèse de tous les sites (dans block config 3) dans node site pour faciliter css ///////////////////\n\n(function ($, Drupal) {\n Drupal.behaviors.moveFieldContent = {\n attach: function (context, settings) {\n // Vérifiez que les éléments existent avant de tenter de les manipuler\n if ($('#block-reha-config-pages-3 .field--name-field-fichier', context).length && $('.node-type-site .body-content-site .links-content', context).length) {\n // Déplacer le contenu de .field--name-field-fichier vers .links-content\n var fieldContent = $('#block-reha-config-pages-3 .field--name-field-fichier', context).detach();\n $('.node-type-site .body-content-site .links-content', context).append(fieldContent);\n }\n if ($('#block-reha-titredepage h1', context).length && $('.node-type-actualite .entete_actu .infos_content', context).length) {\n // Déplacer le contenu de .field--name-field-fichier vers .links-content\n var fieldContent = $('#block-reha-titredepage h1', context).detach();\n $('.node-type-actualite .entete_actu .infos_content', context).append(fieldContent);\n }\n }\n };\n})(jQuery, Drupal);\n\n\n\n\n// //////////////////// start déplacer block-reha-titredepage dans node-type-actu & ressource infos-content ////////////////////////\n\n// (function ($, Drupal) {\n// Drupal.behaviors.moveFieldContent = {\n// attach: function (context, settings) {\n// // Vérifiez que les éléments existent avant de tenter de les manipuler\n// if ($('#block-reha-titredepage h1', context).length && $('.node-type-actualite .entete_actu .infos_content', context).length) {\n// // Déplacer le contenu de .field--name-field-fichier vers .links-content\n// var fieldContent = $('#block-reha-titredepage h1', context).detach();\n// $('.node-type-actualite .entete_actu .infos_content', context).append(fieldContent);\n// }\n// }\n// };\n// })(jQuery, Drupal);\n// //////////////////// end div infos site ////////////////////////\n\n//# sourceURL=webpack://dev.reha.fr/./js/reha.js?"); /***/ }), diff --git a/web/themes/custom/reha/dist/css/bundle.css b/web/themes/custom/reha/dist/css/bundle.css index 1105598..2b4bfa1 100644 --- a/web/themes/custom/reha/dist/css/bundle.css +++ b/web/themes/custom/reha/dist/css/bundle.css @@ -974,8 +974,9 @@ aside.layout-sidebar-second h2::before { transform: translateY(5px) rotate(90deg); } aside.layout-sidebar-second h2.__close::before { - content: url("../../dist/images/noun-arrow-1569918-black.svg"); + content: url("../../dist/images/noun-arrow-1569918-black-left.svg"); display: inline-block; + transform: translateY(2px) rotate(90deg); } aside.layout-sidebar-second .view-current-user-doc-profile { margin: 0 6rem; @@ -1427,11 +1428,6 @@ aside.layout-sidebar-second footer.view-footer :hover { .links-content .field--name-field-fichier .file--mime-application-pdf a { text-transform: uppercase; } -.links-content .field--name-field-fichiers .file--mime-application-pdf ::after, -.links-content .field--name-field-fichier .file--mime-application-pdf ::after { - content: url("../../dist/images/noun-download.svg"); - padding-left: 0.8rem; -} .links-content .field--name-field-fichiers span:nth-of-type(2), .links-content .field--name-field-fichier span:nth-of-type(2) { display: none; @@ -2694,6 +2690,8 @@ html.js body.node-type-operation.node-id-7 div.dialog-off-canvas-main-canvas div .page-node-site .region-content #block-reha-contenudelapageprincipale .node-type-site .entete_site .image-site .field--name-field-image .slick-list .field__item blockquote { font-style: italic; margin: 0; + padding-top: 0.5rem; + font-size: 0.8rem; } .page-node-site .region-content #block-reha-contenudelapageprincipale .node-type-site .entete_site .image-site .field--name-field-image .slick-list .field__item blockquote p { margin: 0; diff --git a/web/themes/custom/reha/dist/images/noun-arrow-1569918-black-left.svg b/web/themes/custom/reha/dist/images/noun-arrow-1569918-black-left.svg new file mode 100644 index 0000000..5c4f84e --- /dev/null +++ b/web/themes/custom/reha/dist/images/noun-arrow-1569918-black-left.svg @@ -0,0 +1,64 @@ + + + + + + + + + + diff --git a/web/themes/custom/reha/js/reha.js b/web/themes/custom/reha/js/reha.js index a511ff5..5db9768 100644 --- a/web/themes/custom/reha/js/reha.js +++ b/web/themes/custom/reha/js/reha.js @@ -80,6 +80,23 @@ jQuery(document).ready(function($){ ////////////// tiroir fichiers /////// $(document).ready(function() { + + // Check the initial state for mobile and add class if needed + function checkMobileAndApplyClass() { + if (window.innerWidth <= 768) { // Adjust the width to match your mobile breakpoint + $(".layout-sidebar-second").addClass('display-none'); + } else { + $(".layout-sidebar-second").removeClass('display-none'); + } + } + + // Run the mobile check on page load + checkMobileAndApplyClass(); + + // Re-check when the window is resized + $(window).resize(function() { + checkMobileAndApplyClass(); + }); // Vérifier l'état initial depuis sessionStorage if (sessionStorage.getItem('asideOpened') === 'true') { $(".layout-sidebar-second").addClass('close'); diff --git a/web/themes/custom/reha/scss/pages/node-site.scss b/web/themes/custom/reha/scss/pages/node-site.scss index 7a3aa46..9d302ba 100644 --- a/web/themes/custom/reha/scss/pages/node-site.scss +++ b/web/themes/custom/reha/scss/pages/node-site.scss @@ -87,7 +87,9 @@ } blockquote{ font-style: italic; - margin: 0; + margin: 0; + padding-top: 0.5rem; + font-size: 0.8rem; p{ margin: 0; } diff --git a/web/themes/custom/reha/scss/partials/_aside.scss b/web/themes/custom/reha/scss/partials/_aside.scss index 8545590..f764348 100644 --- a/web/themes/custom/reha/scss/partials/_aside.scss +++ b/web/themes/custom/reha/scss/partials/_aside.scss @@ -69,8 +69,9 @@ aside.layout-sidebar-second{ } h2.__close{ &::before{ - content: url('../../dist/images/noun-arrow-1569918-black.svg'); + content: url('../../dist/images/noun-arrow-1569918-black-left.svg'); display: inline-block; + transform: translateY(2px) rotate(90deg); } } diff --git a/web/themes/custom/reha/scss/partials/_links_content.scss b/web/themes/custom/reha/scss/partials/_links_content.scss index 8351c19..7a5336a 100644 --- a/web/themes/custom/reha/scss/partials/_links_content.scss +++ b/web/themes/custom/reha/scss/partials/_links_content.scss @@ -21,10 +21,10 @@ text-transform: uppercase; } - ::after{ - content: url("../../dist/images/noun-download.svg"); - padding-left: 0.8rem; - } + // ::after{ + // content: url("../../dist/images/noun-download.svg"); + // padding-left: 0.8rem; + // } } span:nth-of-type(2){ display: none;