From d3c81c622bd5cc9f6dc1f7d9133b2272a75e62f4 Mon Sep 17 00:00:00 2001 From: Unbewohnte Date: Sun, 24 Sep 2023 17:43:47 +0300 Subject: [PATCH] feat: UI improvements and auto-focus on input --- pages/index.html | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/pages/index.html b/pages/index.html index 2ab31e7..25fa342 100644 --- a/pages/index.html +++ b/pages/index.html @@ -4,20 +4,21 @@
-
- - +
+
+
+ +
+
+ +
+
- - -
- +
+
@@ -26,6 +27,7 @@ document.addEventListener('DOMContentLoaded', async function() { let username = getUsername(); let password = getUserPassword(); + document.getElementById("new-todo-text").focus(); // Make "Add" button to send document.getElementById("new-todo-submit").addEventListener("click", async (event) => { @@ -67,9 +69,9 @@ document.addEventListener('DOMContentLoaded', async function() { todos.push(item); let todoCompleteBtnID = "btn-complete-" + String(item.id); - todosDiv.innerHTML += "

" + item.text + - "

"; + todosDiv.innerHTML += "" + item.text + "" + + ""; completeButtonIDs.push(todoCompleteBtnID); });