Update index.html
Browse files- index.html +30 -24
index.html
CHANGED
|
@@ -226,41 +226,43 @@
|
|
| 226 |
</section>
|
| 227 |
</main>
|
| 228 |
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
|
| 232 |
|
| 233 |
-
|
| 234 |
-
|
| 235 |
-
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
}
|
| 243 |
-
|
| 244 |
-
|
| 245 |
-
|
|
|
|
|
|
|
| 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
|
| 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:
|
| 262 |
const order = ['AV', 'V', 'A'];
|
| 263 |
-
rows.sort((a,
|
| 264 |
String(a.model).localeCompare(String(b.model)) ||
|
| 265 |
order.indexOf(a.modality) - order.indexOf(b.modality)
|
| 266 |
);
|
|
@@ -268,21 +270,23 @@
|
|
| 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 |
-
|
|
|
|
| 286 |
const video = document.getElementById('sampleVideo');
|
| 287 |
const verButtons = document.querySelectorAll('.ver');
|
| 288 |
const verStatus = document.getElementById('verStatus');
|
|
@@ -302,6 +306,8 @@
|
|
| 302 |
}
|
| 303 |
});
|
| 304 |
});
|
| 305 |
-
|
|
|
|
|
|
|
| 306 |
</body>
|
| 307 |
</html>
|
|
|
|
| 226 |
</section>
|
| 227 |
</main>
|
| 228 |
|
| 229 |
+
<footer class="site-footer">
|
| 230 |
+
<small>© <span id="year"></span> Grets. Rendered by Hugging Face Spaces.</small>
|
| 231 |
+
</footer>
|
| 232 |
|
| 233 |
+
<!-- 1) Basis-Skripte (Nav & Jahr) -->
|
| 234 |
+
<script>
|
| 235 |
+
// Mobile nav toggle
|
| 236 |
+
const navToggle = document.querySelector('.nav-toggle');
|
| 237 |
+
const nav = document.getElementById('site-nav');
|
| 238 |
+
if (navToggle && nav) {
|
| 239 |
+
navToggle.addEventListener('click', () => {
|
| 240 |
+
const open = nav.classList.toggle('open');
|
| 241 |
+
navToggle.setAttribute('aria-expanded', String(open));
|
| 242 |
+
});
|
| 243 |
+
}
|
| 244 |
+
// Year in footer
|
| 245 |
+
const y = document.getElementById('year');
|
| 246 |
+
if (y) y.textContent = new Date().getFullYear();
|
| 247 |
+
</script>
|
| 248 |
|
| 249 |
+
<!-- 2) Leaderboard-Renderer (nur deine inline-JSON rows) -->
|
| 250 |
<script>
|
|
|
|
| 251 |
(function renderLeaderboard(){
|
| 252 |
const el = document.getElementById('leaderboard-body');
|
| 253 |
const dataEl = document.getElementById('leaderboard-data');
|
| 254 |
if (!el || !dataEl) return;
|
| 255 |
|
| 256 |
+
// JSON laden
|
| 257 |
let rows = [];
|
| 258 |
try {
|
| 259 |
const parsed = JSON.parse(dataEl.textContent.trim());
|
| 260 |
rows = Array.isArray(parsed.rows) ? parsed.rows : [];
|
| 261 |
} catch (_) {}
|
| 262 |
|
| 263 |
+
// Sortierung: Model (A–Z) -> Modality in Reihenfolge AV, V, A
|
| 264 |
const order = ['AV', 'V', 'A'];
|
| 265 |
+
rows.sort((a,b) =>
|
| 266 |
String(a.model).localeCompare(String(b.model)) ||
|
| 267 |
order.indexOf(a.modality) - order.indexOf(b.modality)
|
| 268 |
);
|
|
|
|
| 270 |
const today = new Date().toISOString().slice(0,10);
|
| 271 |
const fmtPct = v => (v==null || v==='') ? '—' : (Number(v).toFixed(1) + '%');
|
| 272 |
|
| 273 |
+
// Spalten: Model | Modality | N | Top-1 | Top-5 | Updated
|
| 274 |
el.innerHTML = rows.map(r => `
|
| 275 |
<tr>
|
| 276 |
<td>${r.model}</td>
|
| 277 |
<td>${r.modality}</td>
|
| 278 |
+
<td>${r.N ?? '—'}</td>
|
| 279 |
<td>${fmtPct(r.Top1AccuracyinPercent)}</td>
|
| 280 |
<td>${fmtPct(r.Top5AccuracyinPercent)}</td>
|
|
|
|
| 281 |
<td>${r.updated ?? today}</td>
|
| 282 |
</tr>
|
| 283 |
`).join('');
|
| 284 |
})();
|
| 285 |
</script>
|
| 286 |
|
| 287 |
+
<!-- 3) Example video toggles -->
|
| 288 |
+
<script>
|
| 289 |
+
(function(){
|
| 290 |
const video = document.getElementById('sampleVideo');
|
| 291 |
const verButtons = document.querySelectorAll('.ver');
|
| 292 |
const verStatus = document.getElementById('verStatus');
|
|
|
|
| 306 |
}
|
| 307 |
});
|
| 308 |
});
|
| 309 |
+
})();
|
| 310 |
+
</script>
|
| 311 |
+
|
| 312 |
</body>
|
| 313 |
</html>
|