aboutsummaryrefslogtreecommitdiffstats
path: root/templates/index.htm
diff options
context:
space:
mode:
authorJokler <jokler@protonmail.com>2020-02-02 19:50:33 +0100
committerJokler <jokler@protonmail.com>2020-02-22 23:20:10 +0100
commit2831c2b60cb61a14c7efee4ab5c0389eb3ad5469 (patch)
tree835f1abad6e234f6d74d4be999f690709954be89 /templates/index.htm
parentca4c0158f417b87f04313053a3f656f2de4e803b (diff)
downloadpokebot-2831c2b60cb61a14c7efee4ab5c0389eb3ad5469.tar.gz
pokebot-2831c2b60cb61a14c7efee4ab5c0389eb3ad5469.zip
Add a very basic template using available info
Diffstat (limited to 'templates/index.htm')
-rw-r--r--templates/index.htm27
1 files changed, 27 insertions, 0 deletions
diff --git a/templates/index.htm b/templates/index.htm
new file mode 100644
index 0000000..2584603
--- /dev/null
+++ b/templates/index.htm
@@ -0,0 +1,27 @@
+{% extends "base.htm" %}
+
+{% block title %}Overview{% endblock %}
+
+{% block content %}
+<h1>Bots</h1>
+<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 %}