diff options
author | xengineering <me@xengineering.eu> | 2023-03-27 18:08:34 +0200 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2023-03-27 19:31:33 +0200 |
commit | eb86fbf4c88647bcc6aaa86660da58df96a72850 (patch) | |
tree | 2b63542336c3de58f193952f6276f4227134c62b /appdata/index.html.tmpl | |
parent | d7ce7860bf47ad1f51a44a9705eb0dbf1825eb66 (diff) | |
download | webiot-eb86fbf4c88647bcc6aaa86660da58df96a72850.tar webiot-eb86fbf4c88647bcc6aaa86660da58df96a72850.tar.zst webiot-eb86fbf4c88647bcc6aaa86660da58df96a72850.zip |
Switch to simple.css
This very simple CSS framework is far better / beautiful / easy to
maintain than my own CSS.
Diffstat (limited to 'appdata/index.html.tmpl')
-rw-r--r-- | appdata/index.html.tmpl | 54 |
1 files changed, 29 insertions, 25 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 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> |