From 4f6aeb014861ce5320e844b6057b79cf644be3fa Mon Sep 17 00:00:00 2001 From: Henning Leutz <leutz@pcsg.de> Date: Tue, 11 Feb 2020 15:37:51 +0100 Subject: [PATCH] refactor: mobild and desktop detection -> server side --- src/QUI/Bricks/Controls/Slider/PromosliderWallpaper.html | 4 ++-- .../Controls/Slider/PromosliderWallpaper2Content.html | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/QUI/Bricks/Controls/Slider/PromosliderWallpaper.html b/src/QUI/Bricks/Controls/Slider/PromosliderWallpaper.html index 0082cb4..55acb32 100644 --- a/src/QUI/Bricks/Controls/Slider/PromosliderWallpaper.html +++ b/src/QUI/Bricks/Controls/Slider/PromosliderWallpaper.html @@ -1,5 +1,5 @@ <div class="quiqqer-bricks-promoslider-wallpaper-container"> - {if $isMobile} + {if $isDesktop} {strip} <ul class="hide-on-mobile quiqqer-bricks-promoslider-mobileSlides"> {foreach $desktopSlides as $key => $slide} @@ -42,7 +42,7 @@ {/strip} {/if} - {if $isDesktop} + {if $isMobile} {strip} <ul class="hide-on-desktop quiqqer-bricks-promoslider-desktopSlides"> {foreach $mobileSlides as $key => $slide} diff --git a/src/QUI/Bricks/Controls/Slider/PromosliderWallpaper2Content.html b/src/QUI/Bricks/Controls/Slider/PromosliderWallpaper2Content.html index 47adb2b..9523cc7 100644 --- a/src/QUI/Bricks/Controls/Slider/PromosliderWallpaper2Content.html +++ b/src/QUI/Bricks/Controls/Slider/PromosliderWallpaper2Content.html @@ -1,6 +1,7 @@ <div class="quiqqer-bricks-promoslider-wallpaper-container"> + {if $isDesktop} {strip} - <ul class="hide-on-mobile"> + <ul class="hide-on-mobile quiqqer-bricks-promoslider-mobileSlides"> {foreach $desktopSlides as $key => $slide} <li data-image="{image image=$slide.image onlysrc=1}" data-href="{$slide.url}" data-newTab="{$slide.newTab}"> {if $slide.url}<a href="{$slide.url}" {if $slide.newTab} target="_blank" {/if}>{/if} @@ -31,10 +32,11 @@ {/foreach} </ul> {/strip} + {/if} {if $isMobile} {strip} - <ul class="hide-on-desktop"> + <ul class="hide-on-desktop quiqqer-bricks-promoslider-desktopSlides"> {foreach $mobileSlides as $key => $slide} <li data-image="{image image=$slide.image onlysrc=1}" data-href="{$slide.url}" data-newTab="{$slide.newTab}"> {if $slide.url}<a href="{$slide.url}" {if $slide.newTab} target="_blank" {/if}>{/if} -- GitLab