summaryrefslogtreecommitdiff
path: root/appdata
diff options
context:
space:
mode:
Diffstat (limited to 'appdata')
-rw-r--r--appdata/index.html.tmpl54
l---------appdata/simple.css1
l---------appdata/webiot.css1
3 files changed, 30 insertions, 26 deletions
diff --git a/appdata/index.html.tmpl b/appdata/index.html.tmpl
index 17c67c1..131d4c1 100644
--- a/appdata/index.html.tmpl
+++ b/appdata/index.html.tmpl
@@ -1,9 +1,5 @@
<!DOCTYPE html>
-<!--
- vim: shiftwidth=4 tabstop=4 noexpandtab
--->
-
<html>
<head>
@@ -12,35 +8,43 @@
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
- <link rel="stylesheet" href="./webiot.css" type="text/css">
+ <link rel="stylesheet" href="./simple.css" type="text/css">
</head>
<body>
- <main>
-
- <h1>IoT</h1>
+ <header>
+ <h1>webiot</h1>
+ <p>A simple IoT web server</p>
+ </header>
- {{range .Hs100}}
- <div class="card">
- <h3 class="card-first-item">{{.Name}}</h3>
+ <main>{{range .Hs100}}
+ <section>
+ <p><strong>{{.Name}}</strong></p>
<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>
+ </section>{{end}}
+
+ <footer>
+ <center>
+ <p><a href="https://xengineering.eu/git/webiot">webiot</a>
+ is licensed under <a href="">AGPL&nbsp;v3</a> and developed
+ with <a href="https://simplecss.org/">simple.css</a>.</p>
+ </center>
+ </footer>
+
+ <script>
+ function api(host, state) {
+ const xhttp = new XMLHttpRequest();
+ xhttp.open(
+ "POST",
+ "/api?host=" + host + "&state=" + state,
+ true
+ );
+ xhttp.send();
+ }
+ </script>
</main>
diff --git a/appdata/simple.css b/appdata/simple.css
new file mode 120000
index 0000000..8f905d1
--- /dev/null
+++ b/appdata/simple.css
@@ -0,0 +1 @@
+../simple.css/simple.css \ No newline at end of file
diff --git a/appdata/webiot.css b/appdata/webiot.css
deleted file mode 120000
index 9dd798c..0000000
--- a/appdata/webiot.css
+++ /dev/null
@@ -1 +0,0 @@
-../libweb/libweb.css \ No newline at end of file