ars/templates/play.stpl

33 lines
1.4 KiB
Text
Raw Permalink Normal View History

2023-11-01 21:12:18 +01:00
<% if !htmx {%>
<!DOCTYPE html>
<html>
<head>
<title>zettoIT ARS</title>
<meta charset="UTF-8">
2023-11-10 15:51:53 +01:00
<link rel="stylesheet" href="/static/zettoit.css">
<link rel="icon" type="image/svg" href="/static/zettoit.svg"/>
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 { %>
2023-11-05 23:01:47 +01:00
<center>The Quiz hasn't started yet. Please wait for the first question.</center>
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{ %>
2023-11-05 23:01:47 +01:00
<center>You answered the current question. Please wait for the results.</center>
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 { %>
2023-11-05 23:01:47 +01:00
<center>The Quiz finished. You can close this tab now. You answered <b><%= correct*100.0 %>%</b> correctly.</center>
2023-11-01 21:12:18 +01:00
<% } %>
<% if !htmx { %>
</main>
2023-11-10 15:51:53 +01:00
<a class="watermark" href="https://git2.zettoit.eu/zettoit"><img src="/static/zettoit.svg" alt="zettoIT Logo"></a>
2023-11-01 21:12:18 +01:00
<script src="/static/htmx.min.js"></script>
</body>
</html>
<% } %>