From aa5bfd4ccb23781d105b2629cf473fcf1da20fcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20H=C3=A1la?= Date: Tue, 26 Dec 2023 16:15:39 +0100 Subject: [PATCH] Rework song list page into bootstrap accordion - Less code to maintain - Improved visuals - Scroll button is now only shown when the song is unwrapped --- backend/static/js/chords.js | 5 ----- backend/templates/songs/index.html | 25 ++++++++++++++++++------- frontend/static/styles.sass | 15 ++++++++++++++- 3 files changed, 32 insertions(+), 13 deletions(-) diff --git a/backend/static/js/chords.js b/backend/static/js/chords.js index 1b6125d..d3b5509 100644 --- a/backend/static/js/chords.js +++ b/backend/static/js/chords.js @@ -22,11 +22,6 @@ function transpose(event, object, id) { input.attr("previous_value", new_value); } -function collapsible(element, id) { - $(".song:visible").not("#" + id).slideUp() - $('#' + id).slideToggle() -} - function isElementInViewPort(element) { let rect = element.getBoundingClientRect(); // get the height of the window diff --git a/backend/templates/songs/index.html b/backend/templates/songs/index.html index 3901f57..12eaac6 100644 --- a/backend/templates/songs/index.html +++ b/backend/templates/songs/index.html @@ -32,9 +32,19 @@ {% endblock %} {% block body %} +