T9-T12: env config + live owner search + responsive (§V11, I.env, I.web)
- config.py: env/.env (python-dotenv), defaults = konstanta lama; get_voters & dashboard pakai config - dashboard: ?q= server filter + /api/search JSON (substring, LIKE-escape, rank global via correlated count) - static/app.js: debounced live search; degrades to GET ?q= - static/style.css: input search + responsive (1024/768/480), list→kartu berlabel di mobile - test_dashboard: search/API/rank-global/config tests; .env.example; .env gitignored
This commit is contained in:
1 parent
0b3a86aad2
commit
205ad35c70
12 files changed
+440
-65
No files matched your search
+33
-13
@@ -38,36 +38,56 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="spec-list">
|
||||
<form class="search" method="get" action="{{ url_for('index') }}">
|
||||
<input class="search-input" type="search" name="q" id="search-input"
|
||||
value="{{ q }}" placeholder="CARI AKUN..." autocomplete="off">
|
||||
<button class="pill" type="submit">CARI</button>
|
||||
{% if q %}
|
||||
<a class="clear" href="{{ url_for('index') }}">HAPUS</a>
|
||||
{% endif %}
|
||||
</form>
|
||||
|
||||
<p class="caption search-result" id="search-result">
|
||||
{% if q %}HASIL · {{ filtered_count }} AKUN UNTUK "{{ q }}"{% endif %}
|
||||
</p>
|
||||
|
||||
<section class="spec-list" id="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 class="list-rows" id="rows">
|
||||
{% for row in rows %}
|
||||
<div class="list-row">
|
||||
<span class="rank">{{ row[4] }}</span>
|
||||
<span class="owner">{{ row[0] }}</span>
|
||||
<span class="stake" data-label="STAKE (VEX)">{{ row[1]|vex }}</span>
|
||||
<span class="weight" data-label="BOBOT SUARA">{{ row[2] }}</span>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="empty">
|
||||
{% if q %}TAK ADA AKUN COCOK — "{{ q }}"{% else %}BELUM ADA DATA — JALANKAN get_voters.py{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="empty">BELUM ADA DATA — JALANKAN get_voters.py</div>
|
||||
{% endfor %}
|
||||
</section>
|
||||
|
||||
<nav class="pager" aria-label="Navigasi halaman">
|
||||
<nav class="pager" id="pager" aria-label="Navigasi halaman">
|
||||
{% set qp = q if q else None %}
|
||||
<a class="pill {% if page <= 1 %}pill-disabled{% endif %}"
|
||||
href="{{ url_for('index', page=page-1) }}">← SEBELUMNYA</a>
|
||||
href="{{ url_for('index', page=page-1, q=qp) }}">← 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>
|
||||
href="{{ url_for('index', page=page+1, q=qp) }}">BERIKUTNYA →</a>
|
||||
</nav>
|
||||
</main>
|
||||
|
||||
<footer class="footer">
|
||||
<span>DATA TERVALIDASI DARI JARINGAN VEXANIUM · VEXCORE · VOTERS</span>
|
||||
</footer>
|
||||
|
||||
<script src="{{ url_for('static', filename='app.js') }}"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user