Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/faisal-din/todo-app
https://github.com/faisal-din/todo-app
Last synced: 8 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/faisal-din/todo-app
- Owner: faisal-din
- Created: 2024-05-20T15:28:52.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-09-18T09:25:34.000Z (about 2 months ago)
- Last Synced: 2024-09-19T12:25:54.966Z (about 2 months ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# To-Do App with Local Storage
This is a simple to-do app built with HTML, CSS, and JavaScript. It allows users to add, complete, and delete tasks, and it stores the tasks in the browser's local storage so that they persist even after the page is refreshed.
## Features
- Add tasks with the click of a button or by pressing Enter.
- Mark tasks as completed.
- Delete tasks.
- Tasks are saved in local storage, so they persist across page reloads.## Code Explanation
### HTML
The basic structure of the HTML file includes an input field for tasks, a button to add tasks, and a container for displaying the tasks.
### JavaScript
The JavaScript code handles the following:
- **Adding tasks:** When a task is added, it is displayed in the task list and saved to local storage.
- **Completing tasks:** Clicking the check mark button toggles the completion status of the task and updates local storage.
- **Deleting tasks:** Clicking the trash can button removes the task from the task list and from local storage.
- **Local storage:** Tasks are stored in local storage as an array of objects, each containing the task text and its completion status. Tasks are loaded from local storage when the page loads.### CSS
Basic styling is applied to make the app visually appealing.
## Contributing
Contributions are welcome! If you have any suggestions or improvements, please submit a pull request or open an issue.