From de96175c18990b21bd5365200cbbbe5100d1b7b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20W=C3=BCrfl?= Date: Sun, 20 May 2018 17:02:41 +0200 Subject: [PATCH] Add download button for each file - This commit also introduces some CSS to place the buttons/forms next to each other --- static/index.css | 23 +++++++++++++++++++++++ templates/index.html | 13 +++++++++++-- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/static/index.css b/static/index.css index e69de29..77ab01a 100644 --- a/static/index.css +++ b/static/index.css @@ -0,0 +1,23 @@ +/* necessary to place both forms/buttons next to each other */ +li.file { + clear: both; + list-style-position: outside; +} + +/* necessary to place both forms/buttons next to each other */ +form.file { + /* Float both forms to the left */ + float: left; +} + +form.file.file_add { + margin-left: 5px; + margin-right: 5px; +} + +/* necessary to place both forms/buttons next to each other */ +form.file.file_download { + clear: right; + /* with some space to the left of the second form */ + margin-right: 20px; +} diff --git a/templates/index.html b/templates/index.html index 72858fd..27712ac 100644 --- a/templates/index.html +++ b/templates/index.html @@ -14,8 +14,17 @@ {%- set files = music_library.get_files(subdirpath) %} {%- if files %} {% for file in files %} - -
  •   {{ file }}
  • +
  • +
    + + +
    +
    + + +  {{ file }} +
    +
  • {% endfor %} {%- endif %}