diff --git a/web/themes/custom/eql/dist/assets/bundle.js b/web/themes/custom/eql/dist/assets/bundle.js index f292e7a..63bcd3b 100644 --- a/web/themes/custom/eql/dist/assets/bundle.js +++ b/web/themes/custom/eql/dist/assets/bundle.js @@ -36,7 +36,7 @@ eval("/**\n * @file\n * External links js file.\n */\n\n (function ($, Drupal, d \*************************/ /***/ (function() { -eval("\nconsole.log('salut');\n// menu burger open\n\nvar burger = document.getElementById(\"block-burger\");\nvar burgertitle = document.getElementById(\"block-burger-menu\");\n\n\nburgertitle.addEventListener(\"click\", toggleMenu);\n\nfunction toggleMenu(event) {\n // console.log(event);\n burger.classList.toggle('opened');\n}\n\n//////////////////////////\n// faq reponse open \n\nvar answers = document.getElementsByClassName(\"field--name-field-reponse\");\nvar fichiers = document.getElementsByClassName(\"field--name-field-fichiers\");\nvar questions = document.getElementsByClassName(\"field--name-field-question\");\n\nfor (let i = 0; i < questions.length; i++) {\n const question = questions[i]\n question.addEventListener(\"click\", toggleFaq);\n}\nfunction toggleFaq(event) {\n // console.log(event, this);\n // fermé tout\n for (let i = 0; i < answers.length; i++) {\n answers[i].classList.remove('opened'); \n }\n // la réponse correspndante a la question clické\n // | this c'est l'élément sur le quel on a clické\n // | |le parent |la réponse dans le parent\n let answer = this.parentNode.querySelector('.field--name-field-reponse');\n // console.log(answer); \n answer.classList.add('opened');\n\n}\n///// répète fonction pour les fichiers, les liens et ressources\n//// il faudrait créer un tableau d'objet ?\n\nvar fichiers = document.getElementsByClassName(\"field--name-field-fichiers\");\nvar questions = document.getElementsByClassName(\"field--name-field-question\");\n\nfor (let i = 0; i < questions.length; i++) {\n const question = questions[i]\n question.addEventListener(\"click\", toggleFaqFichiers);\n}\nfunction toggleFaqFichiers(event) {\n // console.log(event, this);\nfor (let i = 0; i < fichiers.length; i++) {\n fichiers[i].classList.remove('opened'); \n}\nlet fichier = this.parentNode.querySelector('.field--name-field-fichiers');\n\nfichier.classList.add('opened');\n}\n\n\n////////////////////////\nvar liens = document.getElementsByClassName(\"field--name-field-liens\");\nvar questions = document.getElementsByClassName(\"field--name-field-question\");\n\nfor (let i = 0; i < questions.length; i++) {\n const question = questions[i]\n question.addEventListener(\"click\", toggleFaqLiens);\n}\nfunction toggleFaqLiens(event) {\n // console.log(event, this);\nfor (let i = 0; i < liens.length; i++) {\n liens[i].classList.remove('opened'); \n}\nlet lien = this.parentNode.querySelector('.field--name-field-liens');\n \nlien.classList.add('opened');\n}\n\n//////////////////////\nvar ressources = document.getElementsByClassName(\"field--name-field-ress\");\nvar questions = document.getElementsByClassName(\"field--name-field-question\");\n\nfor (let i = 0; i < questions.length; i++) {\n const question = questions[i]\n question.addEventListener(\"click\", toggleFaqRessources);\n}\nfunction toggleFaqRessources(event) {\n // console.log(event, this);\nfor (let i = 0; i < resources.length; i++) {\n ressources[i].classList.remove('opened'); \n}\nlet ressource = this.parentNode.querySelector('.field--name-field-ress');\n\nressource.classList.add('opened');\n}\n\n///////////////////////////////\n////////////////////////////////\n// fleche qui tourne faq\n\n// var questions = document.getElementsByClassName(\"field--name-field-question\");\n// var paragraph = document.querySelector('.field--name-field-question p::after');\n// console.log(paragraph)\n// var styles = window.getComputedStyle(element,':after')\n// console.log(styles)\n// var content = styles['content']\n// console.log(content)\n\n\n// for (let i = 0; i < questions.length; i++) {\n// const question = questions[i]\n// question.addEventListener(\"click\", rotateFleche);\n// }\n// function rotateFleche(event) {\n// console.log(event, this);\n// // for (let i = 0; i < answers.length; i++) {\n// // answers[i].classList.remove('opened'); \n// // }\n// }\n\n//////////////////////////////////////////\n// block collection reste bleu quand actif\n \njQuery(function($) {\n var path = window.location.href; // because the 'href' property of the DOM element is the absolute path\n console.log(path);\n $(\".view-id-collections .view-content .views-row a\").each(function() {\n if (this.href === path) {\n $(this).parent().closest('.views-row').addClass('active');\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-entity-fieldnodefield-textes'),\n fixedElementHeight = 350;\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})(jQuery, window);\n\n\n// ///////////////////////////////\n\n\n// slideshow home // marche pas. attention ai rajouter des class dans template views.view.html.twig et views-view-actus-blocks-pages--block-1.html.twig\n\n(function($, window) {\n console.log('hello')\n $(document).ready(function(){\n $('.path-frontpage .view-actus-blocks-pages .view-content .view-type-slide .views-row-wrapper').slick({\n slidesToShow: 1,\n // slidesToScroll: 1,\n dots: true,\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('salut slick home');\n\n\n $('.page-node-type-actualite .block-entity-fieldnodefield-images .field--type-image').slick({\n dots: true,\n arrows: true,\n adaptiveHeight: true,\n responsive: [\n {\n breakpoint: 800,\n settings: {\n adaptiveHeight: true\n }\n }]\n });\n console.log('salut slick actus');\n\n\n $('.page-node-type-projet .block-entity-fieldnodefield-photo .field--type-image').slick({\n slidesToShow: 1,\n dots: true,\n arrows: false,\n draggable: true,\n adaptiveHeight: true,\n responsive: [\n {\n breakpoint: 800,\n settings: {\n adaptiveHeight: true\n }\n }]\n });\n console.log('salut slick projets');\n\n $('.path-ressources .view:not(.view-partenaires) .view-content .view-type-slide .views-row-wrapper').slick({\n slidesToShow: 3,\n dots: false,\n arrows: true,\n infinite: false,\n centerMode: false,\n // responsive: [\n // {\n // breakpoint: 810,\n // settings: {\n // slidesToShow: 3,\n // arrows: false,\n // draggable: true,\n // centerMode: true,\n // }\n // }]\n });\n console.log('salut slick ressource');\n\n });\n\n\n// //////// start ajoute class à views-row-wrapper et view-type-slide dans /ressources ////////\n$(document).ready(function () {\n $(\".views-row-wrapper\").each(function () {\n let h3 = $(this).prev(\"h3\");\n let link = h3.find(\"a\");\n if (link.length) {\n let text = link.text().trim();\n let className = text\n .toLowerCase()\n .normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g, \"\") // enlever les accents\n .replace(/[^a-z0-9]+/g, '-') // remplacer tout ce qui n'est pas a-z0-9 par -\n .replace(/(^-|-$)/g, ''); // enlever tirets début/fin\n\n $(this).addClass('type-' + className);\n // Ajouter la même classe sur le

\n h3.addClass('type-' + className);\n h3.closest('.view-type-slide').addClass('type-' + className); // ajouter aussi au bloc parent\n }\n });\n\n\n $(\".wrapper-ressource\").each(function(){\n let media = $(this).find(\".field--name-field-type-de-media\");\n\n // console.log(media);\n \n let mediaText = media.text().trim();\n let className = mediaText\n .toLowerCase()\n .normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g, \"\") // enlever les accents\n .replace(/[^a-z0-9]+/g, '-') // remplacer tout ce qui n'est pas a-z0-9 par -\n .replace(/(^-|-$)/g, ''); // enlever tirets début/fin\n // console.log(mediaText);\n $(this).addClass('type-media-' + className);\n });\n\n////// cache les slide non voulue en fonction de la class /////////\n const allowedTypes = [\n \"type-publication-issue-du-programme-eqld\",\n \"type-paroles-de-laureats\",\n \"type-les-projets-en-images\",\n \"type-presse\"\n ];\n\n $(\".view-type-slide\").each(function () {\n let $block = $(this);\n let keep = allowedTypes.some(type => $block.hasClass(type));\n\n if (!keep) {\n $block.hide(); // ou fadeOut() si tu veux un effet\n }\n });\n});\n// /////// end class à views-row-wrapper ///////\n\n\n/////////////// start ouverture liens externes vers nouvel onglet //////////////////\ndocument.querySelectorAll('a[href^=\"http\"]').forEach(link => {\n if (!link.href.includes(location.hostname)) {\n link.setAttribute('target', '_blank');\n link.setAttribute('rel', 'noopener noreferrer');\n }\n});\n\n/////////////// end ouverture liens externes vers nouvel onglet //////////////////\n\n\n/// start /// dans pages /projets après click sur appliquer filtres, scroll down la page au niveau des filtres //////\ndocument.addEventListener(\"DOMContentLoaded\", function () {\n const form = document.querySelector(\".views-exposed-form\");\n\n // console.log(form);\n\n if (form) {\n form.setAttribute(\"action\", form.action.split(\"#\")[0] + \"#filtres\");\n }\n if (window.location.hash === \"#filtres\") {\n const target = document.getElementById(\"filtres\");\n if (target) {\n // target.scrollIntoView({ behavior: \"smooth\", block: \"start\" });\n const offset = 300;\n const top = target.getBoundingClientRect().top + window.pageYOffset - offset;\n\n window.scrollTo({\n top: top,\n behavior: \"smooth\"\n });\n }\n }\n/// end //// dans pages /projets après click sur appliquer filtres, scroll down la page au niveau des filtres //////\n\n\n\n\n //// start ne pas afficher type de ressource 2 fois dans /ressources //////\n document.querySelectorAll(\".view-type-slide\").forEach(view => {\n const h3Content = view.querySelector(\"h3 > a\")?.textContent.trim();\n\n view.querySelectorAll(\".field--name-field-type-de-ressource\").forEach(field => {\n const fieldText = field.textContent.trim();\n\n if (fieldText === h3Content) {\n field.style.display = \"none\";\n }\n });\n });\n\n //// end ne pas afficher type de ressource 2 fois dans /ressources //////\n\n});\n\n})(jQuery, window);\n\n\n\n//# sourceURL=webpack://dev.eql.fr/./scripts/main.js?"); +eval("\nconsole.log('salut');\n// menu burger open\n\nvar burger = document.getElementById(\"block-burger\");\nvar burgertitle = document.getElementById(\"block-burger-menu\");\n\n\nburgertitle.addEventListener(\"click\", toggleMenu);\n\nfunction toggleMenu(event) {\n // console.log(event);\n burger.classList.toggle('opened');\n}\n\n//////////////////////////\n// faq reponse open \n\nvar answers = document.getElementsByClassName(\"field--name-field-reponse\");\nvar fichiers = document.getElementsByClassName(\"field--name-field-fichiers\");\nvar questions = document.getElementsByClassName(\"field--name-field-question\");\n\nfor (let i = 0; i < questions.length; i++) {\n const question = questions[i]\n question.addEventListener(\"click\", toggleFaq);\n}\nfunction toggleFaq(event) {\n // console.log(event, this);\n // fermé tout\n for (let i = 0; i < answers.length; i++) {\n answers[i].classList.remove('opened'); \n }\n // la réponse correspndante a la question clické\n // | this c'est l'élément sur le quel on a clické\n // | |le parent |la réponse dans le parent\n let answer = this.parentNode.querySelector('.field--name-field-reponse');\n // console.log(answer); \n answer.classList.add('opened');\n\n}\n///// répète fonction pour les fichiers, les liens et ressources\n//// il faudrait créer un tableau d'objet ?\n\nvar fichiers = document.getElementsByClassName(\"field--name-field-fichiers\");\nvar questions = document.getElementsByClassName(\"field--name-field-question\");\n\nfor (let i = 0; i < questions.length; i++) {\n const question = questions[i]\n question.addEventListener(\"click\", toggleFaqFichiers);\n}\nfunction toggleFaqFichiers(event) {\n // console.log(event, this);\nfor (let i = 0; i < fichiers.length; i++) {\n fichiers[i].classList.remove('opened'); \n}\nlet fichier = this.parentNode.querySelector('.field--name-field-fichiers');\n\nfichier.classList.add('opened');\n}\n\n\n////////////////////////\nvar liens = document.getElementsByClassName(\"field--name-field-liens\");\nvar questions = document.getElementsByClassName(\"field--name-field-question\");\n\nfor (let i = 0; i < questions.length; i++) {\n const question = questions[i]\n question.addEventListener(\"click\", toggleFaqLiens);\n}\nfunction toggleFaqLiens(event) {\n // console.log(event, this);\nfor (let i = 0; i < liens.length; i++) {\n liens[i].classList.remove('opened'); \n}\nlet lien = this.parentNode.querySelector('.field--name-field-liens');\n \nlien.classList.add('opened');\n}\n\n//////////////////////\nvar ressources = document.getElementsByClassName(\"field--name-field-ress\");\nvar questions = document.getElementsByClassName(\"field--name-field-question\");\n\nfor (let i = 0; i < questions.length; i++) {\n const question = questions[i]\n question.addEventListener(\"click\", toggleFaqRessources);\n}\nfunction toggleFaqRessources(event) {\n // console.log(event, this);\nfor (let i = 0; i < resources.length; i++) {\n ressources[i].classList.remove('opened'); \n}\nlet ressource = this.parentNode.querySelector('.field--name-field-ress');\n\nressource.classList.add('opened');\n}\n\n///////////////////////////////\n////////////////////////////////\n// fleche qui tourne faq\n\n// var questions = document.getElementsByClassName(\"field--name-field-question\");\n// var paragraph = document.querySelector('.field--name-field-question p::after');\n// console.log(paragraph)\n// var styles = window.getComputedStyle(element,':after')\n// console.log(styles)\n// var content = styles['content']\n// console.log(content)\n\n\n// for (let i = 0; i < questions.length; i++) {\n// const question = questions[i]\n// question.addEventListener(\"click\", rotateFleche);\n// }\n// function rotateFleche(event) {\n// console.log(event, this);\n// // for (let i = 0; i < answers.length; i++) {\n// // answers[i].classList.remove('opened'); \n// // }\n// }\n\n//////////////////////////////////////////\n// block collection reste bleu quand actif\n \njQuery(function($) {\n var path = window.location.href; // because the 'href' property of the DOM element is the absolute path\n console.log(path);\n $(\".view-id-collections .view-content .views-row a\").each(function() {\n if (this.href === path) {\n $(this).parent().closest('.views-row').addClass('active');\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-entity-fieldnodefield-textes'),\n fixedElementHeight = 350;\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})(jQuery, window);\n\n\n// ///////////////////////////////\n\n\n// slideshow home // marche pas. attention ai rajouter des class dans template views.view.html.twig et views-view-actus-blocks-pages--block-1.html.twig\n\n(function($, window) {\n console.log('hello')\n $(document).ready(function(){\n $('.path-frontpage .view-actus-blocks-pages .view-content .view-type-slide .views-row-wrapper').slick({\n slidesToShow: 1,\n // slidesToScroll: 1,\n dots: true,\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('salut slick home');\n\n\n $('.page-node-type-actualite .block-entity-fieldnodefield-images .field--type-image').slick({\n dots: true,\n arrows: true,\n adaptiveHeight: true,\n responsive: [\n {\n breakpoint: 800,\n settings: {\n adaptiveHeight: true\n }\n }]\n });\n console.log('salut slick actus');\n\n\n $('.page-node-type-projet .block-entity-fieldnodefield-photo .field--type-image').slick({\n slidesToShow: 1,\n dots: true,\n arrows: false,\n draggable: true,\n adaptiveHeight: true,\n responsive: [\n {\n breakpoint: 800,\n settings: {\n adaptiveHeight: true\n }\n }]\n });\n console.log('salut slick projets');\n\n $('.path-ressources .view:not(.view-partenaires) .view-content .view-type-slide .views-row-wrapper').slick({\n slidesToShow: 3,\n dots: false,\n arrows: true,\n infinite: false,\n centerMode: false,\n responsive: [\n {\n breakpoint: 810,\n settings: {\n slidesToShow: 3,\n arrows: false,\n draggable: true,\n centerMode: true,\n }\n }]\n });\n console.log('salut slick ressource');\n\n });\n\n\n// //////// start ajoute class à views-row-wrapper et view-type-slide dans /ressources ////////\n$(document).ready(function () {\n if (hasActiveFilters()) return;\n $(\".views-row-wrapper\").each(function () {\n let h3 = $(this).prev(\"h3\");\n let link = h3.find(\"a\");\n if (link.length) {\n let text = link.text().trim();\n let className = text\n .toLowerCase()\n .normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g, \"\") // enlever les accents\n .replace(/[^a-z0-9]+/g, '-') // remplacer tout ce qui n'est pas a-z0-9 par -\n .replace(/(^-|-$)/g, ''); // enlever tirets début/fin\n\n $(this).addClass('type-' + className);\n // Ajouter la même classe sur le

\n h3.addClass('type-' + className);\n h3.closest('.view-type-slide').addClass('type-' + className); // ajouter aussi au bloc parent\n }\n });\n\n\n $(\".wrapper-ressource\").each(function(){\n let media = $(this).find(\".field--name-field-type-de-media\");\n\n // console.log(media);\n \n let mediaText = media.text().trim();\n let className = mediaText\n .toLowerCase()\n .normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g, \"\") // enlever les accents\n .replace(/[^a-z0-9]+/g, '-') // remplacer tout ce qui n'est pas a-z0-9 par -\n .replace(/(^-|-$)/g, ''); // enlever tirets début/fin\n // console.log(mediaText);\n $(this).addClass('type-media-' + className);\n });\n\n// ////// cache les slide non voulue en fonction de la class /////////\n// const allowedTypes = [\n// \"type-publication-issue-du-programme-eqld\",\n// \"type-paroles-de-laureats\",\n// \"type-les-projets-en-images\",\n// \"type-presse\"\n// ];\n\n// $(\".view-type-slide\").each(function () {\n// let $block = $(this);\n// let keep = allowedTypes.some(type => $block.hasClass(type));\n \n\n// if (!keep) {\n// $block.hide(); // ou fadeOut() si tu veux un effet\n// }\n// });\n// });\n// $(\".view-type-slide\").each(function () {\n// let $block = $(this);\n// let matched = allowedTypes.filter(type => $block.hasClass(type));\n// console.log(\"Matched:\", matched);\n\n// let keep = matched.length > 0;\n// if (!keep) {\n// $block.hide();\n// }\n});\n\n\nfunction hasActiveFilters() {\n const params = new URLSearchParams(window.location.search);\n for (const [key, value] of params) {\n if (key !== 'page' && value !== 'All' && value !== '') {\n return true;\n }\n }\n return false;\n}\n// /////// end class à views-row-wrapper ///////\n\n\n/////////////// start ouverture liens externes vers nouvel onglet //////////////////\ndocument.querySelectorAll('a[href^=\"http\"]').forEach(link => {\n if (!link.href.includes(location.hostname)) {\n link.setAttribute('target', '_blank');\n link.setAttribute('rel', 'noopener noreferrer');\n }\n});\n\n/////////////// end ouverture liens externes vers nouvel onglet //////////////////\n\n\n/// start /// dans pages /projets après click sur appliquer filtres, scroll down la page au niveau des filtres //////\ndocument.addEventListener(\"DOMContentLoaded\", function () {\n const form = document.querySelector(\".views-exposed-form\");\n\n // console.log(form);\n\n if (form) {\n form.setAttribute(\"action\", form.action.split(\"#\")[0] + \"#filtres\");\n }\n if (window.location.hash === \"#filtres\") {\n const target = document.getElementById(\"filtres\");\n if (target) {\n // target.scrollIntoView({ behavior: \"smooth\", block: \"start\" });\n const offset = 300;\n const top = target.getBoundingClientRect().top + window.pageYOffset - offset;\n\n window.scrollTo({\n top: top,\n behavior: \"smooth\"\n });\n }\n }\n/// end //// dans pages /projets après click sur appliquer filtres, scroll down la page au niveau des filtres //////\n\n\n\n\n //// start ne pas afficher type de ressource 2 fois dans /ressources //////\n document.querySelectorAll(\".view-type-slide\").forEach(view => {\n const h3Content = view.querySelector(\"h3 > a\")?.textContent.trim();\n\n view.querySelectorAll(\".field--name-field-type-de-ressource\").forEach(field => {\n const fieldText = field.textContent.trim();\n\n if (fieldText === h3Content) {\n field.style.display = \"none\";\n }\n });\n });\n\n //// end ne pas afficher type de ressource 2 fois dans /ressources //////\n\n});\n\n})(jQuery, window);\n\n\n\n//# sourceURL=webpack://dev.eql.fr/./scripts/main.js?"); /***/ }) diff --git a/web/themes/custom/eql/dist/assets/css/bundle.css b/web/themes/custom/eql/dist/assets/css/bundle.css index 574aa12..9923ba9 100644 --- a/web/themes/custom/eql/dist/assets/css/bundle.css +++ b/web/themes/custom/eql/dist/assets/css/bundle.css @@ -5463,10 +5463,15 @@ svg.ext { display: flex; flex-direction: row; } -.path-ressources .layout-content .region-content #block-contenudelapageprincipale .layout--onecol .layout__region--content .block-region-content .block-views-blockbase-de-donnees-block-1 .view-base-de-donnees .view-content .view-type-slide:not(footer) .views-row-wrapper .views-row { +.path-ressources .layout-content .region-content #block-contenudelapageprincipale .layout--onecol .layout__region--content .block-region-content .block-views-blockbase-de-donnees-block-1 .view-base-de-donnees .view-content .view-type-slide:not(footer) .views-row-wrapper .slick-track { + width: 100% !important; display: flex; - width: 25%; - max-width: fit-content; + flex-direction: row; +} +.path-ressources .layout-content .region-content #block-contenudelapageprincipale .layout--onecol .layout__region--content .block-region-content .block-views-blockbase-de-donnees-block-1 .view-base-de-donnees .view-content .view-type-slide:not(footer) .views-row-wrapper .slick-track .views-row { + width: 45% !important; + min-width: 450px !important; + max-width: 500px !important; } @media (max-width: 810px) { .path-ressources .layout-content .region-content #block-contenudelapageprincipale .layout--onecol .layout__region--content .block-region-content .block-views-blockbase-de-donnees-block-1 .view-base-de-donnees .view-content .view-type-slide:not(footer) .views-row-wrapper { @@ -5495,12 +5500,6 @@ svg.ext { .path-ressources .layout-content .region-content #block-contenudelapageprincipale .layout--onecol .layout__region--content .block-region-content .block-views-blockbase-de-donnees-block-1 .view-base-de-donnees .view-content .view-type-slide:has(.type-publication-issue-du-programme-eqld)::before { background-color: rgba(0, 158, 227, 0.2); } -.path-ressources .layout-content .region-content #block-contenudelapageprincipale .layout--onecol .layout__region--content .block-region-content .block-views-blockbase-de-donnees-block-1 .view-base-de-donnees .view-content .type-les-projets-en-images .slick-track { - width: 100% !important; -} -.path-ressources .layout-content .region-content #block-contenudelapageprincipale .layout--onecol .layout__region--content .block-region-content .block-views-blockbase-de-donnees-block-1 .view-base-de-donnees .view-content .type-les-projets-en-images .slick-track .views-row { - width: 100% !important; -} /*partials*/ .layout-container { @@ -6218,156 +6217,160 @@ html.js body.node-type-actualite.node-id-88.path-node.page-node-type-actualite d font-size: 1rem; } -.node-type-ressource { +article.node-type-ressource { margin-bottom: 1rem; padding-right: 1rem; + min-width: 300px; } -.node-type-ressource .ext { +article.node-type-ressource h2 { + text-align: left !important; +} +article.node-type-ressource .ext { color: black; } -.node-type-ressource svg.ext { +article.node-type-ressource svg.ext { display: none; } -.node-type-ressource.type-de-ressource-Publication-issue-du-programme-EQLD .wrapper-ressource { +article.node-type-ressource.type-de-ressource-Publication-issue-du-programme-EQLD .wrapper-ressource { display: grid; grid-template-columns: 1fr 1.8fr; grid-template-rows: repeat(5 1fr); } -.node-type-ressource.type-de-ressource-Publication-issue-du-programme-EQLD .wrapper-ressource .field--name-field-type-de-ressource { +article.node-type-ressource.type-de-ressource-Publication-issue-du-programme-EQLD .wrapper-ressource .field--name-field-type-de-ressource { order: 2; grid-row: 2; margin-bottom: 1rem; } -.node-type-ressource.type-de-ressource-Publication-issue-du-programme-EQLD .wrapper-ressource .field--name-field-type-de-media { +article.node-type-ressource.type-de-ressource-Publication-issue-du-programme-EQLD .wrapper-ressource .field--name-field-type-de-media { order: 1; grid-row: 1; } -.node-type-ressource.type-de-ressource-Publication-issue-du-programme-EQLD .wrapper-ressource .field--name-field-images { +article.node-type-ressource.type-de-ressource-Publication-issue-du-programme-EQLD .wrapper-ressource .field--name-field-images { order: 3; grid-row: 3/span 5; height: auto; width: 90%; } -.node-type-ressource.type-de-ressource-Publication-issue-du-programme-EQLD .wrapper-ressource .field--name-field-images img { +article.node-type-ressource.type-de-ressource-Publication-issue-du-programme-EQLD .wrapper-ressource .field--name-field-images img { height: auto; width: 90%; border: 1px solid #a3a3a3; } -.node-type-ressource.type-de-ressource-Publication-issue-du-programme-EQLD .wrapper-ressource .field--name-title { +article.node-type-ressource.type-de-ressource-Publication-issue-du-programme-EQLD .wrapper-ressource .field--name-title { grid-row: 3; margin-top: 0; } -.node-type-ressource.type-de-ressource-Publication-issue-du-programme-EQLD .wrapper-ressource .field--name-title a { +article.node-type-ressource.type-de-ressource-Publication-issue-du-programme-EQLD .wrapper-ressource .field--name-title a { color: rgb(0, 158, 227); font-size: 1.2rem; font-style: normal; } -.node-type-ressource.type-de-ressource-Publication-issue-du-programme-EQLD .wrapper-ressource .field--name-field-sous-titre { +article.node-type-ressource.type-de-ressource-Publication-issue-du-programme-EQLD .wrapper-ressource .field--name-field-sous-titre { grid-row: 4; color: rgb(0, 158, 227); font-size: 0.8rem; font-weight: 800; } -.node-type-ressource.type-de-ressource-Publication-issue-du-programme-EQLD .wrapper-ressource .field--name-field-auteur-s- { +article.node-type-ressource.type-de-ressource-Publication-issue-du-programme-EQLD .wrapper-ressource .field--name-field-auteur-s- { grid-row: 5; } -.node-type-ressource.type-de-ressource-Publication-issue-du-programme-EQLD .wrapper-ressource .field--name-field-edition { +article.node-type-ressource.type-de-ressource-Publication-issue-du-programme-EQLD .wrapper-ressource .field--name-field-edition { grid-row: 6; } -.node-type-ressource.type-de-ressource-Publication-issue-du-programme-EQLD .wrapper-ressource .field--name-field-date-de-parution { +article.node-type-ressource.type-de-ressource-Publication-issue-du-programme-EQLD .wrapper-ressource .field--name-field-date-de-parution { grid-row: 7; } -.node-type-ressource.type-de-ressource-Publication-issue-du-programme-EQLD .wrapper-ressource .field--name-field-mots-clefs { +article.node-type-ressource.type-de-ressource-Publication-issue-du-programme-EQLD .wrapper-ressource .field--name-field-mots-clefs { grid-row: 8; } @media (max-width: 479px) { - .node-type-ressource { + article.node-type-ressource { margin-left: 0; } } -.node-type-ressource .wrapper-ressource .field--name-field-type-de-ressource, -.node-type-ressource .wrapper-ressource .field--name-field-type-de-media { +article.node-type-ressource .wrapper-ressource .field--name-field-type-de-ressource, +article.node-type-ressource .wrapper-ressource .field--name-field-type-de-media { grid-column: 1; text-transform: uppercase; line-height: 1.1rem; margin-top: 0.5rem; } -.node-type-ressource .wrapper-ressource .field--name-field-type-de-ressource a, -.node-type-ressource .wrapper-ressource .field--name-field-type-de-media a { +article.node-type-ressource .wrapper-ressource .field--name-field-type-de-ressource a, +article.node-type-ressource .wrapper-ressource .field--name-field-type-de-media a { color: rgb(0, 158, 227); font-weight: 900; font-size: 0.8rem; pointer-events: none; cursor: default; } -.node-type-ressource .wrapper-ressource .field--name-title { +article.node-type-ressource .wrapper-ressource .field--name-title { grid-column: 2; margin-top: 0.5rem; } -.node-type-ressource .wrapper-ressource .field--name-title h2 { +article.node-type-ressource .wrapper-ressource .field--name-title h2 { margin: 0; line-height: 1rem; } -.node-type-ressource .wrapper-ressource .field--name-title h2 a { +article.node-type-ressource .wrapper-ressource .field--name-title h2 a { color: rgb(0, 0, 0); font-size: 1rem; font-weight: 900; font-style: italic; } -.node-type-ressource .wrapper-ressource .field--name-field-auteur-s- { +article.node-type-ressource .wrapper-ressource .field--name-field-auteur-s- { grid-column: 2; margin-top: 0.5rem; font-weight: 800; line-height: 1.1rem; } -.node-type-ressource .wrapper-ressource .field--name-field-auteur-s- p { +article.node-type-ressource .wrapper-ressource .field--name-field-auteur-s- p { margin: 0; } -.node-type-ressource .wrapper-ressource .field--name-field-auteur-s- .field__label { +article.node-type-ressource .wrapper-ressource .field--name-field-auteur-s- .field__label { display: none; } -.node-type-ressource .wrapper-ressource .field--name-field-sous-titre { +article.node-type-ressource .wrapper-ressource .field--name-field-sous-titre { grid-column: 2; margin-top: 0.5rem; } -.node-type-ressource .wrapper-ressource .field--name-field-edition { +article.node-type-ressource .wrapper-ressource .field--name-field-edition { grid-column: 2; margin-top: 0.5rem; } -.node-type-ressource .wrapper-ressource .field--name-field-edition p { +article.node-type-ressource .wrapper-ressource .field--name-field-edition p { margin: 0; } -.node-type-ressource .wrapper-ressource .field--name-field-edition .field__label { +article.node-type-ressource .wrapper-ressource .field--name-field-edition .field__label { display: none; } -.node-type-ressource .wrapper-ressource .field--name-field-images { +article.node-type-ressource .wrapper-ressource .field--name-field-images { grid-column: 1; } -.node-type-ressource .wrapper-ressource .field--name-field-images .field__item { +article.node-type-ressource .wrapper-ressource .field--name-field-images .field__item { height: 100px; } -.node-type-ressource .wrapper-ressource .field--name-field-images img { +article.node-type-ressource .wrapper-ressource .field--name-field-images img { height: 100%; width: auto; } -.node-type-ressource .wrapper-ressource .field--name-field-date-de-parution { +article.node-type-ressource .wrapper-ressource .field--name-field-date-de-parution { grid-column: 2; margin-top: 0.3rem; } -.node-type-ressource .wrapper-ressource .field--name-field-mots-clefs { +article.node-type-ressource .wrapper-ressource .field--name-field-mots-clefs { grid-column: 2; display: flex; margin-top: 1rem; flex-direction: row; flex-wrap: wrap; } -.node-type-ressource .wrapper-ressource .field--name-field-mots-clefs .field__item { +article.node-type-ressource .wrapper-ressource .field--name-field-mots-clefs .field__item { margin-right: 0.5rem; padding-left: 0.3rem; padding-right: 0.3rem; font-size: 0.7rem; } -.node-type-ressource .wrapper-ressource .field--name-field-mots-clefs .field__item a { +article.node-type-ressource .wrapper-ressource .field--name-field-mots-clefs .field__item a { background: rgb(9, 57, 139); color: rgb(255, 255, 255); font-weight: 800; @@ -6378,6 +6381,6 @@ html.js body.node-type-actualite.node-id-88.path-node.page-node-type-actualite d pointer-events: none; cursor: default; } -.node-type-ressource .wrapper-ressource ul.links.inline { +article.node-type-ressource .wrapper-ressource ul.links.inline { display: none; } \ No newline at end of file diff --git a/web/themes/custom/eql/scripts/main.js b/web/themes/custom/eql/scripts/main.js index 00eee6b..342a47e 100644 --- a/web/themes/custom/eql/scripts/main.js +++ b/web/themes/custom/eql/scripts/main.js @@ -219,16 +219,16 @@ jQuery(function($) { arrows: true, infinite: false, centerMode: false, - // responsive: [ - // { - // breakpoint: 810, - // settings: { - // slidesToShow: 3, - // arrows: false, - // draggable: true, - // centerMode: true, - // } - // }] + responsive: [ + { + breakpoint: 810, + settings: { + slidesToShow: 3, + arrows: false, + draggable: true, + centerMode: true, + } + }] }); console.log('salut slick ressource'); @@ -237,6 +237,7 @@ jQuery(function($) { // //////// start ajoute class à views-row-wrapper et view-type-slide dans /ressources //////// $(document).ready(function () { + if (hasActiveFilters()) return; $(".views-row-wrapper").each(function () { let h3 = $(this).prev("h3"); let link = h3.find("a"); @@ -271,23 +272,45 @@ $(document).ready(function () { $(this).addClass('type-media-' + className); }); -////// cache les slide non voulue en fonction de la class ///////// - const allowedTypes = [ - "type-publication-issue-du-programme-eqld", - "type-paroles-de-laureats", - "type-les-projets-en-images", - "type-presse" - ]; +// ////// cache les slide non voulue en fonction de la class ///////// +// const allowedTypes = [ +// "type-publication-issue-du-programme-eqld", +// "type-paroles-de-laureats", +// "type-les-projets-en-images", +// "type-presse" +// ]; - $(".view-type-slide").each(function () { - let $block = $(this); - let keep = allowedTypes.some(type => $block.hasClass(type)); +// $(".view-type-slide").each(function () { +// let $block = $(this); +// let keep = allowedTypes.some(type => $block.hasClass(type)); + - if (!keep) { - $block.hide(); // ou fadeOut() si tu veux un effet - } - }); +// if (!keep) { +// $block.hide(); // ou fadeOut() si tu veux un effet +// } +// }); +// }); +// $(".view-type-slide").each(function () { +// let $block = $(this); +// let matched = allowedTypes.filter(type => $block.hasClass(type)); +// console.log("Matched:", matched); + +// let keep = matched.length > 0; +// if (!keep) { +// $block.hide(); +// } }); + + +function hasActiveFilters() { + const params = new URLSearchParams(window.location.search); + for (const [key, value] of params) { + if (key !== 'page' && value !== 'All' && value !== '') { + return true; + } + } + return false; +} // /////// end class à views-row-wrapper /////// diff --git a/web/themes/custom/eql/scss/pages/ressources.scss b/web/themes/custom/eql/scss/pages/ressources.scss index 0d55b77..01f8edb 100644 --- a/web/themes/custom/eql/scss/pages/ressources.scss +++ b/web/themes/custom/eql/scss/pages/ressources.scss @@ -211,13 +211,18 @@ .views-row-wrapper{ display: flex; flex-direction: row; - - .views-row{ + .slick-track{ + width: 100% !important; display: flex; - width: 25%; - max-width: fit-content; - - } + flex-direction: row; + + .views-row{ + width: 45% !important; + min-width: 450px !important; + max-width: 500px !important; + } + } + @media (max-width: 810px){ flex-direction: column; .views-row{ @@ -251,14 +256,16 @@ background-color: $background-actus;} } - .type-les-projets-en-images{ - .slick-track{ - width: 100% !important; - .views-row{ - width: 100% !important; - } - } - } + // .type-les-projets-en-images{ + // .slick-track{ + // width: 100% !important; + // .views-row{ + // width: 100% !important; + // } + // } + // } + + } } diff --git a/web/themes/custom/eql/scss/partials/_node-type-ressource-teaser.scss b/web/themes/custom/eql/scss/partials/_node-type-ressource-teaser.scss index 4d0cf52..31eea2a 100644 --- a/web/themes/custom/eql/scss/partials/_node-type-ressource-teaser.scss +++ b/web/themes/custom/eql/scss/partials/_node-type-ressource-teaser.scss @@ -1,6 +1,8 @@ -.node-type-ressource{ +article.node-type-ressource{ margin-bottom: 1rem ; padding-right: 1rem; + min-width: 300px; + h2{text-align: left !important} .ext{ color: black; }