From 3575ac579cdcc5a9fa3ffec84952a634d1d7deaf Mon Sep 17 00:00:00 2001 From: Jokler Date: Thu, 4 Jun 2020 21:51:49 +0200 Subject: Improve the default website somewhat --- web_server/static/style.css | 42 ++++++++++++++++++++++++++++ web_server/templates/index.htm | 63 ++++++++++++++++++++++++++++++++++-------- web_server/templates/song.htm | 7 ----- 3 files changed, 93 insertions(+), 19 deletions(-) delete mode 100644 web_server/templates/song.htm (limited to 'web_server') diff --git a/web_server/static/style.css b/web_server/static/style.css index 09a985c..7d2ba89 100644 --- a/web_server/static/style.css +++ b/web_server/static/style.css @@ -38,6 +38,48 @@ a:hover { color: #ccc; } +.thumbnail { + display: block; + max-height: 256px; + max-width: 512px; +} + +/* + * Playlist table + */ + +td { + padding-right: 16px; + padding-top: 1px; + padding-bottom: : 1px; +} + +td, th { + vertical-align:top; +} + +.tableheader td { + color: #918f8f; + border-bottom: 1px solid #3f4077; +} + +.stat { + text-align: right; + white-space: nowrap; + padding-left: 8px +} + +.tracktable { + border-left: 1px solid #3f4077; +} + +.tracktable tr:hover { + background-color: #163037; +} + +/* + * API Docs + */ pre { font-size: 0.9rem; font-family: monospace; diff --git a/web_server/templates/index.htm b/web_server/templates/index.htm index eed31f3..fc1f8e1 100644 --- a/web_server/templates/index.htm +++ b/web_server/templates/index.htm @@ -13,24 +13,63 @@ API - +

Playlist

+ + + + + + + + {% for item in bot.playlist %} + + + + + + + {% endfor %} +
#tracklengthadded by
{{ loop.index }}{{ item.title }} + {% let duration = item.duration %} + {{ duration|fmt_duration }} + {{ item.added_by }}
+ + {% when None %} + {% endmatch %} {% endblock %} diff --git a/web_server/templates/song.htm b/web_server/templates/song.htm deleted file mode 100644 index 072567a..0000000 --- a/web_server/templates/song.htm +++ /dev/null @@ -1,7 +0,0 @@ -{{ item.title }} -({{ item.duration|fmt_duration }}) -{% match item.thumbnail %} - {% when Some with (thumbnail) %} - - {% when None %} -{% endmatch %} -- cgit v1.2.3-70-g09d2