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

Bricks Anpassungen:

Box Content: Mehr Einträge möglich. Für Mobile optimiert.
Side Box 4: img als Klasse. Logik in PHP.
Google Maps: Alle Einträge werden beachtet.
Übergeordneter 869159b2
No related branches found
No related tags found
Keine zugehörigen Merge Requests gefunden
.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
<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
......@@ -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
));
......
......@@ -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;
}
......
......@@ -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' )}
......
......@@ -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
));
......
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren