diff --git a/src/QUI/Bricks/Controls/Children/Slider.css b/src/QUI/Bricks/Controls/Children/Slider.css index fb780d2f4a72251f7e3065a2b478b8a45be2471c..e8fee2cc49e666c42b2d97e35a09cd765c2d29e6 100644 --- a/src/QUI/Bricks/Controls/Children/Slider.css +++ b/src/QUI/Bricks/Controls/Children/Slider.css @@ -14,7 +14,7 @@ .quiqqer-bricks-children-slider-container-inner { float: left; - height: calc(100% + 20px); + height: calc(100% + 22px); left: 0; overflow: auto; position: absolute; @@ -25,6 +25,8 @@ .quiqqer-bricks-children-slider-container-slide { display: inline-block; + margin: 0 !important; + padding: 0 !important; position: relative; white-space: nowrap; } @@ -32,7 +34,7 @@ .quiqqer-bricks-children-slider-child { display: inline-block; float: none; - height: 100%; + height: calc(100% - 2px); } .quiqqer-bricks-children-slider-child-display { @@ -45,9 +47,18 @@ text-align: center; } +.quiqqer-bricks-children-slider-child-display:first-child { + margin: 0 10px 0 0; +} + +.quiqqer-bricks-children-slider-child a { + display: block; +} + .quiqqer-bricks-children-slider-child-display img { transition: all 1s ease; -webkit-transition: all 1s ease; + max-height: calc(100% - 2px); width: auto; } diff --git a/src/QUI/Bricks/Controls/Children/Slider.html b/src/QUI/Bricks/Controls/Children/Slider.html index 012b98a8e78204baebcce1ef51a07ba4cca81945..c892d72f3454ab650c356a0a214f1769c98c1dc3 100644 --- a/src/QUI/Bricks/Controls/Children/Slider.html +++ b/src/QUI/Bricks/Controls/Children/Slider.html @@ -1,28 +1,30 @@ <div class="quiqqer-bricks-children-slider-container"> <div class="quiqqer-bricks-children-slider-container-inner"> <ul class="quiqqer-bricks-children-slider-container-slide" - style="height: {$this->getAttribute('height')}px" + style="height: {$this->getAttribute('height')}px;" > + {strip} {foreach from=$children item=Child} - {assign var=hasImage value=0} - {if $Child->getAttribute('image_site')} - {assign var=hasImage value=1} - {/if} + {assign var=hasImage value=0} + {if $Child->getAttribute('image_site')} + {assign var=hasImage value=1} + {/if} <li class="quiqqer-bricks-children-slider-child"> <article class="quiqqer-bricks-children-slider-child-display"> <a href="{url site=$Child}" title="{$Child->getAttribute('title')|escape:" html"}"> {if !$hasImage} - <header> - {$Child->getAttribute('title')} - </header> - {$Child->getAttribute('short')} + <header> + {$Child->getAttribute('title')} + </header> + {$Child->getAttribute('short')} {else} - {image src=$Child->getAttribute('image_site') height=$this->getAttribute('height')} + {image src=$Child->getAttribute('image_site') height=$this->getAttribute('height')} {/if} </a> </article> </li> {/foreach} + {/strip} </ul> </div> </div> \ No newline at end of file diff --git a/src/QUI/Bricks/Controls/Children/Slider.php b/src/QUI/Bricks/Controls/Children/Slider.php index d67abfa48bd33810e5797c6486dc15d7944e481a..abe95333c8ec87de5d905861d48db2cb3678f89f 100644 --- a/src/QUI/Bricks/Controls/Children/Slider.php +++ b/src/QUI/Bricks/Controls/Children/Slider.php @@ -8,7 +8,7 @@ use QUI; /** - * Class Infinite + * Class Slider * @package QUI\Bricks\Controls\Children */ class Slider extends QUI\Control