From 1b2479429af8d420ca94824f06f447415d892be1 Mon Sep 17 00:00:00 2001 From: Michael <michael.danielczok@gmail.com> Date: Mon, 16 Nov 2015 14:13:46 +0100 Subject: [PATCH] =?UTF-8?q?Inhalt=20in=20fehlenden=20Bricks=20hinzugef?= =?UTF-8?q?=C3=BCgt.=20Image=20Brick:=20das=20Bild=20wird=20zentriert.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/QUI/Bricks/Controls/BoxContent.html | 11 ++++++++--- lib/QUI/Bricks/Controls/ContentSwitcher.html | 14 ++++++++++---- lib/QUI/Bricks/Controls/Image.css | 10 +++++++--- lib/QUI/Bricks/Controls/Image.html | 20 ++++++++++++-------- 4 files changed, 37 insertions(+), 18 deletions(-) diff --git a/lib/QUI/Bricks/Controls/BoxContent.html b/lib/QUI/Bricks/Controls/BoxContent.html index 22e881a..cd98ed3 100644 --- a/lib/QUI/Bricks/Controls/BoxContent.html +++ b/lib/QUI/Bricks/Controls/BoxContent.html @@ -1,10 +1,15 @@ <div class="quiqqer-box-content"> -{foreach from=$entries item=entry} + {if $this->getAttribute('content')} + <div class="grid-100 grid-parent"> + {$this->getAttribute('content')} + </div> + {/if} + {foreach from=$entries item=entry} <div class="box-content-entry{$extraClass}"> <h4 title="{$entry.title|escape:"html"}"> - {$entry.title} + {$entry.title} </h4> <p>{$entry.text}</p> </div> -{/foreach} + {/foreach} </div> \ No newline at end of file diff --git a/lib/QUI/Bricks/Controls/ContentSwitcher.html b/lib/QUI/Bricks/Controls/ContentSwitcher.html index 08b6e0f..21c102e 100644 --- a/lib/QUI/Bricks/Controls/ContentSwitcher.html +++ b/lib/QUI/Bricks/Controls/ContentSwitcher.html @@ -1,9 +1,15 @@ +{if !$this->getAttribute('content') == ""} +<div class="grid-100 grid-parent"> + {$this->getAttribute('content')} +</div> +{/if} + {foreach from=$entries item=entry key=key} {assign var=img value=$entry.img} <!-- display on desktops, replace text and image position by adding a new entry --> -<section class="content-switcher hide-on-mobile"> +<div class="content-switcher hide-on-mobile"> {assign var=modKey value=$key+1} {if $modKey && $modKey % 2 !== 0 } <div class="content-switcher-image"> @@ -27,10 +33,10 @@ {/if} </div> {/if} -</section> +</div> <!-- for small screens: image always comes above the text --> -<section class="content-switcher hide-on-desktop"> +<div class="content-switcher hide-on-desktop"> <div class="content-switcher-image"> {if $img != ""} {image src=$entry.img width=300} @@ -40,6 +46,6 @@ <h1>{$entry.title}</h1> <p>{$entry.content}</p> </div> -</section> +</div> {/foreach} \ No newline at end of file diff --git a/lib/QUI/Bricks/Controls/Image.css b/lib/QUI/Bricks/Controls/Image.css index c757639..1243f58 100644 --- a/lib/QUI/Bricks/Controls/Image.css +++ b/lib/QUI/Bricks/Controls/Image.css @@ -1,5 +1,9 @@ -.brick-image > p { - margin-bottom: 20px; +.brick-image-text { + margin-bottom: 40px; +} + +.brick-image-picture-container { + text-align: center; } a.brick-image-link:hover { @@ -13,6 +17,6 @@ a.brick-image-link { display: block; } -img.brick-image { +.brick-image-picture { max-width: 100%; } \ No newline at end of file diff --git a/lib/QUI/Bricks/Controls/Image.html b/lib/QUI/Bricks/Controls/Image.html index 3ea9a97..a3ddfe5 100644 --- a/lib/QUI/Bricks/Controls/Image.html +++ b/lib/QUI/Bricks/Controls/Image.html @@ -2,16 +2,20 @@ {assign var=link value=$brickLink} <dev class="content-body brick-image"> + {if !$this->getAttribute('content') == ""} + <div class="grid-100 grid-parent brick-image-text"> {$this->getAttribute('content')} - - {if $link != ""} - <a class="brick-image-link" href="{$link}"> + </div> {/if} - {image src=$img class="brick-image"} - - {if $link != ""} - </a> - {/if} + <div class="grid-100 grid-parent brick-image-picture-container"> + {if $link != ""} + <a class="brick-image-link" href="{$link}"> + {/if} + {image src=$img class="brick-image-picture"} + {if $link != ""} + </a> + {/if} + </div> </dev> \ No newline at end of file -- GitLab