{% if data.activado|default == true %} <section id="{{ id }}" class="{{ className }}{% if className == 'MarqueeBlock alignfull' %} my-10 md:my-16 {% endif %} relative not-prose {% if data.background|default == "primary" %} bg-primary {% elseif data.background|default == "secondary" %} bg-secondary {% elseif data.background|default == "black" %} bg-[#000000] {% elseif data.background|default == "white" %} bg-white {% endif %} border-b border-gray-200/50 overflow-hidden h-auto w-auto py-3 flex items-center"> <div class="relative flex flex-col lg:flex-row lg:items-center gap-0 lg:gap-8 w-full overflow-hidden justify-center {% if data.efect|default == 'transition' and data.text_align|default == "left" or data.text_align|default == "center" and not data.efect|default == 'motion' %} lg:px-20 px-5 max-w-screen-2xl mx-auto {% endif %}"> <div class="w-full whitespace-normal flex {% if data.efect|default == 'motion' %} gap-x-8 moving-text {% endif %}"> {% set messageIndex = 0 %} {% if data.efect|default == 'transition' %} {% for item in data.mensajes %} <div class="flex items-center gap-2.5 w-full {% if data.efect|default == 'transition' %} marquee-item-transition flex-shrink-0 opacity-0 transition-opacity duration-500 ease-in-out absolute inset-x-0 {% if messageIndex == 0 %} active {% else %} invisible {% endif %} {% elseif data.efect|default == 'motion' %} moving-item {% endif %} {% if data.efect|default == 'transition' and data.text_align|default == "center" %} justify-center text-center flex-wrap {% endif %} relative shrink-0" data-index="{{ messageIndex }}"> {% if item.icono|default %} <img {{ wordpress_image_attrs(item.icono, 'blocks', 'presentation') }} loading="lazy" class="h-auto w-[24px]"> {% endif %} {% if item.texto|default %} <span class="text-xs lg:text-sm font-title {% if data.background|default == "white" %} text-black {% else %} text-white {% endif %} !leading-snug {% if data.efect|default == 'transition' and data.text_align|default == "center" %} w-auto {% endif %}">{{ item.texto|raw }}</span> {% endif %} {% if item.boton.url|default %} <a href="{{ item.boton.url }}" target="{{ item.boton.target }}" class="absolute inset-0 w-full h-full"></a> {% endif %} </div> {% set messageIndex = messageIndex + 1 %} {% endfor %} {% endif %} {% if data.efect|default == 'motion' %} <div class="swiper"> <div class="swiper-wrapper"> {% for i in 0..10 %} {% for item in data.mensajes %} <div class="swiper-slide mr-8 inline-flex items-center"> {% if item.icono|default %} <div class="flex-shrink-0 mr-2"> <img {{ wordpress_image_attrs(item.icono, 'blocks', 'presentation') }} loading="lazy" class="h-auto w-6"> </div> {% endif %} {% if item.texto|default %} <span class="text-xs lg:text-sm font-title {% if data.background|default == "white" %} text-black {% else %} text-white {% endif %} !leading-snug whitespace-nowrap"> {{ item.texto|raw }} </span> {% endif %} {% if item.boton.url|default %} <a href="{{ item.boton.url }}" target="{{ item.boton.target }}" class="absolute inset-0 w-full h-full z-10"> </a> {% endif %} </div> {% endfor %} {% endfor %} </div> </div> {% endif %} </div> </div> </section>{% endif %}<style> {{ style|raw }} .w-full.whitespace-normal { position: relative; } /*efecto transicion*/ .marquee-item-transition { flex-shrink: 0; position: absolute; width: 100%; left: 0; right: 0; transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out; transform: translateY(30px); opacity: 0; } .marquee-item-transition.active { transform: translateY(0); opacity: 1; position: relative; } .marquee-item-transition.prev { transform: translateY(-30px); opacity: 0; position: absolute; top: 0; } /*efecto movimiento*/ .MarqueeBlock .swiper-wrapper { will-change: transform; backface-visibility: hidden; transform-style: preserve-3d; } .MarqueeBlock .swiper-slide { width: auto !important; flex-shrink: 0; backface-visibility: hidden; transform-style: preserve-3d; } .marquee span { text-align: center; white-space: nowrap; line-height: 1.2; }</style>