ars/templates/index.stpl

44 lines
1.7 KiB
Text

<!DOCTYPE html>
<html>
<head>
<title>zettoIT ARS</title>
<meta charset="UTF-8">
<link rel="stylesheet" href="/static/pico.min.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<main class="container">
<p>zettoIT ARS is a lightweight open source audience response system built with rust.</p>
<p>A quiz can be created by uploading a toml-encoded Quizfile. A basic example is listed below:</p>
<code style="width: 100%">
# number of seconds to wait before showing results<br/>
wait_for = 15<br/>
<br/>
[[questions]]<br/>
# type of the question (currently only single_choice)<br/>
type = "single_choice"<br/>
# name of the question<br/>
name = "Who is there?"<br/>
# array of possible answers<br/>
answers = [ "A", "B", "C", "D"]<br/>
# index (starting at 0) of the correct answer<br/>
correct = 0<br/>
<br/>
[[questions]]<br/>
type = "single_choice"<br/>
name = "What is there?"<br/>
answers = [ "A", "B", "C", "D"]<br/>
correct = 0<br/>
</code>
<hr/>
<span id="error" style="color: red;"></span>
<form method="post" hx-post="" hx-target="#error" hx-swap="innerHTML" enctype="multipart/form-data">
<input type="file" name="quizfile"/>
<button type="submit">Create Quiz</button>
</form>
</main>
<script src="/static/htmx.min.js"></script>
</body>
</html>