Skip to content
Code-Schnipsel Gruppen Projekte
Commit 59fab9ae erstellt von Dominik Chrzanowski's avatar Dominik Chrzanowski
Dateien durchsuchen

Merge branch 'dev' of https://dev.quiqqer.com/quiqqer/package-bricks into dev

Übergeordnete cb626552 b79a699a
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
Keine zugehörigen Merge Requests gefunden
......@@ -7,7 +7,12 @@
{if $imageOnLeft}
<div class="quiqqer-textImage-box quiqqer-textImage-image {$fullImageHeight} {$imgWidthClass} mobile-grid-100">
{if $img}
{image src=$img width=$maxImageWidth class={$imageShadow}}
{assign var=inlineStyle value=''}
{if $maxImageWidth}
{assign var=inlineStyle value="max-width: {$maxImageWidth}px; width: 100%;"}
{/if}
{image src=$img width=$maxImageWidth style=$inlineStyle class={$imageShadow}}
{/if}
</div>
<div class="quiqqer-textImage-box quiqqer-textImage-content {$textWidthClass} mobile-grid-100"
......@@ -37,7 +42,12 @@
</div>
<div class="quiqqer-textImage-box quiqqer-textImage-image {$fullImageHeight} {$imgWidthClass} mobile-grid-100">
{if $img}
{image src=$img width=$maxImageWidth class={$imageShadow}}
{assign var=inlineStyle value=''}
{if $maxImageWidth}
{assign var=inlineStyle value="max-width: {$maxImageWidth}px; width: 100%;"}
{/if}
{image src=$img width=$maxImageWidth style=$inlineStyle class={$imageShadow}}
{/if}
</div>
{/if}
......
......@@ -88,10 +88,16 @@ public function getBody()
if ($this->getAttribute('fullImageHeight')) {
$fullImageHeight = 'quiqqer-textImage-image__fullImageHeight';
}
$maxImageWidth = false;
if (intval($this->getAttribute('maxImageWidth')) > 0) {
$maxImageWidth = intval($this->getAttribute('maxImageWidth'));
}
$Engine->assign([
'this' => $this,
'img' => $this->getAttribute('image'),
'maxImageWidth' => intval($this->getAttribute('maxImageWidth')),
'maxImageWidth' => $maxImageWidth,
'imageOnLeft' => $this->getAttribute('imageOnLeft'),
'imageShadow' => $shadow,
'fullImageHeight' => $fullImageHeight,
......
0% Lade oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren