grid images

This commit is contained in:
2026-04-09 12:12:31 +02:00
parent b6458c4e05
commit da6fb958d2
5 changed files with 1013 additions and 3 deletions
@@ -0,0 +1,281 @@
.path-projets-complets {
.layout-container header{
top: inherit !important;
left: inherit !important;
}
.layout-content{
width: 60vw;
margin: auto;
}
// =========================
// ÉCRAN
// =========================
span {
display: none;
}
.node-type-projet {
border-bottom: 1px solid black;
padding-bottom: 5rem;
margin-bottom: 5rem;
}
.projet-content {
display: flex;
flex-direction: column;
}
.field--name-field-photo {
// height: 66vh;
.field__label {
display: none;
}
.field__items {
height: 100%;
display: grid;
gap: 3px;
}
.field__item {
overflow: hidden;
aspect-ratio: 3 / 2;
}
.field__item img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
.image-field-caption {
display: none;
}
// 1 seule image
.field__items:has(.field__item:only-child) {
grid-template-columns: 1fr;
// grid-template-rows: 1fr;
}
.field__items:has(.field__item:only-child) .field__item {
grid-column: 1;
// grid-row: 1;
}
// Plusieurs images
.field__items:has(.field__item:nth-child(2)) {
grid-template-columns: repeat(3, 1fr);
// grid-template-rows: 4fr 2fr 2fr;
}
.field__items:has(.field__item:nth-child(2)) .field__item:first-child {
grid-column: 1 / 4;
// grid-row: 1;
}
// facultatif : max 7 images affichées
.field__items .field__item:nth-child(n + 8) {
display: none;
}
}
// .field--name-field-photo {
// order: 1;
// .field__label {
// display: none;
// }
// .field__items {
// display: grid;
// grid-template-columns: repeat(3, 1fr);
// grid-template-rows: 500px 150px 150px;
// gap: 3px;
// }
// .field__item:first-child {
// grid-column: 1 / 4;
// grid-row: 1;
// img {
// max-height: 500px;
// }
// }
// .field__item {
// overflow: hidden;
// }
// .field__item img {
// width: 100%;
// height: 100%;
// object-fit: cover;
// display: block;
// }
// }
.field--name-title {
order: 2;
font-family: "Marianne";
font-size: 2rem;
font-weight: 800;
color: $blue-light;
@media (max-width: 1624px) {
font-size: 2.3rem;
}
@media (max-width: 1384px) {
font-size: 2rem;
}
@media (max-width: 1216px) {
font-size: 2rem;
}
@media (max-width: 810px) {
font-size: 1.7rem;
}
a {
color: $blue-light;
}
}
.field--name-field-equipe {
order: 3;
color: $blue-dark;
font-size: 1.5rem;
font-weight: 900;
text-transform: uppercase;
@media (max-width: 1624px) {
font-size: 1.3rem;
}
@media (max-width: 1216px) {
font-size: 1.1rem;
}
@media (max-width: 810px) {
font-size: 1rem;
}
.field__label {
display: none;
}
}
.field--name-field-incube {
order: 4;
width: fit-content;
background-color: $red;
color: white;
font-weight: 800;
padding-right: 0.3rem;
padding-left: 0.2rem;
flex-direction: row;
&::before {
content: ' Projet ';
padding-right: 0.5rem;
}
.field__item {
display: none;
}
}
.field--name-field-neuf-rehabilitation,
.field--name-field-encours-fini {
display: none;
}
.field--name-field-region {
order: 5;
width: 30%;
position: relative;
height: 80px;
text-align: center;
padding-right: 1rem;
@media (max-width: 479px) {
width: 100%;
}
.field__label {
display: none;
}
&::before {
content: url("../images/pictos/picto_lieu.svg");
min-width: 30px;
height: auto;
padding-right: 1rem;
position: absolute;
left: 0;
margin-top: .83em;
margin-left: 1rem;
}
}
.field--name-field-type-de-moa {
order: 6;
}
.field--name-field-type-de-projet {
order: 7;
}
.field--name-field-etape-du-projet {
order: 8;
}
.field--name-field-textes {
order: 9;
.field__label {
display: none;
}
.field--name-field-titre {
color: $blue-dark;
font-size: 1.2rem;
font-weight: 900;
text-transform: uppercase;
margin-bottom: 0 !important;
flex-direction: row;
&::after {
content: ' :';
padding-left: 0.5rem;
}
}
}
.field--name-field-etape-du-projet,
.field--name-field-type-de-projet,
.field--name-field-type-de-moa {
a {
color: black;
}
.field__label {
color: $blue-dark;
font-size: 1.2rem;
font-weight: 900;
text-transform: uppercase;
margin-bottom: 0 !important;
flex-direction: row;
&::after {
content: ':';
padding-left: 0.5rem;
}
}
}
}
@@ -0,0 +1,216 @@
// =========================
// PRINT
// =========================
.path-projets-complets {
@media print {
.views-row {
display: block !important;
margin: 0 !important;
overflow: visible !important;
float: none !important;
position: static !important;
}
.node-type-projet {
break-before: page;
page-break-before: always;
border: 1px solid black;
margin: 0 !important;
overflow: visible !important;
}
.views-row:first-child .node-type-projet {
break-before: auto;
page-break-before: auto;
}
.projet-content {
display: block !important;
}
.projet-header-print {
display: block;
break-inside: avoid;
page-break-inside: avoid;
overflow: visible !important;
}
.projet-body-print {
display: block;
break-before: page;
page-break-before: always;
overflow: visible !important;
}
.projet-header-print .field,
.projet-header-print .field__items,
.projet-header-print .field__item,
.projet-header-print h2,
.projet-header-print p,
.projet-header-print blockquote {
break-inside: avoid;
page-break-inside: avoid;
}
.projet-body-print .field,
.projet-body-print .field__items,
.projet-body-print .field__item,
.projet-body-print .paragraph,
.projet-body-print p,
.projet-body-print ul,
.projet-body-print li {
break-inside: auto;
page-break-inside: auto;
overflow: visible !important;
}
.projet-header-print .field--name-field-photo {
margin-bottom: 1.5rem;
.field__label {
display: none;
}
.field__items {
display: grid !important;
grid-template-columns: repeat(3, 1fr);
// grid-template-rows: 500px 150px 150px;
gap: 3px;
}
.field__item:first-child {
grid-column: 1 / 4;
grid-row: 1;
}
.field__item {
overflow: hidden;
}
.field__item img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
}
.projet-header-print .field--name-title {
font-family: "Marianne";
font-size: 1.5rem;
font-weight: 800;
color: $blue-light;
margin-bottom: 1rem;
a {
color: $blue-light;
text-decoration: none;
}
}
.projet-header-print .field--name-field-equipe {
color: $blue-dark;
font-size: 1.2rem;
font-weight: 900;
text-transform: uppercase;
margin-bottom: .5rem;
.field__label {
display: none;
}
}
.projet-header-print .field--name-field-incube {
width: fit-content;
background-color: $red;
color: white;
font-weight: 800;
padding-right: 0.3rem;
padding-left: 0.2rem;
display: flex;
flex-direction: row;
&::before {
content: ' Projet ';
padding-right: 0.5rem;
}
.field__item {
display: none;
}
}
.projet-body-print .field--name-field-region {
width: 30%;
position: relative;
height: 80px;
text-align: center;
padding-right: 1rem;
.field__label {
display: none;
}
&::before {
content: url("../images/pictos/picto_lieu.svg");
min-width: 30px;
height: auto;
padding-right: 1rem;
position: absolute;
left: 0;
margin-top: .83em;
margin-left: 1rem;
}
}
.projet-body-print .field--name-field-textes {
.field__label {
display: none;
}
.field--name-field-titre {
color: $blue-dark;
font-size: 1.2rem;
font-weight: 900;
text-transform: uppercase;
margin-bottom: 0 !important;
&::after {
content: ' :';
padding-left: 0.5rem;
}
}
}
.projet-body-print .field--name-field-type-de-moa,
.projet-body-print .field--name-field-type-de-projet,
.projet-body-print .field--name-field-etape-du-projet {
a {
color: black;
text-decoration: none;
}
.field__label {
color: $blue-dark;
font-size: 1.2rem;
font-weight: 900;
text-transform: uppercase;
margin-bottom: 0 !important;
&::after {
content: ':';
padding-left: 0.5rem;
}
}
}
.field--name-field-neuf-rehabilitation,
.field--name-field-encours-fini,
svg.ext {
display: none !important;
}
}
}
+7 -2
View File
@@ -17,14 +17,19 @@
// @import "global/_nodetyperessource.scss";
/*global*/
@import "global/_print";
@import "global/print/projets-complets-ecran";
@import "global/print/projets-complets-print";
/*pages*/
/*
@import "pages/partials/header_footer";
@import "pages/home";*/
@import "pages/home";
*/
// @import "pages/off_canvas_page_wrapper";