2023-11-01 21:12:18 +01:00
|
|
|
<% if !htmx {%>
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>zettoIT ARS</title>
|
|
|
|
<meta charset="UTF-8">
|
2023-11-05 19:54:47 +01:00
|
|
|
<link rel="stylesheet" href="/static/zettoit-style/zettoit.css">
|
2023-11-01 21:12:18 +01:00
|
|
|
<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 { %>
|
|
|
|
<article>
|
|
|
|
<center>The Quiz hasn't started yet. Please wait for the first question.</center>
|
|
|
|
</article>
|
2023-11-02 22:46:38 +01:00
|
|
|
<% } else if let PlayerState::Answering{ inner_body } = state { %>
|
|
|
|
<%- inner_body %>
|
2023-11-01 21:12:18 +01:00
|
|
|
<% } else if let PlayerState::Waiting(_) = state{ %>
|
|
|
|
<article aria-busy="true">
|
|
|
|
You answered the current question. Please wait for the results.
|
|
|
|
</article>
|
2023-11-02 22:46:38 +01:00
|
|
|
<% } else if let PlayerState::Result{ inner_body } = state{ %>
|
|
|
|
<%- inner_body %>
|
2023-11-01 21:12:18 +01:00
|
|
|
<% } else if let PlayerState::Completed(correct) = state { %>
|
|
|
|
<article>
|
|
|
|
The Quiz finished. You can close this tab now. You answered <b><%= correct*100.0 %>%</b> correctly.
|
|
|
|
</article>
|
|
|
|
<% } %>
|
|
|
|
|
|
|
|
<% if !htmx { %>
|
|
|
|
</main>
|
2023-11-05 19:54:47 +01:00
|
|
|
<a class="watermark" href="https://git2.zettoit.eu/zettoit"><img src="/static/zettoit-style/zettoit.svg" alt="zettoIT Logo"></a>
|
2023-11-01 21:12:18 +01:00
|
|
|
<script src="/static/htmx.min.js"></script>
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
<% } %>
|