From 5d1e1954f85526471835050b556cf79e9f849fc6 Mon Sep 17 00:00:00 2001 From: ouidade Date: Tue, 23 Sep 2025 23:34:31 +0200 Subject: [PATCH 1/4] height auto img --- web/themes/custom/reha/scss/pages/_home.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/web/themes/custom/reha/scss/pages/_home.scss b/web/themes/custom/reha/scss/pages/_home.scss index 8b8f665..7b1e4b9 100644 --- a/web/themes/custom/reha/scss/pages/_home.scss +++ b/web/themes/custom/reha/scss/pages/_home.scss @@ -119,6 +119,7 @@ @media(max-width: 500px){ img{ width: -moz-available; + height: auto; } } From 044974792959375d62b394869e8d594741f94b39 Mon Sep 17 00:00:00 2001 From: ouidade Date: Wed, 24 Sep 2025 10:10:08 +0200 Subject: [PATCH 2/4] home en attendant mise en ligne de stage --- web/themes/custom/reha/scss/pages/_home.scss | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/web/themes/custom/reha/scss/pages/_home.scss b/web/themes/custom/reha/scss/pages/_home.scss index 7b1e4b9..af96b47 100644 --- a/web/themes/custom/reha/scss/pages/_home.scss +++ b/web/themes/custom/reha/scss/pages/_home.scss @@ -126,6 +126,7 @@ } + // block Appel à candidature // .block-block-content5ae07b35-3c0b-48f5-b51b-f0f0e4c1765f{ @@ -269,4 +270,14 @@ } } +////// à enlever pour mise en lign e de stage ///// +html.js body div.dialog-off-canvas-main-canvas div.layout-container.page-programme main div.layout-content.home-page-layout-content div.region.region-content div#block-reha-contenudelapageprincipale.block.block-system.block-system-main-block div.layout.layout--twocol div.layout__region.layout__region--second div.block-region-second div#block-68d3a66ddd9e0.views-element-container.block.block-views.block-views-blockhome-block-1 div div.view.view-home.view-id-home.view-display-id-block_1.js-view-dom-id-9b892eac21901d3d6c0fe35b0d4b62f445e840215a121bd4e47434241241aac9 div.views-row div.views-field.views-field-body div.field-content p img.align-center{ + height: auto; +} + +#block-68d3a6672c807, +#block-68d3a6672d33a, +#block-68d3a6672d464{ + display: none; +} \ No newline at end of file From 077dbf042cf6db86618e17c043156e8da0cbfe6e Mon Sep 17 00:00:00 2001 From: ouidade Date: Wed, 24 Sep 2025 10:38:53 +0200 Subject: [PATCH 3/4] home en attendant mise en ligne de stage --- web/themes/custom/reha/dist/css/bundle.css | 9 ++++++ web/themes/custom/reha/scss/pages/_home.scss | 30 ++++++++++++-------- 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/web/themes/custom/reha/dist/css/bundle.css b/web/themes/custom/reha/dist/css/bundle.css index 58bbe8e..d80b5c8 100644 --- a/web/themes/custom/reha/dist/css/bundle.css +++ b/web/themes/custom/reha/dist/css/bundle.css @@ -1474,6 +1474,14 @@ aside.layout-sidebar-second footer.view-footer :hover { .home-page-layout-content { width: 100%; } +.home-page-layout-content html.js body div.dialog-off-canvas-main-canvas div.layout-container.page-programme main div.layout-content.home-page-layout-content div.region.region-content div#block-reha-contenudelapageprincipale.block.block-system.block-system-main-block div.layout.layout--twocol div.layout__region.layout__region--second div.block-region-second div#block-68d3a66ddd9e0.views-element-container.block.block-views.block-views-blockhome-block-1 div div.view.view-home.view-id-home.view-display-id-block_1.js-view-dom-id-9b892eac21901d3d6c0fe35b0d4b62f445e840215a121bd4e47434241241aac9 div.views-row div.views-field.views-field-body div.field-content p img.align-center { + height: auto !important; +} +.home-page-layout-content #block-68d3a6672c807, +.home-page-layout-content #block-68d3a6672d33a, +.home-page-layout-content #block-68d3a6672d464 { + display: none !important; +} .home-page-layout-content .layout-content .layout--onecol { width: 90%; margin: auto; @@ -1589,6 +1597,7 @@ aside.layout-sidebar-second footer.view-footer :hover { @media (max-width: 500px) { .home-page-layout-content .layout-content .layout--onecol .block-region-content .block-region-content .block-views-blockhome-block-1 img { width: -moz-available; + height: auto; } } diff --git a/web/themes/custom/reha/scss/pages/_home.scss b/web/themes/custom/reha/scss/pages/_home.scss index af96b47..4000886 100644 --- a/web/themes/custom/reha/scss/pages/_home.scss +++ b/web/themes/custom/reha/scss/pages/_home.scss @@ -1,6 +1,23 @@ .home-page-layout-content{ width: 100%; + + ////// à enlever pour mise en lign e de stage ///// + + html.js body div.dialog-off-canvas-main-canvas div.layout-container.page-programme main div.layout-content.home-page-layout-content div.region.region-content div#block-reha-contenudelapageprincipale.block.block-system.block-system-main-block div.layout.layout--twocol div.layout__region.layout__region--second div.block-region-second div#block-68d3a66ddd9e0.views-element-container.block.block-views.block-views-blockhome-block-1 div div.view.view-home.view-id-home.view-display-id-block_1.js-view-dom-id-9b892eac21901d3d6c0fe35b0d4b62f445e840215a121bd4e47434241241aac9 div.views-row div.views-field.views-field-body div.field-content p img.align-center{ + height: auto !important; + } + + #block-68d3a6672c807, + #block-68d3a6672d33a, + #block-68d3a6672d464{ + display: none !important; + } + + ////// à enlever pour mise en lign e de stage ///// + + + .layout-content{ .layout--onecol{ @@ -56,7 +73,7 @@ } - // block Appel à candidature + // block Appel à candidature /// désactivé .block-block-content5ae07b35-3c0b-48f5-b51b-f0f0e4c1765f{ /////////////// arrêt canndidatures phase 1 @@ -270,14 +287,3 @@ } } -////// à enlever pour mise en lign e de stage ///// - -html.js body div.dialog-off-canvas-main-canvas div.layout-container.page-programme main div.layout-content.home-page-layout-content div.region.region-content div#block-reha-contenudelapageprincipale.block.block-system.block-system-main-block div.layout.layout--twocol div.layout__region.layout__region--second div.block-region-second div#block-68d3a66ddd9e0.views-element-container.block.block-views.block-views-blockhome-block-1 div div.view.view-home.view-id-home.view-display-id-block_1.js-view-dom-id-9b892eac21901d3d6c0fe35b0d4b62f445e840215a121bd4e47434241241aac9 div.views-row div.views-field.views-field-body div.field-content p img.align-center{ - height: auto; -} - -#block-68d3a6672c807, -#block-68d3a6672d33a, -#block-68d3a6672d464{ - display: none; -} \ No newline at end of file From c106147aab4cd730e4c8347bf9127736c6ef8ae9 Mon Sep 17 00:00:00 2001 From: ouidade Date: Mon, 29 Sep 2025 14:18:54 +0200 Subject: [PATCH 4/4] infos dans bulles hover --- web/themes/custom/reha/dist/bundle.js | 2 +- web/themes/custom/reha/dist/css/bundle.css | 54 +++++++++++++++++ web/themes/custom/reha/js/reha.js | 37 +++++++++++- .../pages/_page-mon-espace-de-travail.scss | 60 +++++++++++++++++++ 4 files changed, 151 insertions(+), 2 deletions(-) diff --git a/web/themes/custom/reha/dist/bundle.js b/web/themes/custom/reha/dist/bundle.js index 67d6473..591c84a 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 \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\n // Gestion toggle du panneau au clic sur le h2\n $(\"aside.layout-sidebar-second h2\").click(function () {\n const aside = $(\".layout-sidebar-second\");\n const heading = $(\"aside.layout-sidebar-second h2\");\n const isClosed = aside.hasClass('close');\n\n if (isClosed) {\n aside.removeClass('close');\n heading.removeClass('__close');\n sessionStorage.setItem('asideOpened', 'false');\n } else {\n aside.addClass('close');\n heading.addClass('__close');\n sessionStorage.setItem('asideOpened', 'true');\n }\n });\n\n // Forcer la fermeture du panneau au clic sur .views-field-title\n $(\"aside.layout-sidebar-second .view-current-user-doc-profile .views-field-title\").click(function () {\n $(\".layout-sidebar-second\").addClass('close');\n $(\".layout-sidebar-second h2\").addClass('__close');\n sessionStorage.setItem('asideOpened', 'true');\n });\n\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 autoplay: true,\n autoplaySpeed: 2000,\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 autoplay:true,\n autoplaySpeed: 2000,\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\n // Gestion toggle du panneau au clic sur le h2\n $(\"aside.layout-sidebar-second h2\").click(function () {\n const aside = $(\".layout-sidebar-second\");\n const heading = $(\"aside.layout-sidebar-second h2\");\n const isClosed = aside.hasClass('close');\n\n if (isClosed) {\n aside.removeClass('close');\n heading.removeClass('__close');\n sessionStorage.setItem('asideOpened', 'false');\n } else {\n aside.addClass('close');\n heading.addClass('__close');\n sessionStorage.setItem('asideOpened', 'true');\n }\n });\n\n // Forcer la fermeture du panneau au clic sur .views-field-title\n $(\"aside.layout-sidebar-second .view-current-user-doc-profile .views-field-title\").click(function () {\n $(\".layout-sidebar-second\").addClass('close');\n $(\".layout-sidebar-second h2\").addClass('__close');\n sessionStorage.setItem('asideOpened', 'true');\n });\n\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 autoplay: true,\n autoplaySpeed: 2000,\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 autoplay:true,\n autoplaySpeed: 2000,\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\n// document.querySelectorAll('.description').forEach(el => {\n// el.setAttribute('data-text', el.textContent.trim());\n// });\n\nfunction initDescriptionTooltips(root = document) {\n root.querySelectorAll('.description').forEach(el => {\n if (!el.hasAttribute('data-text')) {\n el.setAttribute('data-text', el.textContent.trim());\n }\n });\n}\n\n// Initialisation sur la page actuelle\ninitDescriptionTooltips();\n\n// Observer pour détecter les nouveaux éléments ajoutés au DOM\nconst observer = new MutationObserver(mutations => {\n mutations.forEach(mutation => {\n mutation.addedNodes.forEach(node => {\n if (node.nodeType === 1) { // élément HTML\n if (node.matches('.description')) {\n initDescriptionTooltips(node.parentNode);\n } else {\n // Si c'est un conteneur qui contient des .description\n initDescriptionTooltips(node);\n }\n }\n });\n });\n});\n\n// Observer sur tout le body\nobserver.observe(document.body, { childList: true, subtree: true });\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 d80b5c8..7184707 100644 --- a/web/themes/custom/reha/dist/css/bundle.css +++ b/web/themes/custom/reha/dist/css/bundle.css @@ -3301,6 +3301,12 @@ html.js body.node-type-operation.node-id-7 div.dialog-off-canvas-main-canvas div margin-left: 12.5%; } +.page-mon-espace-de-travail { + /* On cache le texte mais on le garde accessible */ + /* On crée l’icône "i" */ + /* Tooltip : on réaffiche le vrai texte stocké */ + /* Affichage au survol */ +} .page-mon-espace-de-travail .layout-content { padding-bottom: 3rem; width: 80%; @@ -3358,8 +3364,56 @@ html.js body.node-type-operation.node-id-7 div.dialog-off-canvas-main-canvas div .page-mon-espace-de-travail .paragraph-type--dossier h4 { display: none; } +.page-mon-espace-de-travail .description { + position: relative; + display: inline-block; + color: transparent; /* rend le texte invisible */ + font-size: 0; /* supprime l'espace du texte */ +} +.page-mon-espace-de-travail .description::before { + content: "i"; + display: inline-block; + width: 20px; + height: 20px; + line-height: 20px; + border-radius: 50%; + background-color: #333; + color: #fff; + text-align: center; + font-weight: bold; + font-size: 14px; + cursor: pointer; +} +.page-mon-espace-de-travail .description::after { + content: attr(data-text); /* On va injecter le texte via un attribut */ + visibility: hidden; + opacity: 0; + width: 250px; + background-color: #333; + color: #fff; + text-align: left; + border-radius: 6px; + padding: 8px; + position: absolute; + z-index: 1; + top: 120%; + left: 50%; + transform: translateX(-50%); + transition: opacity 0.3s; + font-size: 13px; + line-height: 1.4; + pointer-events: none; +} +.page-mon-espace-de-travail .description:hover::after { + visibility: visible; + opacity: 1; +} .field--name-field-dossier-de-pilotage h4 ::after { content: ""; border-top: solid 1px black; +} + +.messages--error { + color: red; } \ No newline at end of file diff --git a/web/themes/custom/reha/js/reha.js b/web/themes/custom/reha/js/reha.js index 2c6fb75..637fc12 100644 --- a/web/themes/custom/reha/js/reha.js +++ b/web/themes/custom/reha/js/reha.js @@ -306,4 +306,39 @@ jQuery(document).ready(function($){ // } // }; // })(jQuery, Drupal); -// //////////////////// end div infos site //////////////////////// \ No newline at end of file +// //////////////////// end div infos site //////////////////////// + + +// document.querySelectorAll('.description').forEach(el => { +// el.setAttribute('data-text', el.textContent.trim()); +// }); + +function initDescriptionTooltips(root = document) { + root.querySelectorAll('.description').forEach(el => { + if (!el.hasAttribute('data-text')) { + el.setAttribute('data-text', el.textContent.trim()); + } + }); +} + +// Initialisation sur la page actuelle +initDescriptionTooltips(); + +// Observer pour détecter les nouveaux éléments ajoutés au DOM +const observer = new MutationObserver(mutations => { + mutations.forEach(mutation => { + mutation.addedNodes.forEach(node => { + if (node.nodeType === 1) { // élément HTML + if (node.matches('.description')) { + initDescriptionTooltips(node.parentNode); + } else { + // Si c'est un conteneur qui contient des .description + initDescriptionTooltips(node); + } + } + }); + }); +}); + +// Observer sur tout le body +observer.observe(document.body, { childList: true, subtree: true }); \ No newline at end of file diff --git a/web/themes/custom/reha/scss/pages/_page-mon-espace-de-travail.scss b/web/themes/custom/reha/scss/pages/_page-mon-espace-de-travail.scss index 41d1709..3441716 100644 --- a/web/themes/custom/reha/scss/pages/_page-mon-espace-de-travail.scss +++ b/web/themes/custom/reha/scss/pages/_page-mon-espace-de-travail.scss @@ -68,6 +68,61 @@ display: none; } } + +/* On cache le texte mais on le garde accessible */ +.description { + position: relative; + display: inline-block; + color: transparent; /* rend le texte invisible */ + font-size: 0; /* supprime l'espace du texte */ + } + + /* On crée l’icône "i" */ + .description::before { + content: "i"; + display: inline-block; + width: 20px; + height: 20px; + line-height: 20px; + border-radius: 50%; + background-color: #333; + color: #fff; + text-align: center; + font-weight: bold; + font-size: 14px; + cursor: pointer; + // font-family: Arial, sans-serif; + } + + /* Tooltip : on réaffiche le vrai texte stocké */ + .description::after { + content: attr(data-text); /* On va injecter le texte via un attribut */ + visibility: hidden; + opacity: 0; + width: 250px; + background-color: #333; + color: #fff; + text-align: left; + border-radius: 6px; + padding: 8px; + position: absolute; + z-index: 1; + top: 120%; + left: 50%; + transform: translateX(-50%); + transition: opacity 0.3s; + font-size: 13px; + line-height: 1.4; + pointer-events: none; + } + + /* Affichage au survol */ + .description:hover::after { + visibility: visible; + opacity: 1; + } + + } // #edit-field-dossier-de-pilotage-wrapper @@ -76,4 +131,9 @@ content: ""; border-top: solid 1px black; } +} + + +.messages--error{ + color:red; } \ No newline at end of file