';
}
slide.innerHTML = '
' +
'
';
track.appendChild(slide);
}
// Carousel Logic
var currentIdx = 0;
var nextBtn = document.getElementById('appForward');
var prevBtn = document.getElementById('appBack');
function getVisibleCount() {
if (window.innerWidth >= 1024) return 3;
if (window.innerWidth >= 768) return 2;
return 1;
}
function update() {
var slides = track.getElementsByClassName('app-slide');
if (slides.length > 0) {
var width = slides[0].offsetWidth;
track.style.transform = 'translateX(-' + (currentIdx * width) + 'px)';
}
}
function moveNext() {
var visible = getVisibleCount();
currentIdx = (currentIdx < appData.length - visible) ? currentIdx + 1 : 0;
update();
}
function movePrev() {
var visible = getVisibleCount();
currentIdx = (currentIdx > 0) ? currentIdx - 1 : Math.max(0, appData.length - visible);
update();
}
nextBtn.onclick = function() { moveNext(); resetTimer(); };
prevBtn.onclick = function() { movePrev(); resetTimer(); };
var timer = setInterval(moveNext, 4500);
function resetTimer() { clearInterval(timer); timer = setInterval(moveNext, 4500); }
track.onmouseenter = function() { clearInterval(timer); };
track.onmouseleave = function() { resetTimer(); };
window.onresize = function() { currentIdx = 0; update(); };
// Initial positioning
setTimeout(update, 200);
};
})();
' + entry.title + '
' + '' + pointsHTML + '
' +
'









