.bf-ticker { font-family: "Inter", system-ui, -apple-system, sans-serif; background: #000; color: #fff; border: 1px solid rgba(255,255,255,0.15); border-radius: 12px; padding: 8px 12px; display: flex; align-items: center; gap: 12px; overflow: hidden; position: relative; } .bf-ticker__label { font-weight: 700; letter-spacing: 0.04em; white-space: nowrap; } .bf-ticker__track { display: flex; gap: 10px; animation: bf-scroll 25s linear infinite; } .bf-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; background: rgba(255,255,255,0.08); border-radius: 999px; white-space: nowrap; font-size: 14px; } .bf-chip__delta { font-weight: 700; } .bf-chip__delta.bf-up { color: #4ee59b; } .bf-chip__delta.bf-down { color: #ff5c77; } .bf-ticker__link { margin-left: auto; color: #4ee59b; text-decoration: none; font-weight: 700; white-space: nowrap; } @keyframes bf-scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
Live Black Friday
See all live data →
(function() { const totals = (window.dashboardData && window.dashboardData.totals) || {}; const categories = (window.dashboardData && window.dashboardData.categories) || []; const track = document.getElementById('bfTickerTrack'); if (!track) return; const chips = []; const formatVal = (v) => { const n = Number(v) || 0; if (Math.abs(n) >= 1e9) return (n/1e9).toFixed(2) + 'b'; if (Math.abs(n) >= 1e6) return (n/1e6).toFixed(2) + 'm'; if (Math.abs(n) >= 1e3) return (n/1e3).toFixed(2) + 'k'; return n.toFixed(2); }; const pct = (p) => { const n = Number(p) || 0; const cls = n >= 0 ? 'bf-up' : 'bf-down'; return { text: `${n >= 0 ? '+' : ''}${n.toFixed(2)}%`, cls }; }; // Total visits chip const totalYoy = pct(Number(totals.visits_yoy_pct || 0)); chips.push({ name: 'Total Visits', value: formatVal(totals.visits_bf_2024 || 0), deltaText: totalYoy.text, deltaClass: totalYoy.cls }); // Category chips categories.forEach((cat) => { const delta = pct(Number(cat.visits_yoy_pct || 0)); chips.push({ name: cat.top_category || 'Category', value: formatVal(cat.visits_bf_2024 || 0), deltaText: delta.text, deltaClass: delta.cls }); }); // Duplicate for seamless scroll const renderChips = (list) => list.map((c) => `
${c.name} ${c.value} ${c.deltaText}
`).join(''); track.innerHTML = renderChips(chips) + renderChips(chips);})();