From ef1504e66e7b8bce5ce1ef35c30115aba17aaacf Mon Sep 17 00:00:00 2001 From: ouidade Date: Mon, 1 Jul 2024 22:22:44 +0200 Subject: [PATCH] css mes fichiers --- web/themes/custom/reha/dist/bundle.js | 2 +- web/themes/custom/reha/dist/css/bundle.css | 50 +++++++++++++------ web/themes/custom/reha/js/reha.js | 24 --------- .../custom/reha/scss/partials/_aside.scss | 39 ++++++++++++--- 4 files changed, 69 insertions(+), 46 deletions(-) diff --git a/web/themes/custom/reha/dist/bundle.js b/web/themes/custom/reha/dist/bundle.js index dd22c6d..ea472ed 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 // $(\".profile--type--collaborateur\").click(function(event) {\n // // Ouvrir .tiroir fichiers\n // $(\".layout-sidebar-second\").animate({translate:'90%'},350);\n // });\n // $(\"#block-reha-views-block-current-user-doc-profile-block-1 > h2\").click(function(event) {\n // // Ouvrir .tiroir fichiers\n // $(\".layout-sidebar-second\").animate({translate:'0%'},350);\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 $(\"h2\").addClass('__close');\n }\n\n $(\".profile--type--collaborateur\").click(function(event) {\n // Ouvrir .tiroir fichiers\n $(\".layout-sidebar-second\").addClass('close');\n $(\"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 $(\"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: 3,\n // slidesToScroll: 1,\n dots: false,\n arrows: 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 actu');\n });\n // html.js body.node-type-site.node-id-58 div.dialog-off-canvas-main-canvas div.layout-container.page-node-site main div.layout-content.home-page-layout-content div.region.region-content div#block-reha-contenudelapageprincipale.block.block-system.block-system-main-block article.node-type-site div.entete_site div.image-site div.field.field--name-field-image.field--type-image.field--label-visually_hidden div.field__items\n $(document).ready(function(){\n $('.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\n// (function($, window) {\n// var adjustAnchor = function() {\n// var $anchor = $('.block-region-first'),\n// fixedElementHeight = 300;\n// console.log($anchor);\n// if ($anchor.length > 0) {\n// $('html, body').stop().animate({scrollTop: $anchor.offset().top - fixedElementHeight }, 0);\n// }\n// };\n\n// $(window).on('hashchange', function() {\n// adjustAnchor();\n// });\n// }); \n\nfunction 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\nif (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 \njQuery(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\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 // Vérifier l'état initial depuis sessionStorage\n if (sessionStorage.getItem('asideOpened') === 'true') {\n $(\".layout-sidebar-second\").addClass('close');\n $(\"h2\").addClass('__close');\n }\n\n $(\".profile--type--collaborateur\").click(function(event) {\n // Ouvrir .tiroir fichiers\n $(\".layout-sidebar-second\").addClass('close');\n $(\"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 $(\"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: 3,\n // slidesToScroll: 1,\n dots: false,\n arrows: 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 actu');\n });\n // html.js body.node-type-site.node-id-58 div.dialog-off-canvas-main-canvas div.layout-container.page-node-site main div.layout-content.home-page-layout-content div.region.region-content div#block-reha-contenudelapageprincipale.block.block-system.block-system-main-block article.node-type-site div.entete_site div.image-site div.field.field--name-field-image.field--type-image.field--label-visually_hidden div.field__items\n $(document).ready(function(){\n $('.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\nfunction 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\nif (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 \njQuery(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\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 9d42c36..6c01722 100644 --- a/web/themes/custom/reha/dist/css/bundle.css +++ b/web/themes/custom/reha/dist/css/bundle.css @@ -976,34 +976,51 @@ aside.layout-sidebar-second .view-current-user-doc-profile { margin: 0 6rem; display: flex; flex-direction: column; - top: -60px; + top: 200px; position: relative; + padding-top: 10rem; } -aside.layout-sidebar-second .profile--type--collaborateur .field--name-field-site { +aside.layout-sidebar-second .view-current-user-doc-profile::before { + content: ""; + width: 80%; + margin-top: 0.6rem; + border-bottom: black solid 1px; +} +aside.layout-sidebar-second .view-current-user-doc-profile header { + box-shadow: none; +} +aside.layout-sidebar-second .view-current-user-doc-profile .views-field-title { font-size: 2rem; font-weight: 900; display: flex; margin-bottom: 3rem; } -aside.layout-sidebar-second .profile--type--collaborateur .field--name-field-site::after { +aside.layout-sidebar-second .view-current-user-doc-profile .views-field-title::after { content: url(../images/noun-cross-1151731.svg); cursor: pointer; padding-left: 2rem; } -aside.layout-sidebar-second .profile--type--collaborateur .field--name-field-dossier-de-pilotage, -aside.layout-sidebar-second .profile--type--collaborateur .field--name-field-dossier-evenement { +aside.layout-sidebar-second .view-current-user-doc-profile .view-curent-user-site-dossier { + position: relative; + top: 200px; +} +aside.layout-sidebar-second .view-current-user-doc-profile .field--name-field-dossier-de-pilotage, +aside.layout-sidebar-second .view-current-user-doc-profile .field--name-field-dossier-evenement, +aside.layout-sidebar-second .view-current-user-doc-profile .paragraph--type--dossier { text-transform: uppercase; display: flex; flex-direction: column; } -aside.layout-sidebar-second .profile--type--collaborateur .field--name-field-dossier-de-pilotage > div:nth-child(1), -aside.layout-sidebar-second .profile--type--collaborateur .field--name-field-dossier-evenement > div:nth-child(1) { +aside.layout-sidebar-second .view-current-user-doc-profile .field--name-field-dossier-de-pilotage > div:nth-child(1), +aside.layout-sidebar-second .view-current-user-doc-profile .field--name-field-dossier-evenement > div:nth-child(1), +aside.layout-sidebar-second .view-current-user-doc-profile .paragraph--type--dossier > div:nth-child(1) { display: flex; align-items: center; flex-direction: row; } -aside.layout-sidebar-second .profile--type--collaborateur .field--name-field-dossier-de-pilotage > div:nth-child(1)::before, -aside.layout-sidebar-second .profile--type--collaborateur .field--name-field-dossier-evenement > div:nth-child(1)::before { +aside.layout-sidebar-second .view-current-user-doc-profile .field--name-field-dossier-de-pilotage > div:nth-child(1)::before, +aside.layout-sidebar-second .view-current-user-doc-profile .field--name-field-dossier-evenement > div:nth-child(1)::before, +aside.layout-sidebar-second .view-current-user-doc-profile .paragraph--type--dossier > div:nth-child(1)::before { content: url("../../dist/images/noun-file-6880430.svg"); display: inline-flex; width: 70px; @@ -1011,18 +1028,21 @@ aside.layout-sidebar-second .profile--type--collaborateur .field--name-field-dos padding-right: 1rem; align-items: center; } -aside.layout-sidebar-second .profile--type--collaborateur .field--name-field-dossier-de-pilotage .field__item .paragraph--type--dossier, -aside.layout-sidebar-second .profile--type--collaborateur .field--name-field-dossier-evenement .field__item .paragraph--type--dossier { +aside.layout-sidebar-second .view-current-user-doc-profile .field--name-field-dossier-de-pilotage .field__item .paragraph--type--dossier, +aside.layout-sidebar-second .view-current-user-doc-profile .field--name-field-dossier-evenement .field__item .paragraph--type--dossier, +aside.layout-sidebar-second .view-current-user-doc-profile .paragraph--type--dossier .field__item .paragraph--type--dossier { padding-left: 25%; } -aside.layout-sidebar-second .profile--type--collaborateur .field--name-field-dossier-de-pilotage .field__item .paragraph--type--dossier .field--name-field-fichiers, -aside.layout-sidebar-second .profile--type--collaborateur .field--name-field-dossier-evenement .field__item .paragraph--type--dossier .field--name-field-fichiers { +aside.layout-sidebar-second .view-current-user-doc-profile .field--name-field-dossier-de-pilotage .field__item .paragraph--type--dossier .field--name-field-fichiers, +aside.layout-sidebar-second .view-current-user-doc-profile .field--name-field-dossier-evenement .field__item .paragraph--type--dossier .field--name-field-fichiers, +aside.layout-sidebar-second .view-current-user-doc-profile .paragraph--type--dossier .field__item .paragraph--type--dossier .field--name-field-fichiers { text-transform: none; border: none; padding-left: 10%; } -aside.layout-sidebar-second .profile--type--collaborateur .field--name-field-dossier-de-pilotage .field__item .paragraph--type--dossier .field--name-field-fichiers span:nth-of-type(2), -aside.layout-sidebar-second .profile--type--collaborateur .field--name-field-dossier-evenement .field__item .paragraph--type--dossier .field--name-field-fichiers span:nth-of-type(2) { +aside.layout-sidebar-second .view-current-user-doc-profile .field--name-field-dossier-de-pilotage .field__item .paragraph--type--dossier .field--name-field-fichiers span:nth-of-type(2), +aside.layout-sidebar-second .view-current-user-doc-profile .field--name-field-dossier-evenement .field__item .paragraph--type--dossier .field--name-field-fichiers span:nth-of-type(2), +aside.layout-sidebar-second .view-current-user-doc-profile .paragraph--type--dossier .field__item .paragraph--type--dossier .field--name-field-fichiers span:nth-of-type(2) { display: none; } aside.layout-sidebar-second footer.view-footer { diff --git a/web/themes/custom/reha/js/reha.js b/web/themes/custom/reha/js/reha.js index 7542c9c..cb8f555 100644 --- a/web/themes/custom/reha/js/reha.js +++ b/web/themes/custom/reha/js/reha.js @@ -79,14 +79,6 @@ jQuery(document).ready(function($){ ////////////// tiroir fichiers /////// - // $(".profile--type--collaborateur").click(function(event) { - // // Ouvrir .tiroir fichiers - // $(".layout-sidebar-second").animate({translate:'90%'},350); - // }); - // $("#block-reha-views-block-current-user-doc-profile-block-1 > h2").click(function(event) { - // // Ouvrir .tiroir fichiers - // $(".layout-sidebar-second").animate({translate:'0%'},350); - // }); $(document).ready(function() { // Vérifier l'état initial depuis sessionStorage if (sessionStorage.getItem('asideOpened') === 'true') { @@ -194,22 +186,6 @@ jQuery(document).ready(function($){ // ///////////////// //// ancre dans texte au click parragraphe correspondant arrive en dessous du header - -// (function($, window) { -// var adjustAnchor = function() { -// var $anchor = $('.block-region-first'), -// fixedElementHeight = 300; -// console.log($anchor); -// if ($anchor.length > 0) { -// $('html, body').stop().animate({scrollTop: $anchor.offset().top - fixedElementHeight }, 0); -// } -// }; - -// $(window).on('hashchange', function() { -// adjustAnchor(); -// }); -// }); - function adjustAnchor() { var $anchor = $(window.location.hash); // Select the anchor element based on the hash in the URL var fixedElementHeight = $('.block-region-first').outerHeight(); // Get the height of the sticky element diff --git a/web/themes/custom/reha/scss/partials/_aside.scss b/web/themes/custom/reha/scss/partials/_aside.scss index 037f01a..a6f16af 100644 --- a/web/themes/custom/reha/scss/partials/_aside.scss +++ b/web/themes/custom/reha/scss/partials/_aside.scss @@ -74,16 +74,23 @@ aside.layout-sidebar-second{ } } + .view-current-user-doc-profile{ margin: 0 6rem ; display: flex; flex-direction: column; - top: -60px; + top: 200px; position: relative; - } - - .profile--type--collaborateur{ - .field--name-field-site{ + padding-top: 10rem; + &::before{ + content: '' ; + width: 80%; + margin-top: 0.6rem; + border-bottom: black solid 1px; + + } + header{box-shadow: none;} + .views-field-title{ font-size: 2rem; font-weight: 900; display: flex; @@ -94,8 +101,28 @@ aside.layout-sidebar-second{ padding-left: 2rem; } } + .view-curent-user-site-dossier{ + position: relative; + top: 200px; + } + // } + + // .profile--type--collaborateur{ + // .field--name-field-site{ + // font-size: 2rem; + // font-weight: 900; + // display: flex; + // margin-bottom: 3rem; + // &::after{ + // content: url(../images/noun-cross-1151731.svg); + // cursor: pointer; + // padding-left: 2rem; + // } + // } .field--name-field-dossier-de-pilotage, - .field--name-field-dossier-evenement{ + .field--name-field-dossier-evenement, + // .views-field-field-telechargement-prive, + .paragraph--type--dossier{ text-transform: uppercase; display: flex; flex-direction: column;