summaryrefslogtreecommitdiff
path: root/index.html.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'index.html.tmpl')
-rw-r--r--index.html.tmpl49
1 files changed, 0 insertions, 49 deletions
diff --git a/index.html.tmpl b/index.html.tmpl
deleted file mode 100644
index 17c67c1..0000000
--- a/index.html.tmpl
+++ /dev/null
@@ -1,49 +0,0 @@
-<!DOCTYPE html>
-
-<!--
- vim: shiftwidth=4 tabstop=4 noexpandtab
--->
-
-<html>
-
- <head>
-
- <title>IoT</title>
-
- <meta charset="utf-8"/>
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <link rel="stylesheet" href="./webiot.css" type="text/css">
-
- </head>
-
- <body>
-
- <main>
-
- <h1>IoT</h1>
-
- {{range .Hs100}}
- <div class="card">
- <h3 class="card-first-item">{{.Name}}</h3>
- <button onclick="api('{{.Ip}}', 'on')">on</button>
- <button class="card-last-item" onclick="api('{{.Ip}}', 'off')">off</button>
- </div>
- {{end}}
-
- <script>
- function api(host, state) {
- const xhttp = new XMLHttpRequest();
- xhttp.open(
- "POST",
- "/api?host=" + host + "&state=" + state,
- true
- );
- xhttp.send();
- }
- </script>
-
- </main>
-
- </body>
-
-</html>