Skip to content
Code-Schnipsel Gruppen Projekte
Commit cf4d1cde erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

refactor: mobild and desktop detection -> server side

Übergeordneter bafbee63
No related branches found
No related tags found
Keine zugehörigen Merge Requests gefunden
<div class="quiqqer-bricks-promoslider-wallpaper-container">
{if $isDesktop}
{strip}
<ul class="hide-on-mobile">
{foreach $desktopSlides as $key => $slide}
......@@ -39,7 +40,9 @@
{/foreach}
</ul>
{/strip}
{/if}
{if $isMobile}
{strip}
<ul class="hide-on-desktop">
{foreach $mobileSlides as $key => $slide}
......@@ -79,6 +82,7 @@
{/foreach}
</ul>
{/strip}
{/if}
</div>
<div class="quiqqer-bricks-promoslider-wallpaper-dots"></div>
......@@ -91,4 +95,4 @@
{$this->getAttribute('showarrows')}">
<span class="fa fa-chevron-right"></span>
</div>
{/if}
\ No newline at end of file
{/if}
......@@ -239,6 +239,11 @@ public function getBody()
$Engine->assign($options);
$Engine->assign([
'isMobile' => QUI\MobileDetection::isMobile(),
'isDesktop' => QUI\MobileDetection::isDesktop()
]);
return $Engine->fetch($this->getAttribute('template'));
}
}
......@@ -21,8 +21,8 @@
{if $key === 0}
<noscript>
{if $slide.url}<a href="{$slide.url}" {if $slide.newTab}target="_blank"{/if}>{/if}
{image image=$slide.image class="quiqqer-bricks-promoslider-wallpaper2Content-noScriptImage"}
{if $slide.url}<a href="{$slide.url}" {if $slide.newTab}target="_blank" {/if}>{/if}
{image image=$slide.image class="quiqqer-bricks-promoslider-wallpaper2Content-noScriptImage"}
{if $slide.url}</a>{/if}
</noscript>
{/if}
......@@ -32,6 +32,7 @@
</ul>
{/strip}
{if $isMobile}
{strip}
<ul class="hide-on-desktop">
{foreach $mobileSlides as $key => $slide}
......@@ -54,8 +55,8 @@
{if $key === 0}
<noscript>
{if $slide.url}<a href="{$slide.url}" {if $slide.newTab}target="_blank"{/if}>{/if}
{image image=$slide.image class="quiqqer-bricks-promoslider-wallpaper2Content-noScriptImage"}
{if $slide.url}<a href="{$slide.url}" {if $slide.newTab}target="_blank" {/if}>{/if}
{image image=$slide.image class="quiqqer-bricks-promoslider-wallpaper2Content-noScriptImage"}
{if $slide.url}</a>{/if}
</noscript>
{/if}
......@@ -64,16 +65,15 @@
{/foreach}
</ul>
{/strip}
{/if}
</div>
<div class="quiqqer-bricks-promoslider-wallpaper-dots"></div>
{if count($desktopSlides) > 1 && $this->getAttribute('showarrows') != 'hide'}
<div class="quiqqer-bricks-promoslider-wallpaper-prev hide-on-mobile
{$this->getAttribute('showarrows')}">
<div class="quiqqer-bricks-promoslider-wallpaper-prev hide-on-mobile {$this->getAttribute('showarrows')}">
<span class="fa fa-chevron-left"></span>
</div>
<div class="quiqqer-bricks-promoslider-wallpaper-next hide-on-mobile
{$this->getAttribute('showarrows')}">
<div class="quiqqer-bricks-promoslider-wallpaper-next hide-on-mobile {$this->getAttribute('showarrows')}">
<span class="fa fa-chevron-right"></span>
</div>
......
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