Skip to content
Code-Schnipsel Gruppen Projekte
Commit 63b81208 erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

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

Übergeordnete e76efd79 523af7a2
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
Keine zugehörigen Merge Requests gefunden
Pipeline-Nr.
...@@ -200,6 +200,10 @@ ...@@ -200,6 +200,10 @@
<locale group="quiqqer/bricks" var="ContentSwitcher.title"/> <locale group="quiqqer/bricks" var="ContentSwitcher.title"/>
</setting> </setting>
<setting name="startImgOnLeft" type="checkbox">
<locale group="quiqqer/bricks" var="ContentSwitcher.startImgOnLeft"/>
</setting>
<setting name="entries" data-qui="package/quiqqer/bricks/bin/Controls/ContentSwitcher"> <setting name="entries" data-qui="package/quiqqer/bricks/bin/Controls/ContentSwitcher">
<locale group="quiqqer/bricks" var="ContentSwitcher.entries"/> <locale group="quiqqer/bricks" var="ContentSwitcher.entries"/>
</setting> </setting>
......
...@@ -503,18 +503,27 @@ M&ouml;chten Sie die Bausteine aus der Bausteinzone entfernen?</p>]]></de> ...@@ -503,18 +503,27 @@ M&ouml;chten Sie die Bausteine aus der Bausteinzone entfernen?</p>]]></de>
<locale name="bricks.ContentSwitcher.title"> <locale name="bricks.ContentSwitcher.title">
<de><![CDATA[Baustein: Content Switcher]]></de> <de><![CDATA[Baustein: Content Switcher]]></de>
<en><![CDATA[Content with image]]></en> <en><![CDATA[Content with image]]></en>
<pl><![CDATA[Content Switcher: treść i zdjęcie]]></pl>
</locale> </locale>
<locale name="bricks.ContentSwitcher.description"> <locale name="bricks.ContentSwitcher.description">
<de><![CDATA[Inhalt und Bild werden links und rechts abwechslend angezeigt]]></de> <de><![CDATA[Inhalt und Bild werden links und rechts abwechslend angezeigt]]></de>
<en><![CDATA[]]></en> <en><![CDATA[]]></en>
<pl><![CDATA[Treść oraz zdjęcia będą wyświetlane naprzemiennie]]></pl>
</locale> </locale>
<locale name="ContentSwitcher.title"> <locale name="ContentSwitcher.title">
<de><![CDATA[Baustein-Überschrift]]></de> <de><![CDATA[Baustein-Überschrift]]></de>
<en><![CDATA[]]></en> <en><![CDATA[Brick Title]]></en>
<pl><![CDATA[Tytuł]]></pl>
</locale>
<locale name="ContentSwitcher.startImgOnLeft">
<de><![CDATA[Fange mit Bild links an]]></de>
<en><![CDATA[Start with picture on the left]]></en>
<pl><![CDATA[Zacznij z obrazkiem z lewej strony]]></pl>
</locale> </locale>
<locale name="ContentSwitcher.entries"> <locale name="ContentSwitcher.entries">
<de><![CDATA[Einträge]]></de> <de><![CDATA[Einträge]]></de>
<en><![CDATA[]]></en> <en><![CDATA[]]></en>
<pl><![CDATA[Wpisy]]></pl>
</locale> </locale>
<!-- Simple Google Maps --> <!-- Simple Google Maps -->
......
...@@ -69,15 +69,15 @@ public function __construct($params = array()) ...@@ -69,15 +69,15 @@ public function __construct($params = array())
{ {
// default // default
$default = array( $default = array(
'type' => 'content', 'type' => 'content',
'content' => '', 'content' => '',
'title' => '', 'title' => '',
'description' => '', 'description' => '',
'project' => '', 'project' => '',
'areas' => '', 'areas' => '',
'height' => '', 'height' => '',
'width' => '', 'width' => '',
'classes' => '' 'classes' => ''
); );
$this->setAttributes($default); $this->setAttributes($default);
...@@ -339,6 +339,10 @@ public function getSettings() ...@@ -339,6 +339,10 @@ public function getSettings()
public function setSettings($settings) public function setSettings($settings)
{ {
foreach ($settings as $key => $value) { foreach ($settings as $key => $value) {
if ($key === 'classes') {
$this->addCSSClass($value);
continue;
}
$this->setSetting($key, $value); $this->setSetting($key, $value);
} }
} }
......
.content-switcher { .content-switcher {
align-items: center;
display: flex; display: flex;
min-height: 360px; min-height: 360px;
align-items: center;
flex-direction: row; flex-direction: row;
} }
.content-switcher-image { .content-switcher-image {
height: 400px;
width: 50%; width: 50%;
padding:50px; text-align: center;
display: flex; background-position: center center;
align-items: center; background-repeat: no-repeat;
justify-content: center background-size: auto auto;
text-align: center;
} }
img.content-switcher-image-img { img.content-switcher-image-img {
height: auto; max-height: 100%;
max-width: 100%; max-width: 100%;
opacity: 0;
visibility: hidden;
} }
.content-switcher-content { .content-switcher-content {
...@@ -47,3 +49,25 @@ ...@@ -47,3 +49,25 @@
} }
/* set in template or custom css */
.content-switcher-content {
min-height: 360px;
width: 580px;
padding-left: 50px;
}
.content-switcher-image {
background-position: left;
}
.push-custom {
background-position: right;
}
.pull-custom {
left: -580px;
padding-right: 50px;
padding-left: 0;
}
...@@ -6,18 +6,42 @@ ...@@ -6,18 +6,42 @@
{/if} {/if}
{foreach from=$entries item=entry key=key} {foreach from=$entries item=entry key=key}
{assign var=img value=$entry.img} {image src=$entry.img width=1000 onlysrc=true assign=img}
<div class="content-switcher"> <div class="content-switcher">
{assign var=modKey value=$key+1} {assign var=modKey value=$key+1}
<div class="content-switcher-image {if $modKey && $modKey % 2 !== 0 }push-50 mobile-pull-100{/if}">
{if !$this->getAttribute( 'startImgOnLeft' )}
<div class="content-switcher-image {if $modKey && $modKey % 2 !== 0 }push-50 mobile-pull-100
push-custom push-custom-mobile{/if}"
style="background-image: url('{$img}');"
>
{if $img != ""} {if $img != ""}
{image src=$entry.img width=300 class="content-switcher-image-img"} {image src=$entry.img width=600 class="content-switcher-image-img"}
{/if} {/if}
</div> </div>
<div class="content-switcher-content {if $modKey && $modKey % 2 !== 0 }pull-50 mobile-pull-100{/if}"> <div class="page-content content-switcher-content {if $modKey && $modKey % 2 !== 0 }pull-50 mobile-pull-100
pull-custom pull-custom-mobile{/if}">
<h2>{$entry.title}</h2>
<p>{$entry.content}</p>
</div>
{else}
<div class="page-content content-switcher-content {if $modKey && $modKey % 2 !== 0 }push-50 mobile-push-100
push-custom push-custom-mobile{/if}">
<h2>{$entry.title}</h2> <h2>{$entry.title}</h2>
<p>{$entry.content}</p> <p>{$entry.content}</p>
</div> </div>
<div class="content-switcher-image {if $modKey && $modKey % 2 !== 0 }pull-50 mobile-pull-100
pull-custom pull-custom-mobile{/if}"
style="background-image: url('{$img}');"
>
{if $img != ""}
{image src=$entry.img width=600 class="content-switcher-image-img"}
{/if}
</div>
{/if}
</div> </div>
{/foreach} {/foreach}
\ No newline at end of file
{assign var=img value=$brickImage} {assign var=img value=$brickImage}
{assign var=link value=$brickLink} {assign var=link value=$brickLink}
<dev class="content-body brick-image"> <div class="content-body brick-image">
{if !$this->getAttribute('content') == ""} {if !$this->getAttribute('content') == ""}
<div class="grid-100 grid-parent brick-image-text"> <div class="grid-100 grid-parent brick-image-text">
...@@ -18,4 +18,4 @@ ...@@ -18,4 +18,4 @@
{/if} {/if}
</div> </div>
</dev> </div>
\ No newline at end of file \ No newline at end of file
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