aboutsummaryrefslogtreecommitdiffstats
path: root/templates/song.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/song.htm
parentca4c0158f417b87f04313053a3f656f2de4e803b (diff)
downloadpokebot-2831c2b60cb61a14c7efee4ab5c0389eb3ad5469.tar.gz
pokebot-2831c2b60cb61a14c7efee4ab5c0389eb3ad5469.zip
Add a very basic template using available info
Diffstat (limited to 'templates/song.htm')
-rw-r--r--templates/song.htm10
1 files changed, 10 insertions, 0 deletions
diff --git a/templates/song.htm b/templates/song.htm
new file mode 100644
index 0000000..93f4fec
--- /dev/null
+++ b/templates/song.htm
@@ -0,0 +1,10 @@
+<a href="{{ item.webpage_url }}">{{ item.title }}</a>
+{% match item.duration %}
+ {% when Some with (duration) %}
+ {% let secs = duration.as_secs() %}
+ {% let mins = secs / 60 %}
+ {% let submin_secs = secs % 60 %}
+ <span>({{ "{:02}"|format(mins) }}:{{ "{:02}"|format(submin_secs) }})</span>
+ {% when None %}
+ <span>(--:--)</span>
+{% endmatch %}