* @return string\r
*/\r
public function logos($logos, $wrapper_element = 'section') {\r
- $this->headScript()->addSplideCarousel();\r
+ $this->headScript()->addDynamicMarquee();\r
\r
$images = CubeIT_Util_Cms::extractFiles($logos);\r
if (!count($images)) {\r
$res = '';\r
foreach ($images as $image) {\r
$img = $this->imageCms($image, '', null, null, ['class' => 'logos-image']);\r
- $res .= $this->htmlElement($img, 'div', ['class' => 'logos-item splide__slide']);\r
+ $res .= $this->htmlElement($img, 'div', ['class' => 'logos-item']);\r
}\r
\r
- $res = $this->htmlElement($res, 'div', ['class' => 'logos-grid splide__list']);\r
- $res = $this->htmlElement($res, 'div', ['class' => 'splide__track']);\r
- return $this->htmlElement($res, $wrapper_element, ['class' => 'logos-wrapper splide']);\r
+ // For making animated marquee loop\r
+ // https://www.youtube.com/watch?v=uw5jVO1eNF8\r
+ foreach ($images as $image) {\r
+ $img = $this->imageCms($image, '', null, null, ['class' => 'logos-image']);\r
+ $res .= $this->htmlElement($img, 'div', ['class' => 'logos-item', 'aria-hidden' => 'true']);\r
+ }\r
+\r
+ $res = $this->htmlElement($res, 'div', ['class' => 'logos-grid', 'id' => 'marquee']);\r
+ return $this->htmlElement($res, $wrapper_element, ['class' => 'logos-wrapper']);\r
}\r
}\r
return $this;
}
- public function addSplideCarousel()
- {
- if (!$this->_add('splidejs')) {
- return $this;
- }
- $this->view->headLink()->addDNSPrefetch('//cdnjs.cloudflare.com/');
- $this->appendFile('//cdnjs.cloudflare.com/ajax/libs/splidejs/' . static::SPLIDECAROUSEL_VERSION . '/js/splide.min.js');
- $this->view->headLink()->appendStylesheet('//cdnjs.cloudflare.com/ajax/libs/splidejs/' . static::SPLIDECAROUSEL_VERSION . '/css/splide.min.css');
-
- $this->view->headLink()->addDNSPrefetch('//cdnjs.jsdelivr.net/');
- $this->appendFile('//cdn.jsdelivr.net/npm/@splidejs/splide-extension-auto-scroll@0.5.3/dist/js/splide-extension-auto-scroll.min.js');
-
- return $this;
- }
-
public function addDotDotDot()
{
if (!$this->_add('dotdotdot')) {
registerLoader(load_logo, true);
function load_logo() {
- console.log(window.splide.Extensions)
- new Splide( '.splide', {
- drag: false,
- autoWidth: true,
- type: 'loop',
- gap: 40,
- pagination: false,
- arrows: false,
- autoScroll: {
- speed: .5,
- },
- mediaQuery: 'min',
- breakpoints: {
- 768: {
- gap: 90,
- },
- }
- } ).mount(window.splide.Extensions);
+ //
}
\ No newline at end of file
background-color: #e8eefa;\r
padding-top: 3%;\r
padding-bottom: 3%;\r
+ overflow: clip;\r
}\r
\r
&-grid {\r
display: flex !important;\r
align-items: center;\r
- padding: 0 70px;\r
+ padding: 0 0 0 70px;\r
+ gap: 70px;\r
+ width: max-content;\r
+ animation: marquee 30s linear infinite forwards;\r
\r
@media (max-width: 1299px) {\r
padding: 0;\r
\r
&-image {\r
width: 120px;\r
- height: 100%;\r
+ height: 45px;\r
max-width: 120px;\r
max-height: 45px;\r
}\r
}\r
+\r
+@keyframes marquee {\r
+ to {\r
+ transform: translateX(-50%);\r
+ }\r
+}
\ No newline at end of file