${post.title}
${post.excerpt}
/* =================================================== JAESWIFT BLOG — Post loader + Cyberpunk stats =================================================== */ (function () { 'use strict'; const API = window.location.hostname === 'localhost' ? 'http://localhost:5000' : '/api'; // ─── Clock ─── function initClock() { const el = document.getElementById('navClock'); if (!el) return; const tick = () => { const d = new Date(); el.textContent = d.toLocaleTimeString('en-GB', { hour12: false }) + ' UTC' + (d.getTimezoneOffset() <= 0 ? '+' : '') + (-d.getTimezoneOffset() / 60); }; tick(); setInterval(tick, 1000); } // ─── Navbar ─── function initNavbar() { const toggle = document.getElementById('navToggle'); const menu = document.getElementById('navMenu'); if (toggle && menu) { toggle.addEventListener('click', () => menu.classList.toggle('active')); } window.addEventListener('scroll', () => { document.getElementById('navbar')?.classList.toggle('scrolled', window.scrollY > 50); }, { passive: true }); } // ─── Build Stat Pips ─── function buildPips(val, max = 5) { let html = '
'; return html; } // ─── Coffee Icons ─── function buildCoffee(val) { val = Math.max(0, Math.min(5, val || 0)); return '' + '☕'.repeat(val) + '' + '☕'.repeat(5 - val) + ''; } // ─── Render Post Card ─── function renderPostCard(post) { return `${post.excerpt}
' + cardErr.message + '