layout.html
818 bytes
1{{define "page"}}
2<!DOCTYPE html>
3<html lang="en">
4<head>
5 <meta charset="utf-8">
6 <meta name="viewport" content="width=device-width, initial-scale=1">
7 <title>Muse Guessr</title>
8 <link rel="stylesheet" href="/static/style.css">
9 <script src="/static/htmx.min.js"></script>
10 <script>
11 function replayClip() {
12 var a = document.getElementById('clip');
13 if (!a) return;
14 a.pause();
15 a.currentTime = 0;
16 a.play().catch(function () {});
17 }
18 function longerClip() {
19 var a = document.getElementById('clip');
20 if (!a) return;
21 a.pause();
22 a.src = '/audio/long?n=' + window.clipNonce;
23 a.load();
24 a.play().catch(function () {});
25 }
26 </script>
27</head>
28<body>
29 <main class="game" id="game">
30 {{template "game" .}}
31 </main>
32</body>
33</html>
34{{end}}