section - add img max-height
This commit is contained in:
parent
8e48dc0573
commit
3e6f00c387
3 changed files with 17 additions and 1 deletions
|
|
@ -79,6 +79,13 @@
|
||||||
transform: rotate(-45deg);
|
transform: rotate(-45deg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media screen and (min-width: 800px) {
|
||||||
|
.section__row.fixed-img-height img {
|
||||||
|
max-height: var(--height);
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 800px) {
|
@media screen and (max-width: 800px) {
|
||||||
.anchors-strip {
|
.anchors-strip {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
|
||||||
|
|
@ -28,5 +28,13 @@ tabs:
|
||||||
- text
|
- text
|
||||||
- image
|
- image
|
||||||
- links-list
|
- links-list
|
||||||
|
settings:
|
||||||
|
fields:
|
||||||
|
imgHeight:
|
||||||
|
label: Limiter la hauteur des images de la rangée
|
||||||
|
type: number
|
||||||
|
after: % de la largeur de l'écran.
|
||||||
|
help: Laisser vide une hauteur illimitée.
|
||||||
|
width: 1/2
|
||||||
|
|
||||||
filesTab: tabs/files
|
filesTab: tabs/files
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,8 @@
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
<?php foreach ($sectionPage->section()->toLayouts() as $layout): ?>
|
<?php foreach ($sectionPage->section()->toLayouts() as $layout): ?>
|
||||||
<div
|
<div
|
||||||
class="section__row grid"
|
class="section__row grid<?= e($layout->attrs()->imgHeight()->isNotEmpty() == 'true', ' fixed-img-height') ?>"
|
||||||
|
<?= e($layout->attrs()->imgHeight()->isNotEmpty() == 'true', ' style="--height: ' . $layout->attrs()->imgHeight() . 'vw;" ') ?>
|
||||||
id="<?= $layout->id() ?>"
|
id="<?= $layout->id() ?>"
|
||||||
>
|
>
|
||||||
<?php foreach ($layout->columns() as $column): ?>
|
<?php foreach ($layout->columns() as $column): ?>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue