mirror of
https://github.com/Wolvan/poll.horse.git
synced 2024-11-26 14:37:58 +01:00
26a42333fe
This way, people can easily just use their QR readers to reach the voting page. The QR is constructed via Google Charts API and the URL is based on the HOST header of the request.
62 lines
No EOL
2.7 KiB
HTML
62 lines
No EOL
2.7 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>{{ TITLE }}</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=Caveat:wght@400;500;700&display=swap" rel="stylesheet">
|
|
<link rel="stylesheet" href="/static/css/main.css">
|
|
<link rel="stylesheet" href="/static/css/vote.css">
|
|
<script type="text/javascript" src="/static/vendor/js/textfit.js" defer="true"></script>
|
|
<script type="text/javascript">
|
|
const textFitOptions = {
|
|
multiLine: true
|
|
};
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
textFit(document.querySelector(".poll-title"), textFitOptions);
|
|
document.querySelectorAll(".poll-option .text").forEach(element => textFit(element, textFitOptions));
|
|
});
|
|
window.addEventListener("resize", function() {
|
|
textFit(document.querySelector(".poll-title"), textFitOptions);
|
|
document.querySelectorAll(".poll-option .text").forEach(element => textFit(element, textFitOptions));
|
|
});
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<header>
|
|
<h1><a href="/">Poll.horse</a></h1>
|
|
<h3>Make voting on things simpler</h3>
|
|
</header>
|
|
<main>
|
|
<section class="error {{ FORM_SUBMISSION_ERROR_SHOWN_CLASS }}">
|
|
{{ FORM_SUBMISSION_ERROR }}
|
|
</section>
|
|
<section class="poll-id">ID: {{ POLL_ID }}</section>
|
|
<section class="notepad">
|
|
<div class="notepad-border"></div>
|
|
<form action="{{ BACKEND_BASE_PATH }}/_backend/vote-form/{{ POLL_ID }}" method="POST">
|
|
<input type="hidden" name="csrf_token" value="{{ CSRF_TOKEN }}">
|
|
<section class="poll-title">
|
|
{{ POLL_TITLE }}
|
|
</section>
|
|
<section id="poll-options" class="poll-options">
|
|
{{ POLL_OPTION_DIVS }}
|
|
</section>
|
|
<section class="poll-footer">
|
|
<input type="submit" name="submit" value="Vote" id="submit-button">
|
|
<a href="/{{ POLL_ID }}/r"><button type="button">Results</button></a>
|
|
</section>
|
|
</form>
|
|
<aside id="qrcode"><img src="{{ QR_CODE }}"></aside>
|
|
</section>
|
|
</main>
|
|
<footer>
|
|
<ul>
|
|
{{ FOOTER_LINKS }}
|
|
</ul>
|
|
<div class="copyright"><a href="https://github.com/Wolvan/poll.horse/releases/tag/v{{ SYSTEM_VERSION }}">v{{ SYSTEM_VERSION }}</a> {{ FOOTER_COPYRIGHT }}</div>
|
|
</footer>
|
|
</body>
|
|
</html> |