diff --git a/db/my_library.db b/db/my_library.db index 9763ca3..e7a6c9b 100644 Binary files a/db/my_library.db and b/db/my_library.db differ diff --git a/static/css/style.css b/static/css/style.css index 612c423..f9b2476 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -8,6 +8,8 @@ --rust: #a84832; --muted: #7a7060; --card-bg: #faf7f2; + --book-color: #a84832; + --show-color: #7a8c6e; } #body_page{ diff --git a/static/js/main.js b/static/js/main.js index 72ec880..6643273 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -1,12 +1,20 @@ -// open log button -const modal = document.getElementById("#formModal"); -const openbtn = document.getElementById("#openForm"); -const closebtn = document.getElementsByClassName("#closeForm"); +document.addEventListener("DOMContentLoaded", function() { + // open log button + const modal = document.getElementById("formModal"); + const openBtns = document.querySelectorAll(".open-form-btn"); + const closeBtn = document.getElementById("closeFormBtn"); -openbtn.addEventListener("click", function() { - modal.showModal(); -}); + if (modal && openBtns.length > 0) { + openBtns.forEach(btn => { + btn.addEventListener("click", function() { + modal.showModal(); + }); + }); + } -closebtn.addEventListener("click", function() { - modal.close(); -}) ; \ No newline at end of file + if (closeBtn && modal) { + closeBtn.addEventListener("click", function() { + modal.close(); + }); + } +}); \ No newline at end of file diff --git a/templates/main.html b/templates/main.html index 411b60c..27365a9 100644 --- a/templates/main.html +++ b/templates/main.html @@ -7,14 +7,14 @@ Show log - + - + @@ -50,7 +50,7 @@
-
+
+ log a book/show
@@ -79,13 +79,13 @@

📚 My Library

- {% comment %} button {% endcomment %} - + {# button #} + - {% comment %} this is the form {% endcomment %} + {# this is the form #} -
+ +
@@ -121,6 +122,6 @@
- +