ressource type-en-images, php js et css

This commit is contained in:
2025-05-26 12:46:26 +02:00
parent 36f6cebfd5
commit 08d8b37aa2
11 changed files with 560 additions and 61 deletions
@@ -0,0 +1,147 @@
.page-node-type-ressource{
.type-les-projets-en-images .block-region-top{
display: flex !important;
flex-direction: column;
margin-left: 11%;
@media screen and (min-width:1100px) {
display: flex;
}
.block {
margin-left: 0;
}
.block-entity-fieldnodefield-images{
padding: 0;
order: 7;
.carousel {
max-width: 60vw;
margin: auto;
text-align: center;
.main-image-container {
position: relative;
// background: #e0f5ff;
height: 500px;
max-height: 500px;
overflow: hidden;
width: 100%;
object-fit: contain;
img {
width: 100%;
height: 100%;
object-fit: contain;
transition: transform 0.3s ease-in-out;
// transition: opacity 0.4s ease-in-out; // à réactiver si fade souhaité
&.animate {
transform: scale(1.02); // léger effet smooth sur changement
}
}
.arrow {
position: absolute;
top: 50%;
transform: translateY(-50%);
background: #00aaff;
border-radius: 50%;
padding: 5px 10px;
color: white;
cursor: pointer;
content
&.left {
left: 10px;
}
&.right {
right: 10px;
}
}
// #prevArrow{
// &::before{
// content:url("../images/pictos/fleche-droite-dans-rond.png");
// display: block;
// transform: scaleX(-1);
// width: 50px;
// }
// }
// #nextArrow{
// &::before{
// content:url("../images/pictos/fleche-droite-dans-rond.png");
// display: block;
// }
// }
}
.caption {
margin-top: 10px;
font-family: sans-serif;
}
.thumbnails-wrapper {
position: relative;
max-width: 100%;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
.thumb-arrow {
cursor: pointer;
padding: 5px 10px;
background: #00aaff;
color: white;
border-radius: 50%;
user-select: none;
z-index: 2;
// font-weight: bold;
&.left {
margin-right: 10px;
}
&.right {
margin-left: 10px;
}
}
.thumbnails {
display: flex;
gap: 10px;
overflow-x: auto;
scroll-behavior: smooth;
max-width: 100%;
padding: 10px 0;
scrollbar-width: none; // Firefox
&::-webkit-scrollbar {
display: none; // Chrome, Safari
}
img {
width: 60px;
height: 60px;
object-fit: cover;
border: 2px solid transparent;
cursor: pointer;
&.active {
border-color: #00aaff;
}
}
}
}
}
// Masquer les images Drupal originales (facultatif)
.field__items {
display: none;
}
}
}
// }
}
@@ -10,6 +10,7 @@
@media (max-width: 550px) {
padding-top: 0rem;
}
.block-region-top{
display: flex;
flex-direction: column;
@@ -18,27 +19,31 @@
grid-template-columns: 1fr 2fr; /* 1/3 pour l'image, 2/3 pour le contenu */
gap: 0.5rem;
}
.block-entity-fieldnodefield-images{
.block-entity-fieldnodefield-images {
width: fit-content;
// padding-right: 2rem;
padding-left: 25%;
@media screen and (min-width:1100px) {
grid-column: 1;
grid-row: 1 /span 7; /* Prendre toutes les lignes disponibles */
align-self: start; /* S'assurer qu'il commence en haut */
justify-self: end;
margin-left: 2rem;
@media (min-width: 1100px) {
grid-column: 1;
grid-row: 1 / span 7;
align-self: start;
justify-self: end;
margin-left: 2rem;
}
@media (max-width: 1100px) {
padding-left: 13%;
padding-left: 13%;
}
@media (max-width: 550px) {
width: 100vw;
padding: 0;
width: 100vw;
padding: 0;
}
}
}
.block-block-content4e5df355-e76c-4e44-bec0-e211d94f2640,
.block-entity-fieldnodefield-type-de-ressource,
.block-entity-fieldnodetitle,
@@ -164,6 +169,8 @@
}
.block-region-top:has(.type-de-media-video)
.block-region-top:has(.type-de-media-video){
}
@@ -181,6 +188,7 @@
display: none;
}
}
.layout__region--first{ // menu ancres a gauche
margin-top: 3rem;
position: relative;
@@ -346,7 +346,7 @@
h3.type-les-projets-en-images {
width: 80%;
border-top: solid 2px rgba(0, 0, 0, 0.3);
padding-top: 4rem;
padding-top: 4 rem;
&:before{
content:url("../images/pictos/picto-ressource-projetsimages.svg");
padding-right: 1rem;
+1
View File
@@ -53,6 +53,7 @@
@import "pages/_incubateur";
@import "pages/_lincubateur_newpage";
@import "pages/ressources";
@import "pages/ressource-type-en-images";