From 7f808081e15b68acd517cbc7d68b6839e0316dfb Mon Sep 17 00:00:00 2001 From: LadyKerr Date: Tue, 23 Jul 2024 12:22:47 -0500 Subject: [PATCH 1/3] created initial project --- index.html | 16 ++++++++++++++++ script.js | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 index.html create mode 100644 script.js diff --git a/index.html b/index.html new file mode 100644 index 0000000..3d15e5f --- /dev/null +++ b/index.html @@ -0,0 +1,16 @@ + + + + + + + + +
+

Git Going

+ + + +
+ + \ No newline at end of file diff --git a/script.js b/script.js new file mode 100644 index 0000000..42057f3 --- /dev/null +++ b/script.js @@ -0,0 +1,39 @@ +// Load todos from localStorage at startup +document.addEventListener('DOMContentLoaded', function() { + var todos = JSON.parse(localStorage.getItem('todos')) || []; + todos.forEach(addItem); +}); + +document.getElementById('add-todo').addEventListener('click', function() { + var value = document.getElementById('todo-input').value; + if (value) { + addItem(value); + document.getElementById('todo-input').value = ''; + saveTodos(); + } +}); + +function addItem(text) { + var list = document.getElementById('todo-list'); + + var item = document.createElement('li'); + item.innerText = text; + + var deleteButton = document.createElement('button'); + deleteButton.innerText = 'Delete'; + deleteButton.addEventListener('click', function() { + list.removeChild(item); + saveTodos(); + }); + + item.appendChild(deleteButton); + + list.appendChild(item); +} + +function saveTodos() { + var todos = Array.from(document.getElementById('todo-list').children).map(function(item) { + return item.innerText.replace('Delete', ''); + }); + localStorage.setItem('todos', JSON.stringify(todos)); +} \ No newline at end of file From 7ab30806a100428e13b4762d45e0a056cbe35ba8 Mon Sep 17 00:00:00 2001 From: GitBlake Date: Mon, 25 May 2026 08:35:40 -0400 Subject: [PATCH 2/3] Update style.css --- style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/style.css b/style.css index c69bcc1..3aa0977 100644 --- a/style.css +++ b/style.css @@ -19,7 +19,7 @@ body { #todo-list li { padding: 10px; - border: 1px solid #ddd; + border: 2px solid #ddd; margin-bottom: 10px; position: relative; } From 9dbf0a0e09524b122fff476595a37a929a17cd68 Mon Sep 17 00:00:00 2001 From: GitBlake Date: Mon, 25 May 2026 10:17:45 -0400 Subject: [PATCH 3/3] Update index.html --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 3d15e5f..03ce864 100644 --- a/index.html +++ b/index.html @@ -7,7 +7,7 @@
-

Git Going

+

Gitt Going