-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcounter.tmpl
More file actions
39 lines (38 loc) · 1.4 KB
/
counter.tmpl
File metadata and controls
39 lines (38 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="color-scheme" content="light dark">
<title>Counter — LiveTemplate</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css">
{{if .lvt.DevMode}}
<link rel="stylesheet" href="/livetemplate.css">
<script defer src="/livetemplate-client.js"></script>
{{else}}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@livetemplate/client@latest/livetemplate.css">
<script defer src="https://cdn.jsdelivr.net/npm/@livetemplate/client@latest/dist/livetemplate-client.browser.js"></script>
{{end}}
</head>
<body>
<main class="container">
<article>
<header>
<hgroup>
<h1>{{.Title}}</h1>
<p>Real-time counter with WebSocket</p>
</hgroup>
</header>
<p>Counter: {{.Counter}}</p>
<fieldset role="group">
<button name="increment">+1</button>
<button name="decrement" class="secondary">-1</button>
<button name="reset" class="contrast">Reset</button>
</fieldset>
<footer>
<small>Last updated: {{.LastUpdated}}</small>
</footer>
</article>
</main>
</body>
</html>