31 lines
1.3 KiB
Text
31 lines
1.3 KiB
Text
<% if !htmx {%>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>zettoIT ARS</title>
|
|
<meta charset="UTF-8">
|
|
<link rel="stylesheet" href="/static/zettoit-style/zettoit.css">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
</head>
|
|
<body>
|
|
<main class="container" hx-sse="connect:/<%= id %>/events?player=<%=player_id%> swap:message">
|
|
<% } %>
|
|
<% if let PlayerState::NotStarted = state { %>
|
|
<center>The Quiz hasn't started yet. Please wait for the first question.</center>
|
|
<% } else if let PlayerState::Answering{ inner_body } = state { %>
|
|
<%- inner_body %>
|
|
<% } else if let PlayerState::Waiting(_) = state{ %>
|
|
<center>You answered the current question. Please wait for the results.</center>
|
|
<% } else if let PlayerState::Result{ inner_body } = state{ %>
|
|
<%- inner_body %>
|
|
<% } else if let PlayerState::Completed(correct) = state { %>
|
|
<center>The Quiz finished. You can close this tab now. You answered <b><%= correct*100.0 %>%</b> correctly.</center>
|
|
<% } %>
|
|
|
|
<% if !htmx { %>
|
|
</main>
|
|
<a class="watermark" href="https://git2.zettoit.eu/zettoit"><img src="/static/zettoit-style/zettoit.svg" alt="zettoIT Logo"></a>
|
|
<script src="/static/htmx.min.js"></script>
|
|
</body>
|
|
</html>
|
|
<% } %>
|