53 lines
1.8 KiB
Text
53 lines
1.8 KiB
Text
<% if !htmx {%>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>zettoIT ARS</title>
|
|
<meta charset="UTF-8">
|
|
<link rel="stylesheet" href="/static/zettoit.css">
|
|
<link rel="icon" type="image/svg" href="/static/zettoit.svg"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<style>
|
|
.qrcode svg{
|
|
filter: invert();
|
|
width: 100%;
|
|
height: auto;
|
|
max-height: 90vh;
|
|
max-width: 90wh;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<script src="/static/chart.js"></script>
|
|
<script src="/static/patternomaly.js"></script>
|
|
<main class="container" hx-sse="connect:/<%= id %>/view/events swap:message">
|
|
<% } %>
|
|
<% if let ViewerState::Answering{ inner_body } = state { %>
|
|
<%- inner_body %>
|
|
|
|
<button hx-post="" class="outline">Show correct Answer</button>
|
|
|
|
<% } else if let ViewerState::Result{ last_question, inner_body} = state { %>
|
|
|
|
<%- inner_body %>
|
|
|
|
<% if last_question { %>
|
|
<button hx-post="" class="outline">End Quiz</button>
|
|
<% } else { %>
|
|
<button hx-post="" class="outline">Next Question</button>
|
|
<% } %>
|
|
|
|
<% } else if let ViewerState::NotStarted((player, qrcode, url)) = state { %>
|
|
<center class="qrcode"><%- qrcode %></center>
|
|
<center>or visit <%= url %></center>
|
|
<button hx-post="" class="outline">Start Quiz with <b><%= player %></b> Players</button>
|
|
<% } else {%>
|
|
The Quiz finished. You can close this tab now.
|
|
<% } %>
|
|
<% if !htmx { %>
|
|
</main>
|
|
<a class="watermark" href="https://git2.zettoit.eu/zettoit"><img src="/static/zettoit.svg" alt="zettoIT Logo"></a>
|
|
<script src="/static/htmx.min.js"></script>
|
|
</body>
|
|
</html>
|
|
<% } %>
|