WyR/app/templates/public/results.html

69 lines
2.3 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>Results</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
</head>
<body>
<header class="app-header">
<a class="brand" href="{{ url_for('public.home') }}">wyr</a>
<nav class="site-nav">
<a href="{{ url_for('public.home') }}">Vote</a>
<a href="{{ url_for('admin.dashboard') }}">Admin</a>
</nav>
</header>
<main class="page">
{% if question %}
<section class="main-card results-panel">
<p class="eyebrow">Live results</p>
<h1 class="question-title">{{ question.question }}</h1>
<div class="result-list">
<article class="result-row">
<div class="result-topline">
<h2>{{ question.option_a }}</h2>
<strong>{{ percent_a }}%</strong>
</div>
<div class="result-bar" aria-hidden="true">
<span style="width: {{ percent_a }}%"></span>
</div>
<p>{{ votes_a }} votes</p>
</article>
<article class="result-row">
<div class="result-topline">
<h2>{{ question.option_b }}</h2>
<strong>{{ percent_b }}%</strong>
</div>
<div class="result-bar" aria-hidden="true">
<span style="width: {{ percent_b }}%"></span>
</div>
<p>{{ votes_b }} votes</p>
</article>
</div>
<p class="total-votes">Total votes: {{ total }}</p>
<a class="button-link" href="{{ url_for('public.home') }}">Back</a>
</section>
{% else %}
<section class="main-card empty-state">
<p class="eyebrow">Live results</p>
<h1 class="question-title">No results yet.</h1>
<p>No question is scheduled yet.</p>
<a class="button-link" href="{{ url_for('public.home') }}">Back</a>
</section>
{% endif %}
</main>
<footer class="app-footer">
<span>results</span>
<span>live tally</span>
</footer>
</body>
</html>