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);
|
||||
}
|
||||
|
||||
@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) {
|
||||
.anchors-strip {
|
||||
display: none;
|
||||
|
|
|
|||
|
|
@ -28,5 +28,13 @@ tabs:
|
|||
- text
|
||||
- image
|
||||
- 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
|
||||
|
|
|
|||
|
|
@ -23,7 +23,8 @@
|
|||
<?php endif ?>
|
||||
<?php foreach ($sectionPage->section()->toLayouts() as $layout): ?>
|
||||
<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() ?>"
|
||||
>
|
||||
<?php foreach ($layout->columns() as $column): ?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue