diff options
| author | Felix Kaaman <tmtu@tmtu.ee> | 2020-02-22 23:27:01 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-22 23:27:01 +0100 |
| commit | 763b8c6579f3ae571f7287c72b9fb4f8b6e89349 (patch) | |
| tree | bc55a0e79107a93bc3e605a0cae32926dc4c52fc /web_server/templates/index.htm | |
| parent | 2792ba9c8a7120a91b3bd2c6075e737690e73405 (diff) | |
| parent | 326cfa543c6263818aad7dec4a869bc8139ec14c (diff) | |
| download | pokebot-763b8c6579f3ae571f7287c72b9fb4f8b6e89349.tar.gz pokebot-763b8c6579f3ae571f7287c72b9fb4f8b6e89349.zip | |
Merge pull request #33 from Mavulp/webserver
Webserver
Diffstat (limited to 'web_server/templates/index.htm')
| -rw-r--r-- | web_server/templates/index.htm | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/web_server/templates/index.htm b/web_server/templates/index.htm new file mode 100644 index 0000000..eed31f3 --- /dev/null +++ b/web_server/templates/index.htm @@ -0,0 +1,36 @@ +{% extends "base.htm" %} + +{% block title %}Overview{% endblock %} + +{% block content %} +<h1>Bots</h1> +<form action="/front-end" method="POST"> + <input type="hidden" placeholder="Enter front end" name="front-end" value="tmtu"> + <button type="submit">tmtu-mode</button> +</form> +<nav> + <a href="/">Bots</a> + <a href="/docs/api">API</a> +</nav> + +<ul> + {% for bot in bots %} + <h2>{{ bot.name }}</h1> + <div>State: {{ bot.state }}</div> + <div>Volume: {{ bot.volume * 100.0 }}%</div> + {% match bot.currently_playing %} + {% when Some with (current) %} + <span>Currently playing:</span> + {% let item = current %} + {% include "song.htm" %} + {% when None %} + {% endmatch %} + + {% for item in bot.playlist %} + <li> + {% include "song.htm" %} + </li> + {% endfor %} + {% endfor %} +</ul> +{% endblock %} |
