diff --git a/lib/QUI/Bricks/Controls/BoxContent.css b/lib/QUI/Bricks/Controls/BoxContent.css index cafeef3e6ed52deed486c8bd84e160f8b39b81d0..04aa364fa19eef0e7bcda278ce500d9c969d9b26 100644 --- a/lib/QUI/Bricks/Controls/BoxContent.css +++ b/lib/QUI/Bricks/Controls/BoxContent.css @@ -1,8 +1,79 @@ -.box-content { - display: flex; - align-content: center; +.quiqqer-box-content { + width: 100%; } .box-content-entry { - padding-bottom: 40px; + float: left; + padding-top: 20px; + padding-bottom: 0px; +} + +.box-content-entry h4 { + width: 100%; + white-space: nowrap; + overflow: hidden; + -ms-text-overflow: ellipsis; + text-overflow: ellipsis; +} + + +.box-content-entry-1 { + width: 100%; +} + +.box-content-entry-2 { + width: 50%; +} + +.box-content-entry-3 { + width: 33%; +} + +.box-content-entry-4 { + width: 25%; +} + +.box-content-entry-5 { + width: 20%; +} + +.box-content-entry-6 { + width: 16.6666%; +} + +.box-content-entry-7 { + width: 14.27%; +} + +.box-content-entry-8 { + width: 12.5%; +} + +.box-content-entry-9 { + width: 11.11%; +} + +.box-content-entry-10 { + width: 10%; +} + + +@media screen and (max-width: 767px) { + .quiqqer-box-content { + padding-top: 20px; + } + + .box-content-entry { + padding-top: 0; + padding-bottom: 40px; + text-align: center; + width: 50% !important; + } +} + + +@media screen and (max-width: 460px) { + .box-content-entry { + width: 100% !important; + } } \ No newline at end of file diff --git a/lib/QUI/Bricks/Controls/BoxContent.html b/lib/QUI/Bricks/Controls/BoxContent.html index 9979e8e195bb0756b8d6ebc6aac4aa3569d0dd34..22e881a9c0707264e5f87457041e41cb74231765 100644 --- a/lib/QUI/Bricks/Controls/BoxContent.html +++ b/lib/QUI/Bricks/Controls/BoxContent.html @@ -1,25 +1,10 @@ - -<section class="mobile-grid-100 grid-100 box-content grid-parent"> - - <div class="row obile-grid-100 grid-100 grid-parent"> - {foreach from=$entries item=entry key=key} - {assign var=modKey value=$key+1} - - <div class="box-content-entry - {if {count($entries)} == 1 }grid-100{/if} - {if {count($entries)} == 2 }grid-50{/if} - {if {count($entries)} == 3 }grid-33{/if} - {if {count($entries)} > 3 }grid-25{/if} - "> - <h4>{$entry.title}</h4> - <p>{$entry.text}</p> - </div> - - {/foreach} - {if $modKey && $modKey % 4 == 0 && !$entries|end} - </div> - <div class="row"> - {/if} +<div class="quiqqer-box-content"> +{foreach from=$entries item=entry} + <div class="box-content-entry{$extraClass}"> + <h4 title="{$entry.title|escape:"html"}"> + {$entry.title} + </h4> + <p>{$entry.text}</p> </div> - -</section> \ No newline at end of file +{/foreach} +</div> \ No newline at end of file diff --git a/lib/QUI/Bricks/Controls/BoxContent.php b/lib/QUI/Bricks/Controls/BoxContent.php index a41ba9629fc4e26077569aaf591b79b164669044..6656fc0a741a658fd9e7b300a95c01ba70312d5b 100644 --- a/lib/QUI/Bricks/Controls/BoxContent.php +++ b/lib/QUI/Bricks/Controls/BoxContent.php @@ -50,9 +50,50 @@ public function getBody() $entries = json_decode($entries, true); } + $count = count($entries); + $extraClass = ''; + + switch ($count) { + + case 1: + $extraClass = ' box-content-entry-1'; + break; + case 2: + $extraClass = ' box-content-entry-2'; + break; + case 3: + $extraClass = ' box-content-entry-3'; + break; + case 4: + $extraClass = ' box-content-entry-4'; + break; + case 5: + $extraClass = ' box-content-entry-5'; + break; + case 6: + $extraClass = ' box-content-entry-6'; + break; + case 7: + $extraClass = ' box-content-entry-7'; + break; + case 8: + $extraClass = ' box-content-entry-8'; + break; + case 9: + $extraClass = ' box-content-entry-9'; + break; + case 10: + $extraClass = ' box-content-entry-10'; + break; + + } + + + $Engine->assign(array( 'this' => $this, - 'entries' => $entries + 'entries' => $entries, + 'extraClass' => $extraClass )); diff --git a/lib/QUI/Bricks/Controls/SideBox4.css b/lib/QUI/Bricks/Controls/SideBox4.css index b3d3a0b0fabb01e25168df347cb9035c0207693a..fb23e9e60a387019bd260f9928537b17b7b8282b 100644 --- a/lib/QUI/Bricks/Controls/SideBox4.css +++ b/lib/QUI/Bricks/Controls/SideBox4.css @@ -36,8 +36,11 @@ .sidebox4-container-image { - width: auto; - height: 250px; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border-radius: 15px; + width: 100%; + height: auto; } header { @@ -79,7 +82,7 @@ h3.sidebox4-header { width: 100% !important; } - img { + .sidebox4-container-image { width: auto; height: 300px; } diff --git a/lib/QUI/Bricks/Controls/SideBox4.html b/lib/QUI/Bricks/Controls/SideBox4.html index dbfc7c2677d537c909ffd7ee4bf6910d4a83fd2b..98333e840b86acfea607f12bcac58cb2415cfaf2 100644 --- a/lib/QUI/Bricks/Controls/SideBox4.html +++ b/lib/QUI/Bricks/Controls/SideBox4.html @@ -14,9 +14,7 @@ {if $this->getAttribute( 'showImage' )} - <div href="{url site=$Child}" class="sidebox4-container"> {image src=$Child->getAttribute('image_site') width=650 class="sidebox4-container-image"} - </div> {/if} {if $this->getAttribute( 'showTitle' ) || $this->getAttribute( 'showShort' )} diff --git a/lib/QUI/Bricks/Controls/SimpleGoogleMaps.php b/lib/QUI/Bricks/Controls/SimpleGoogleMaps.php index a61137016bc1503f546cefb43c9ec41791526060..3c8fb678bd219b6acaa5b99f1e0d1d6947bd3150 100644 --- a/lib/QUI/Bricks/Controls/SimpleGoogleMaps.php +++ b/lib/QUI/Bricks/Controls/SimpleGoogleMaps.php @@ -49,13 +49,11 @@ public function getBody() $query = http_build_query(array( 'key' => $this->getAttribute('api'), - 'q' => "{$brickCity}" + 'q' => "{$brickTitle},{$brickZip},{$brickStreet},{$brickCity}" )); $url = 'https://www.google.com/maps/embed/v1/place?'. $query; - echo $url; - $Engine->assign(array( 'url' => $url ));