deanpowers commited on
Commit
03fe696
·
1 Parent(s): b0c3f0d

Replace dartboard placeholder with polished SVG

Browse files
static/dartboard-panel.svg ADDED
static/scan/index.html CHANGED
@@ -90,16 +90,17 @@
90
  .flash-up { animation: flashUp 0.9s ease-out; }
91
  .flash-down { animation: flashDown 0.9s ease-out; }
92
  @keyframes ringFlash {
93
- 0% { opacity: 1; }
94
- 40% { opacity: 1; }
95
- 41% { opacity: 0.15; }
96
- 100% { opacity: 0.15; }
97
  }
98
  .ring-flash {
99
  animation: ringFlash 5s infinite;
100
  }
101
- .ring-dim { opacity: 0.15; }
102
- .ring-active { opacity: 1; }
 
103
  .pnl-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid #21262d; }
104
  .pnl-row-last { border-bottom: none; }
105
  .pnl-label { color: #8b949e; }
@@ -349,21 +350,7 @@
349
 
350
  <!-- Dartboard -->
351
  <div style="display:flex;justify-content:center;margin:16px 0 12px 0;">
352
- <svg id="dartboard" viewBox="0 0 200 200" width="200" height="200" aria-label="Win rate indicator">
353
- <!-- Outer ring - red -->
354
- <circle id="ring-outer" cx="100" cy="100" r="95" fill="#f87171" opacity="0.5"/>
355
- <!-- Middle ring - yellow -->
356
- <circle id="ring-middle" cx="100" cy="100" r="68" fill="#f0b90b" opacity="0.5"/>
357
- <!-- Inner ring - green -->
358
- <circle id="ring-inner" cx="100" cy="100" r="42" fill="#4ade80" opacity="0.5"/>
359
- <!-- Bullseye -->
360
- <circle cx="100" cy="100" r="18" fill="#0d1117" stroke="#30363d" stroke-width="2"/>
361
- <!-- Dart icon (static, sits in bullseye) -->
362
- <g transform="translate(100,100)">
363
- <line x1="0" y1="0" x2="14" y2="-14" stroke="#e6edf3" stroke-width="2" stroke-linecap="round"/>
364
- <polygon points="0,0 -3,3 3,-3" fill="#f0b90b"/>
365
- </g>
366
- </svg>
367
  </div>
368
 
369
  <!-- Win rate label -->
@@ -1358,9 +1345,9 @@ document.addEventListener('DOMContentLoaded', function() {
1358
  r.classList.remove('ring-flash');
1359
  if (id === active) {
1360
  r.classList.add('ring-flash');
1361
- r.style.opacity = 1;
1362
  } else {
1363
- r.style.opacity = 0.15;
1364
  }
1365
  });
1366
  }
 
90
  .flash-up { animation: flashUp 0.9s ease-out; }
91
  .flash-down { animation: flashDown 0.9s ease-out; }
92
  @keyframes ringFlash {
93
+ 0% { filter: brightness(1.9); }
94
+ 40% { filter: brightness(1.9); }
95
+ 41% { filter: brightness(0.3); }
96
+ 100% { filter: brightness(0.3); }
97
  }
98
  .ring-flash {
99
  animation: ringFlash 5s infinite;
100
  }
101
+ #ring-outer, #ring-middle, #ring-inner {
102
+ transition: filter 0.2s ease;
103
+ }
104
  .pnl-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid #21262d; }
105
  .pnl-row-last { border-bottom: none; }
106
  .pnl-label { color: #8b949e; }
 
350
 
351
  <!-- Dartboard -->
352
  <div style="display:flex;justify-content:center;margin:16px 0 12px 0;">
353
+ <svg id="dartboard" viewBox="0 0 64 64" width="200" height="200" aria-label="Win rate indicator"><defs><radialGradient id="dbgrad-a" cx="31.99" cy="32.09" r="25.6" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#2f3235"/><stop offset="1" stop-color="#2f3235" stop-opacity="0"/></radialGradient><linearGradient id="dbgrad-b" x1="-45.27" y1="309.79" x2="-38.66" y2="309.79" gradientTransform="translate(299.43 -180.88) rotate(45)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#40bf6e"/><stop offset="1" stop-color="#4ade80"/></linearGradient><linearGradient id="dbgrad-c" x1="-41.74" y1="312.89" x2="-30.25" y2="306.62" gradientTransform="translate(299.43 -180.88) rotate(45)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#39ab62"/><stop offset="1" stop-color="#4ade80"/></linearGradient><linearGradient id="dbgrad-d" x1="-37.27" y1="326.54" x2="-40.05" y2="326.54" gradientTransform="translate(367.73 61.34) rotate(90)" gradientUnits="userSpaceOnUse"><stop offset="0.21" stop-color="#3eb86a"/><stop offset="0.63" stop-color="#67e694"/><stop offset="0.89" stop-color="#4ade80"/></linearGradient><linearGradient id="dbgrad-e" x1="-38.14" y1="311.6" x2="-39.17" y2="311.6" gradientTransform="translate(299.43 -180.88) rotate(45)" gradientUnits="userSpaceOnUse"><stop offset="0.03" stop-color="#3eb86a"/><stop offset="0.63" stop-color="#67e694"/><stop offset="0.95" stop-color="#4ade80"/></linearGradient></defs><circle id="ring-outer" cx="32" cy="32" r="27.68" style="fill:#f87171"/><circle cx="32" cy="32" r="22.32" style="fill:#fff"/><circle id="ring-middle" cx="32" cy="32" r="17.27" style="fill:#f0b90b"/><circle cx="32" cy="32" r="11.98" style="fill:#fff"/><circle id="ring-inner" cx="32" cy="32" r="7.19" style="fill:#4ade80"/><path d="M55.71,46.25l-23.58-14-.55.06L45,56.41A27.61,27.61,0,0,0,55.71,46.25Z" style="opacity:0.52;fill:url(#dbgrad-a)"/><path d="M57.23,6.65,55.49.89s-4.18.44-6.5,5.9A26.33,26.33,0,0,0,46.84,17Z" style="fill:url(#dbgrad-b)"/><path d="M57.23,6.65,63,8.39s-.44,4.18-5.9,6.5A26.33,26.33,0,0,1,46.84,17Z" style="fill:url(#dbgrad-c)"/><ellipse cx="41.2" cy="22.68" rx="13.6" ry="1.39" transform="translate(-3.97 35.77) rotate(-45)" style="fill:url(#dbgrad-d)"/><path d="M57.38,7.22c-5.83,5.83-10.72,10.4-10.92,10.2s4.37-5.09,10.2-10.92A2.9,2.9,0,0,1,57.38,7.22Z" style="fill:url(#dbgrad-e)"/><path d="M55.49.89s.39,2.21.61,3.2l.58,2.43s-.84.84-1.23,1.28a2.56,2.56,0,0,0-.62,1.25l5-5a8.26,8.26,0,0,0-1.21.81L57.33,5.94S56.13,2.54,55.49.89Z" style="fill:#67e892"/><path d="M63,8.39s-2.21-.39-3.2-.61L57.36,7.2s-.84.84-1.28,1.23a2.56,2.56,0,0,1-1.25.62l5-5A8.26,8.26,0,0,1,59,5.26L57.94,6.55S61.34,7.75,63,8.39Z" style="fill:#67e892"/></svg>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
354
  </div>
355
 
356
  <!-- Win rate label -->
 
1345
  r.classList.remove('ring-flash');
1346
  if (id === active) {
1347
  r.classList.add('ring-flash');
1348
+ r.style.filter = '';
1349
  } else {
1350
+ r.style.filter = 'brightness(0.3)';
1351
  }
1352
  });
1353
  }