T6-T8: web dashboard spec-list (§V10, I.web, I.db)

- dashboard.py: Flask read-only, paged 50/page, ORDER BY staked DESC
- templates/index.html + static/style.css: DESIGN.md Bugatti austere tokens
- test_dashboard.py: oracle (ordering, paging, read-only)
- DESIGN.md style guide (was untracked)
This commit is contained in:
proitlab committed 2026-08-04 16:08:08 +07:00
1 parent c5e30a4785
commit 0b3a86aad2
8 files changed
+944 -4

No files matched your search

+73
View File
@@ -0,0 +1,73 @@
<!doctype html>
<html lang="id">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>DAFTAR PEMILIH — {{ bp }}</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Saira+Condensed:wght@400&family=EB+Garamond:ital,wght@0,400;1,400&family=JetBrains+Mono:wght@400&display=swap" rel="stylesheet">
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
</head>
<body>
<header class="top-nav">
<span class="nav-label">DAFTAR</span>
<span class="wordmark">DATABISNISID</span>
<span class="nav-label">VEX</span>
</header>
<main class="page">
<section class="hero">
<p class="caption">PEMILIH BP · SUARA TUNGGAL · STAKE ≥ 1.000 VEX</p>
<h1 class="display-xl">DAFTAR PEMILIH</h1>
<p class="caption">PEMINDAIAN TERAKHIR · {{ scanned }}</p>
</section>
<section class="stats">
<div class="spec-cell">
<span class="cell-value">{{ total_voters }}</span>
<span class="cell-label">TOTAL PEMILIH</span>
</div>
<div class="spec-cell">
<span class="cell-value">{{ total_staked|vex }}</span>
<span class="cell-label">TOTAL VEX</span>
</div>
<div class="spec-cell">
<span class="cell-value">{{ top_staked|vex }}</span>
<span class="cell-label">STAKE TERTINGGI</span>
</div>
</section>
<section class="spec-list">
<div class="list-header">
<span>RANK</span>
<span>AKUN</span>
<span>STAKE (VEX)</span>
<span>BOBOT SUARA</span>
</div>
{% for row in rows %}
<div class="list-row">
<span class="rank">{{ (page - 1) * 50 + loop.index }}</span>
<span class="owner">{{ row[0] }}</span>
<span class="stake">{{ row[1]|vex }}</span>
<span class="weight">{{ row[2] }}</span>
</div>
{% else %}
<div class="empty">BELUM ADA DATA — JALANKAN get_voters.py</div>
{% endfor %}
</section>
<nav class="pager" aria-label="Navigasi halaman">
<a class="pill {% if page <= 1 %}pill-disabled{% endif %}"
href="{{ url_for('index', page=page-1) }}">← SEBELUMNYA</a>
<span class="page-count">{{ page }} / {{ total_pages }}</span>
<a class="pill {% if page >= total_pages %}pill-disabled{% endif %}"
href="{{ url_for('index', page=page+1) }}">BERIKUTNYA →</a>
</nav>
</main>
<footer class="footer">
<span>DATA TERVALIDASI DARI JARINGAN VEXANIUM · VEXCORE · VOTERS</span>
</footer>
</body>
</html>