search for standard sites pub-search.waow.tech
search zig blog atproto

fix: add breathing room below sparkline, trim leading zeros from line

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

+7 -3
+1 -1
site/dashboard.css
··· 150 150 151 151 .traffic-section { 152 152 position: relative; 153 - margin-bottom: 2rem; 153 + margin-bottom: 3rem; 154 154 } 155 155 .traffic-sparkline { 156 156 position: relative;
+6 -2
site/dashboard.js
··· 262 262 container.innerHTML = ''; 263 263 264 264 const hours = RANGE_HOURS[currentRange] || 168; 265 - const data = trafficData.slice(-hours); 266 - if (data.length === 0) return; 265 + const sliced = trafficData.slice(-hours); 266 + // trim leading zeros — only draw from first non-zero point 267 + let firstNonZero = sliced.findIndex(d => d.count > 0); 268 + if (firstNonZero === -1) return; // nothing to draw 269 + const data = sliced.slice(firstNonZero); 270 + if (data.length < 2) return; 267 271 268 272 const max = Math.max(...data.map(d => d.count), 1); 269 273 const w = container.clientWidth || 560;