Te damos la bienvenida a WordPress. Esta es tu primera entrada. Edítala o bórrala, ¡luego empieza a escribir!
¡Hola, mundo!
by Rake | May 22, 2026 | Sin categoría | 1 comment
(function () {
var INTERVAL_MS = 4200; // time each step stays "active" before advancing
var section = document.querySelector('.hrev-spiral-section');
var images = Array.prototype.slice.call(section.querySelectorAll('.spiral-stage img'));
var texts = Array.prototype.slice.call(section.querySelectorAll('.step-text'));
var dots = Array.prototype.slice.call(section.querySelectorAll('.spiral-dots button'));
var current = 0;
var timer = null;
var isPaused = false;
function render(index) {
images.forEach(function (img, i) {
img.classList.remove('is-active', 'is-dimmed', 'is-hidden');
if (i < index) img.classList.add('is-dimmed');
else if (i === index) img.classList.add('is-active');
else img.classList.add('is-hidden');
});
texts.forEach(function (t, i) {
t.classList.toggle('is-active', i === index);
});
dots.forEach(function (d, i) {
d.classList.toggle('is-active', i === index);
});
current = index;
}
function advance() {
var next = current + 1;
if (next >= images.length) {
// loop: collapse back to step 1 and rebuild the spiral again
next = 0;
}
render(next);
}
function start() {
if (timer) return;
timer = setInterval(function () {
if (!isPaused) advance();
}, INTERVAL_MS);
}
function stop() {
clearInterval(timer);
timer = null;
}
// Pause on hover, resume on mouse leave
section.addEventListener('mouseenter', function () { isPaused = true; });
section.addEventListener('mouseleave', function () { isPaused = false; });
// Allow clicking a dot to jump to a step (also pauses briefly)
dots.forEach(function (dot, i) {
dot.addEventListener('click', function () {
render(i);
});
});
// Only autoplay once the section is actually visible on screen
if ('IntersectionObserver' in window) {
var observer = new IntersectionObserver(function (entries) {
entries.forEach(function (entry) {
if (entry.isIntersecting) {
render(0);
start();
} else {
stop();
}
});
}, { threshold: 0.4 });
observer.observe(section);
} else {
render(0);
start();
}
})();
Hola, esto es un comentario.
Para empezar a moderar, editar y borrar comentarios, por favor, visita en el escritorio la pantalla de comentarios.
Los avatares de los comentaristas provienen de Gravatar.