A Javascript todo list application that manages the state of a task (from & to checked, delete) and allows for filtering. All tasks are stored in local storage.
Colour palette is ispired by Dracula theme.
Demo:
- I want to be able to add an item to the list
- I want to be able to check an item I have added to the list
- I want to be able to delete an item I have added (checked or not) from the list
- I want to be able to filter between completed, uncompleted or both
- I want to be able to save to local storage and resume from local storage
Trigger: class = fas fa-plus-square
on click
Action:
- generate HTML of a new item with
.classList
propertyuncompleted
- add item to the
uncompletedArray
in local storage
Trigger: class = complete-btn
on click
Action:
- a new item on the
completedArray
with.classList
property'completed'
- delete from todoArray in storage, add to progressArray in local storage
- re-generate HTML item with
restore
button &'uncompleted'
property
Trigger: class = restore-btn
on click
Action:
- regenerate HTML of an item with
uncompleted
status - remove item from
completedArray
in local storage and add it touncompletedArray
Trigger: class = trash-btn
on click
Action:
- removal of item from array it belonged, either
uncompletedArray
orcompletedArray
/ discern that usingclassList
property - remove item from HTML doc
Trigger: class filter-todo
on change
Action:
- updating
.display
property toflex
ornone
depending filter condition over.classList
being met
Trigger: "DOMContentLoaded"
on load/reload
Action:
- reconstruct list HTML based on local storage including classList properties