taille row ressource

This commit is contained in:
2025-05-20 15:20:10 +02:00
parent 091f946b30
commit 25d6d72b2e
5 changed files with 122 additions and 87 deletions
File diff suppressed because one or more lines are too long
+50 -47
View File
@@ -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;
}
+47 -24
View File
@@ -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 ///////
@@ -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;
// }
// }
// }
}
}
@@ -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;
}