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

Content Switcher:

- Vertikaler Abstand zwischen einzelnen Einträgen angepasst
- Darstellung auf Handys verbessert. Inhalt und Bild werden nicht bei jedem zweiten Eintrag getauscht, sondern es kommt immer ein Bild und danach der zugehörige Text.

Google Maps:
- der API script ist in HTML Datei eingebunden (nur als Zwischenlösung)
Übergeordneter 6b35415c
No related branches found
No related tags found
Keine zugehörigen Merge Requests gefunden
.content-switcher {
display: flex;
min-height: 460px;
min-height: 360px;
align-items: center;
flex-direction: row;
}
......@@ -22,7 +22,11 @@
@media screen and (max-width: 767px){
.content-switcher {
flex-direction: column;
border-bottom: 2px solid #e4e4e4;
border-bottom: 2px solid #f5f5f5;
}
.content-switcher:last-child {
border-bottom: none;
}
.content-switcher-image {
......
......@@ -2,7 +2,9 @@
{foreach from=$entries item=entry key=key}
{assign var=img value=$entry.img}
<div class="content-switcher">
<!-- display on desktops, replace text and image position by adding a new entry -->
<div class="content-switcher hide-on-mobile">
{assign var=modKey value=$key+1}
{if $modKey && $modKey % 2 !== 0 }
<div class="content-switcher-image">
......@@ -31,4 +33,20 @@
</div>
{/if}
</div>
<!-- for small screens: image always comes above the text -->
<div class="content-switcher hide-on-desktop">
<div class="content-switcher-image">
{if $img != ""}
<img width=300 height=auto src="{$entry.img}"/>
{else}
<img style="display: none;">
{/if}
</div>
<div class="content-switcher-content">
<h1>{$entry.title}</h1>
<p>{$entry.content}</p>
</div>
</div>
{/foreach}
\ No newline at end of file
<script src="http://maps.googleapis.com/maps/api/js"></script>
<script>
var myCenter = new google.maps.LatLng(51.149168, 7.106579);
......
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