Skip to content
Code-Schnipsel Gruppen Projekte
Commit 55d36b4b erstellt von Michael's avatar Michael
Dateien durchsuchen

fix: Hintergrund, wenn kein Bild ausgewählt wurde. Hier wird kein Platzhalter angezeigt.

refactor: Übersetzungen ergänzt
feat: Neue Einstellungen -> Hintergrundfarbe und Hintergrundbild-Position
Übergeordneter b2c79bd4
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
Keine zugehörigen Merge Requests gefunden
......@@ -2,7 +2,7 @@
<quiqqer>
<bricks>
<!-- wallpaper with text and an arrow -->
<!-- wallpaper with text, image and an arrow -->
<brick control="\QUI\PresentationBricks\Controls\WallpaperTextArrow">
<title>
<locale group="quiqqer/presentation-bricks"
......@@ -19,6 +19,11 @@
var="control.WallpaperTextArrow.image-background"/>
</setting>
<setting name="image-background-fixed" type="checkbox">
<locale group="quiqqer/presentation-bricks"
var="control.WallpaperTextArrow.image-background-fixed"/>
</setting>
<setting name="image" class="media-image">
<locale group="quiqqer/presentation-bricks"
var="control.WallpaperTextArrow.image"/>
......@@ -120,6 +125,11 @@
var="control.WallpaperText.image-background"/>
</setting>
<setting name="image-background-fixed" type="checkbox">
<locale group="quiqqer/presentation-bricks"
var="control.WallpaperText.image-background-fixed"/>
</setting>
<setting name="bg-color" type="color">
<locale group="quiqqer/presentation-bricks"
var="control.WallpaperText.bg-color"/>
......
......@@ -18,6 +18,11 @@
<en><![CDATA[Background image]]></en>
<pl><![CDATA[Zdjecie tla]]></pl>
</locale>
<locale name="control.WallpaperTextArrow.image-background-fixed">
<de><![CDATA[Hintergrundbild fixieren]]></de>
<en><![CDATA[Background image fixed]]></en>
<pl><![CDATA[Nieruchome tlo (fixed)]]></pl>
</locale>
<locale name="control.WallpaperTextArrow.image">
<de><![CDATA[Bild auf der rechten Seite]]></de>
<en><![CDATA[Image on the right]]></en>
......@@ -131,10 +136,15 @@
<en><![CDATA[Background image]]></en>
<pl><![CDATA[Zdjecie tla]]></pl>
</locale>
<locale name="control.WallpaperText.height">
<de><![CDATA[Bausteinhöhe]]></de>
<en><![CDATA[Height of the brick]]></en>
<pl><![CDATA[Wysokosc widgetu]]></pl>
<locale name="control.WallpaperText.image-background-fixed">
<de><![CDATA[Hintergrundbild fixieren]]></de>
<en><![CDATA[Background image fixed]]></en>
<pl><![CDATA[Nieruchome tlo (fixed)]]></pl>
</locale>
<locale name="control.WallpaperText.bg-color">
<de><![CDATA[Hintergrundfarbe]]></de>
<en><![CDATA[Background color]]></en>
<pl><![CDATA[Kolor tla]]></pl>
</locale>
<locale name="control.WallpaperText.content-position">
<de><![CDATA[Ausrichtung]]></de>
......
......@@ -11,6 +11,10 @@
height: 100%;
}
.wallpaperText.fixed {
background-attachment: fixed;
}
@media (max-width: 767px) {
}
\ No newline at end of file
{assign var=img value=''}
{if $imageBackground}
{assign var=img value="background-image: url({image src=$imageBackground onlysrc='true'});"}
{/if}
<div class="wallpaperText"
style="background-image: url({image src=$imageBackground onlysrc='true'});"
<div class="wallpaperText {$fixed}"
style="background-color: {$bgColor}; {$img}"
>
<div class="wallpaperText-container grid-container" style="justify-content: {$contentPosition}">
<div class="grid-50 mobile-grid-100 grid-parent wallpaperText-container-content">
{if $this->getAttribute('showTitle') && $this->getAttribute('frontendTitle')}
<header class="">
<header>
<h1>{$this->getAttribute('frontendTitle')}</h1>
</header>
{/if}
......
......@@ -24,7 +24,9 @@ public function __construct($attributes = array())
{
// default options
$this->setAttributes(array(
'contentPosition' => 'left'
'imageBackgroundFixed' => 'false',
'bgColor' => 'none',
'contentPosition' => 'left'
));
parent::__construct($attributes);
......@@ -44,11 +46,23 @@ public function getBody()
{
$Engine = QUI::getTemplateManager()->getEngine();
$fixed = '';
if ($this->getAttribute('image-background-fixed')) {
$fixed = "fixed";
}
$bgColor = '#eee';
if ($this->getAttribute('bg-color')) {
$bgColor = $this->getAttribute('bg-color');
}
$Engine->assign(array(
'this' => $this,
'imageBackground' => $this->getAttribute('image-background'),
'contentPosition' => $this->getAttribute('content-position'),
// 'height' => $this->getAttribute('height')
'bgColor' => $bgColor,
'fixed' => $fixed,
'contentPosition' => $this->getAttribute('content-position')
));
return $Engine->fetch(dirname(__FILE__) . '/WallpaperText.html');
......
......@@ -6,6 +6,10 @@
position: relative;
}
.wallpaperTextArrow.fixed {
background-attachment: fixed;
}
.wallpaperTextArrow .grid-container {
height: 100%;
display: flex;
......
{assign var=img value=''}
{if $imageBackground}
{assign var=img value="background-image: url({image src=$imageBackground onlysrc='true'});"}
{/if}
<div class="wallpaperTextArrow"
style="background-image: url({image src=$imageBackground onlysrc='true'});"
>
<div class="wallpaperTextArrow {$fixed}" style="{$img}">
<div class="grid-container">
<div class="wallpaperTextArrow-content-left grid-50 mobile-grid-100 grid-parent">
{$this->getAttribute('content')}
......
......@@ -24,8 +24,9 @@ public function __construct($attributes = array())
{
// default options
$this->setAttributes(array(
'arrowType' => 'arrow-down',
'effect' => 'scale'
'imageBackgroundFixed' => 'false',
'arrowType' => 'arrow-down',
'effect' => 'scale'
));
parent::__construct($attributes);
......@@ -50,9 +51,15 @@ public function getBody()
{
$Engine = QUI::getTemplateManager()->getEngine();
$fixed = '';
if ($this->getAttribute('image-background-fixed')) {
$fixed = "fixed";
}
$Engine->assign(array(
'this' => $this,
'imageBackground' => $this->getAttribute('image-background'),
'fixed' => $fixed,
'image' => $this->getAttribute('image'),
'arrowType' => $this->getAttribute('arrow-type'),
'effect' => $this->getAttribute('effect')
......
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