feat: Stats-Bar ueber Karussell, Pfeil-Navigation, Count-Up

- Stats (Artikel/Quellen/Faktenchecks) als prominente Bar ueber dem
  Karussell mit Count-Up-Animation und gruener Live-Pulse-Anzeige
- Pfeil-Buttons links/rechts fuer Karussell-Navigation
- Text-Card breiter (860px)
- Stats nicht mehr in der Card

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Dieser Commit ist enthalten in:
Claude Code
2026-04-06 18:39:28 +02:00
Ursprung 128d26056d
Commit 747ea0f5e4
3 geänderte Dateien mit 64 neuen und 25 gelöschten Zeilen

Datei anzeigen

@@ -102,6 +102,16 @@
positionCards(0);
// Arrow navigation
var prevBtn = document.querySelector('.carousel-prev');
var nextBtn = document.querySelector('.carousel-next');
if (prevBtn) prevBtn.addEventListener('click', function () {
positionCards((activeIndex - 1 + cards.length) % cards.length);
});
if (nextBtn) nextBtn.addEventListener('click', function () {
positionCards((activeIndex + 1) % cards.length);
});
/* ==================== SIMPLE MARKDOWN ==================== */
function mdToHtml(md) {
if (!md) return '';
@@ -140,9 +150,23 @@
var es = document.getElementById('stat-sources');
var ef = document.getElementById('stat-factchecks');
var eu = document.getElementById('demo-updated');
if (ea) ea.textContent = inc.article_count || 0;
if (es) es.textContent = inc.source_count || 0;
if (ef) ef.textContent = inc.factcheck_count || 0;
function countUp(el, target) {
if (!el || !target) return;
var start = 0;
var duration = 1200;
var startTime = null;
function step(ts) {
if (!startTime) startTime = ts;
var progress = Math.min((ts - startTime) / duration, 1);
var ease = 1 - Math.pow(1 - progress, 3);
el.textContent = Math.floor(ease * target).toLocaleString('de-DE');
if (progress < 1) requestAnimationFrame(step);
}
requestAnimationFrame(step);
}
countUp(ea, inc.article_count);
countUp(es, inc.source_count);
countUp(ef, inc.factcheck_count);
if (eu && data.updated_at) eu.textContent = timeAgo(data.updated_at);
// Excerpt: pre-extracted in summary.json