From 9d5e894dc5e1ece4c33764bf6477bdd9fec3f070 Mon Sep 17 00:00:00 2001 From: Rainyy21 Date: Wed, 25 Feb 2026 01:55:44 -0500 Subject: [PATCH] change how the form work --- static/css/card.css | 18 ++++++++++++++++++ static/js/main.js | 12 ++++++++++++ templates/main.html | 43 ++++++++++++++++++++++++++----------------- 3 files changed, 56 insertions(+), 17 deletions(-) diff --git a/static/css/card.css b/static/css/card.css index a960d0b..3a087e9 100644 --- a/static/css/card.css +++ b/static/css/card.css @@ -43,3 +43,21 @@ font-size: 0.8rem; margin: 5px 0; } + +dialog{ + border:none; + border-radius: 8px; + padding: 20px; + width: 300px; + box-shadow: 0 4px 10px rgba(0,0,0,0.2); +} + +dialog::backdrop { + background: rgba(0,0,0,0.5); +} + +form { + display: flex; + flex-direction: column; + gap: 10px; +} \ No newline at end of file diff --git a/static/js/main.js b/static/js/main.js index e69de29..72ec880 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -0,0 +1,12 @@ +// open log button +const modal = document.getElementById("#formModal"); +const openbtn = document.getElementById("#openForm"); +const closebtn = document.getElementsByClassName("#closeForm"); + +openbtn.addEventListener("click", function() { + modal.showModal(); +}); + +closebtn.addEventListener("click", function() { + modal.close(); +}) ; \ No newline at end of file diff --git a/templates/main.html b/templates/main.html index 08007bb..411b60c 100644 --- a/templates/main.html +++ b/templates/main.html @@ -50,7 +50,7 @@
-
+
+ log a book/show
@@ -78,23 +78,32 @@

📚 My Library

+ + {% comment %} button {% endcomment %} + + + {% comment %} this is the form {% endcomment %} + + +
+ + + + + + + +
+ +
-
- - - - - - - -