Update index.html
Browse files- index.html +37 -30
index.html
CHANGED
|
@@ -244,36 +244,43 @@
|
|
| 244 |
const y = document.getElementById('year');
|
| 245 |
if (y) y.textContent = new Date().getFullYear();
|
| 246 |
|
| 247 |
-
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
|
| 252 |
-
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
|
| 268 |
-
|
| 269 |
-
|
| 270 |
-
|
| 271 |
-
|
| 272 |
-
|
| 273 |
-
|
| 274 |
-
|
| 275 |
-
<
|
| 276 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 277 |
|
| 278 |
// Example video version toggles
|
| 279 |
const video = document.getElementById('sampleVideo');
|
|
|
|
| 244 |
const y = document.getElementById('year');
|
| 245 |
if (y) y.textContent = new Date().getFullYear();
|
| 246 |
|
| 247 |
+
<script>
|
| 248 |
+
// Leaderboard: rendert NUR deine inline JSON-rows
|
| 249 |
+
(function renderLeaderboard(){
|
| 250 |
+
const el = document.getElementById('leaderboard-body');
|
| 251 |
+
const dataEl = document.getElementById('leaderboard-data');
|
| 252 |
+
if (!el || !dataEl) return;
|
| 253 |
+
|
| 254 |
+
// JSON aus dem <script id="leaderboard-data"> holen
|
| 255 |
+
let rows = [];
|
| 256 |
+
try {
|
| 257 |
+
const parsed = JSON.parse(dataEl.textContent.trim());
|
| 258 |
+
rows = Array.isArray(parsed.rows) ? parsed.rows : [];
|
| 259 |
+
} catch (_) {}
|
| 260 |
+
|
| 261 |
+
// Sortierung: erst Model, dann Modality in Reihenfolge AV, V, A
|
| 262 |
+
const order = ['AV', 'V', 'A'];
|
| 263 |
+
rows.sort((a, b) =>
|
| 264 |
+
String(a.model).localeCompare(String(b.model)) ||
|
| 265 |
+
order.indexOf(a.modality) - order.indexOf(b.modality)
|
| 266 |
+
);
|
| 267 |
+
|
| 268 |
+
const today = new Date().toISOString().slice(0,10);
|
| 269 |
+
const fmtPct = v => (v==null || v==='') ? '—' : (Number(v).toFixed(1) + '%');
|
| 270 |
+
|
| 271 |
+
el.innerHTML = rows.map(r => `
|
| 272 |
+
<tr>
|
| 273 |
+
<td>${r.model}</td>
|
| 274 |
+
<td>${r.modality}</td>
|
| 275 |
+
<td>${fmtPct(r.Top1AccuracyinPercent)}</td>
|
| 276 |
+
<td>${fmtPct(r.Top5AccuracyinPercent)}</td>
|
| 277 |
+
<td>${r.N ?? '—'}</td>
|
| 278 |
+
<td>${r.updated ?? today}</td>
|
| 279 |
+
</tr>
|
| 280 |
+
`).join('');
|
| 281 |
+
})();
|
| 282 |
+
</script>
|
| 283 |
+
|
| 284 |
|
| 285 |
// Example video version toggles
|
| 286 |
const video = document.getElementById('sampleVideo');
|