42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/webpack.config.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 | const HtmlWebpackPlugin = require('html-webpack-plugin');
3 |
4 | module.exports = {
5 | mode: 'development',
6 | entry: {
7 | bundle: path.resolve(__dirname, 'src/index.js'),
8 | },
9 | output: {
10 | path: path.resolve(__dirname, 'dist'),
11 | filename: '[name][contenthash].js',
12 | clean: true,
13 | assetModuleFilename: '[name][ext]',
14 | },
15 | devtool: 'source-map',
16 | devServer: {
17 | static: {
18 | directory: path.resolve(__dirname, 'dist'),
19 | },
20 | port: 8080,
21 | open: false,
22 | hot: true,
23 | compress: true,
24 | historyApiFallback: true,
25 | },
26 | module: {
27 | rules: [
28 | {
29 | test: /\.scss$/,
30 | use: ['style-loader', 'css-loader', 'sass-loader'],
31 | },
32 | {
33 | test: /\.css$/i,
34 | use: ['style-loader', 'css-loader'],
35 | },
36 | {
37 | test: /\.js$/,
38 | exclude: /node_modules/,
39 | use: {
40 | loader: 'babel-loader',
41 | options: {
42 | presets: ['@babel/preset-env'],
43 | },
44 | },
45 | },
46 | {
47 | test: /\.(png|svg|jpg|jpeg|gif)$/i,
48 | type: 'asset/resource',
49 | },
50 | ],
51 | },
52 | plugins: [
53 | new HtmlWebpackPlugin({
54 | title: 'ToDo List',
55 | filename: 'index.html',
56 | template: 'src/index.html',
57 | }),
58 | ],
59 | };
60 |
--------------------------------------------------------------------------------
/dist/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
17 |
23 |
24 |
37 |
38 |
39 |
40 |
46 |
47 |
Clear all completed
48 |
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/.github/workflows/linters.yml:
--------------------------------------------------------------------------------
1 | name: Linters
2 |
3 | on: pull_request
4 |
5 | env:
6 | FORCE_COLOR: 1
7 |
8 | jobs:
9 | lighthouse:
10 | name: Lighthouse
11 | runs-on: ubuntu-22.04
12 | steps:
13 | - uses: actions/checkout@v2
14 | - uses: actions/setup-node@v1
15 | with:
16 | node-version: "12.x"
17 | - name: Setup Lighthouse
18 | run: npm install -g @lhci/cli@0.7.x
19 | - name: Lighthouse Report
20 | run: lhci autorun --upload.target=temporary-public-storage --collect.staticDistDir=.
21 | webhint:
22 | name: Webhint
23 | runs-on: ubuntu-22.04
24 | steps:
25 | - uses: actions/checkout@v2
26 | - uses: actions/setup-node@v1
27 | with:
28 | node-version: "12.x"
29 | - name: Setup Webhint
30 | run: |
31 | npm install --save-dev hint@7.x
32 | [ -f .hintrc ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/html-css-js/.hintrc
33 | - name: Webhint Report
34 | run: npx hint .
35 | stylelint:
36 | name: Stylelint
37 | runs-on: ubuntu-22.04
38 | steps:
39 | - uses: actions/checkout@v2
40 | - uses: actions/setup-node@v1
41 | with:
42 | node-version: "12.x"
43 | - name: Setup Stylelint
44 | run: |
45 | npm install --save-dev stylelint@13.x stylelint-scss@3.x stylelint-config-standard@21.x stylelint-csstree-validator@1.x
46 | [ -f .stylelintrc.json ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/html-css-js/.stylelintrc.json
47 | - name: Stylelint Report
48 | run: npx stylelint "**/*.{css,scss}"
49 | eslint:
50 | name: ESLint
51 | runs-on: ubuntu-22.04
52 | steps:
53 | - uses: actions/checkout@v2
54 | - uses: actions/setup-node@v1
55 | with:
56 | node-version: "12.x"
57 | - name: Setup html-webpack-plugin
58 | run: |
59 | npm install html-webpack-plugin
60 | - name: Setup ESLint
61 | run: |
62 | npm install --save-dev eslint@7.x eslint-config-airbnb-base@14.x eslint-plugin-import@2.x babel-eslint@10.x
63 | [ -f .eslintrc.json ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/html-css-js/.eslintrc.json
64 | - name: ESLint Report
65 | run: npx eslint .
66 | nodechecker:
67 | name: node_modules checker
68 | runs-on: ubuntu-22.04
69 | steps:
70 | - uses: actions/checkout@v2
71 | - name: Check node_modules existence
72 | run: |
73 | if [ -d "node_modules/" ]; then echo -e "\e[1;31mThe node_modules/ folder was pushed to the repo. Please remove it from the GitHub repository and try again."; echo -e "\e[1;32mYou can set up a .gitignore file with this folder included on it to prevent this from happening in the future." && exit 1; fi
74 |
--------------------------------------------------------------------------------
/src/style.css:
--------------------------------------------------------------------------------
1 | @import url('https://fonts.googleapis.com/css2?family=Lato&family=Poppins:wght@300;500&display=swap');
2 |
3 | /* GLOBAL STYLES */
4 |
5 | :root {
6 | --light: #f5f5f5;
7 | --dark: #313154;
8 | --grey: #e8e8e8;
9 | --yellow: rgba(234, 201, 101);
10 | --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
11 | }
12 |
13 | *,
14 | ::after,
15 | ::before {
16 | margin: 0;
17 | padding: 0;
18 | box-sizing: border-box;
19 | font-family: 'Lato', sans-serif;
20 | }
21 |
22 | body {
23 | background-color: var(--grey);
24 | font-family: 'Lato', sans-serif;
25 | }
26 |
27 | .content {
28 | background-color: var(--light);
29 | width: 80%;
30 | margin: 0 auto;
31 | padding: 1rem;
32 | display: flex;
33 | flex-direction: column;
34 | margin-top: 4rem;
35 | height: auto;
36 | border-radius: 0.5rem;
37 | box-shadow: var(--shadow);
38 | }
39 |
40 | .todo-header {
41 | display: flex;
42 | justify-content: space-between;
43 | padding-bottom: 1rem;
44 | align-items: center;
45 | }
46 |
47 | .form {
48 | display: flex;
49 | justify-content: space-between;
50 | height: 4rem;
51 | align-items: center;
52 | }
53 |
54 | .todo-form {
55 | display: flex;
56 | justify-content: space-between;
57 | flex: 2;
58 | }
59 |
60 | i {
61 | background: none;
62 | font-size: 1.5rem;
63 | color: grey;
64 | }
65 |
66 | input[type="text"]:focus-visible {
67 | width: 100%;
68 | height: 2rem;
69 | border: none;
70 | background: none;
71 | flex: 1 1 0%;
72 | outline: none;
73 | }
74 |
75 | ::placeholder {
76 | color: grey;
77 | font-size: 1.275rem;
78 | font-style: italic;
79 | }
80 |
81 | .todo-content {
82 | display: flex;
83 | justify-content: space-between;
84 | align-items: center;
85 | height: 4rem;
86 | }
87 |
88 | .todo-content,
89 | .form,
90 | .todo-header {
91 | border-bottom: 1px solid rgb(211, 200, 200);
92 | box-shadow: var(--shadow);
93 | }
94 |
95 | .content-list {
96 | display: grid;
97 | grid-template-columns: auto 1fr auto;
98 | flex-wrap: nowrap;
99 | width: 100%;
100 | }
101 |
102 | .hide {
103 | display: none;
104 | }
105 |
106 | .show {
107 | display: block;
108 | }
109 |
110 | .show-container {
111 | visibility: visible;
112 | }
113 |
114 | input[type="checkbox"] {
115 | border: none;
116 | outline: none;
117 | background: none;
118 | cursor: initial;
119 | }
120 |
121 | .done {
122 | text-decoration: line-through;
123 | color: grey;
124 | }
125 |
126 | #new-todo {
127 | align-items: center;
128 | gap: 6px;
129 | height: 2rem;
130 | border-bottom: 2px solid var(--grey);
131 | box-shadow: var(--grey);
132 | margin-bottom: 1rem;
133 | padding: 5px 10px;
134 | }
135 |
136 | #new-todo input {
137 | font-size: 1.5rem;
138 | }
139 |
140 | .remove {
141 | height: 3rem;
142 | width: 100%;
143 | display: flex;
144 | justify-content: center;
145 | align-items: center;
146 | background-color: var(--grey);
147 | font-size: 1.22rem;
148 | color: grey;
149 | border: none;
150 | padding: 1rem;
151 | border-bottom-left-radius: 0.5rem;
152 | border-bottom-right-radius: 0.5rem;
153 | margin-top: 1rem;
154 | }
155 |
156 | .todo-list {
157 | display: flex;
158 | align-items: center;
159 | gap: 6px;
160 | height: 2rem;
161 | border-bottom: 2px solid var(--grey);
162 | box-shadow: var(--grey);
163 | margin-bottom: 1rem;
164 | }
165 |
166 | .edit {
167 | background-color: black;
168 | border-radius: 4px;
169 | padding: 4px;
170 | font-size: 1rem;
171 | color: #fff;
172 | border: none;
173 | cursor: pointer;
174 | margin-left: 2rem;
175 | margin-right: 2rem;
176 | }
177 |
178 | .delete {
179 | background-color: rgb(219, 29, 29);
180 | border-radius: 4px;
181 | padding: 3px;
182 | font-size: 1rem;
183 | color: #fff;
184 | border: none;
185 | cursor: pointer;
186 | }
187 |
--------------------------------------------------------------------------------
/src/index.js:
--------------------------------------------------------------------------------
1 | import './style.css';
2 | // SELECT REQUIRED ELEMENTS
3 | const todoInput = document.querySelector('#addlist');
4 | const todoForm = document.querySelector('.todo-form');
5 | const todoWrapper = document.querySelector('.wrapper');
6 | const deleteCompleted = document.querySelector('.remove');
7 | const addLocalStorage = (todo) => {
8 | const todos = JSON.parse(localStorage.getItem('todos')) || [];
9 | todos.push(todo);
10 | localStorage.setItem('todos', JSON.stringify(todos));
11 | };
12 |
13 | // ADD TODO
14 | const addTodo = (e) => {
15 | e.preventDefault();
16 | const todo = todoInput.value;
17 | if (todo) {
18 | const todos = JSON.parse(localStorage.getItem('todos')) || [];
19 | const id = todos.length + 1;
20 | const completed = false;
21 | addLocalStorage(id, todo, completed);
22 | const todoItem = document.createElement('div');
23 | todoItem.className = `todo-item${id}`;
24 | todoItem.setAttribute('id', 'new-todo');
25 | todoItem.innerHTML = `
26 |
27 |
Edit
28 |
Delete `;
29 | todoWrapper.appendChild(todoItem);
30 | todoInput.value = '';
31 | }
32 | };
33 | // REMOVE FROM LOCAL STORAGE
34 | const removeLocalStorage = (id) => {
35 | let todos = JSON.parse(localStorage.getItem('todos')) || [];
36 | todos = todos.filter((todo) => todo.id !== id);
37 | localStorage.setItem('todos', JSON.stringify(todos));
38 | };
39 | // DELETE TODO
40 | const deleteTodo = (e) => {
41 | if (e.target.classList.contains('delete')) {
42 | removeLocalStorage(e.target.parentElement.classList[1]);
43 | e.target.parentElement.remove();
44 | }
45 | };
46 |
47 | // CHECK TODO
48 | const checkTodo = (e) => {
49 | if (e.target.className === 'todo-check') {
50 | const id = e.target.parentElement.classList[1];
51 | const isChecked = e.target.checked;
52 |
53 | if (isChecked) {
54 | e.target.nextElementSibling.style.textDecoration = 'line-through';
55 | } else {
56 | e.target.nextElementSibling.style.textDecoration = 'none';
57 | }
58 | let todos = JSON.parse(localStorage.getItem('todos')) || [];
59 | todos = todos.map((todo) => {
60 | if (todo.id === id) {
61 | todo.completed = isChecked;
62 | }
63 | return todo;
64 | });
65 | localStorage.setItem('todos', JSON.stringify(todos));
66 | }
67 | };
68 |
69 | // GET TODO
70 | const getTodo = () => {
71 | const todos = JSON.parse(localStorage.getItem('todos')) || [];
72 | todos.forEach((todo) => {
73 | const todoItem = document.createElement('div');
74 | todoItem.className = `todo-item${todo.id}`;
75 | todoItem.innerHTML = `
78 |
81 |
Edit
82 |
Delete `;
83 | todoWrapper.appendChild(todoItem);
84 | todoInput.value = '';
85 | });
86 | };
87 | // REMOVE DONE TODOS
88 | const removeDone = (e) => {
89 | if (e.target.classList.contains('remove')) {
90 | let todos = JSON.parse(localStorage.getItem('todos')) || [];
91 | todos = todos.filter((todo) => todo.checked === true);
92 | localStorage.setItem('todos', JSON.stringify(todos));
93 | todoWrapper.innerHTML = '';
94 | getTodo();
95 | }
96 | };
97 |
98 | // EDIT LOCAL STORAGE
99 | const editLocalStorage = (id) => {
100 | let todos = JSON.parse(localStorage.getItem('todos')) || [];
101 | todos = todos.map((todo) => {
102 | if (todo.id === id) {
103 | todo.text = todo;
104 | }
105 | return todo;
106 | });
107 | localStorage.setItem('todos', JSON.stringify(todos));
108 | };
109 |
110 | // EDIT TODO
111 | const editTodo = (e) => {
112 | if (e.target.className === 'edit') {
113 | const todoText = e.target.parentElement.querySelector('.todo-text');
114 | const id = e.target.parentElement.classList[1];
115 | if (todoText.disabled) {
116 | todoText.disabled = false;
117 | e.target.textContent = 'Save';
118 | } else {
119 | todoText.disabled = true;
120 | e.target.textContent = 'Edit';
121 | editLocalStorage(id, todoText.value);
122 | }
123 | }
124 | };
125 |
126 | // EVENT LISTENER FOR TODO
127 | todoForm.addEventListener('submit', addTodo);
128 | todoWrapper.addEventListener('click', deleteTodo);
129 | todoWrapper.addEventListener('click', checkTodo);
130 | todoWrapper.addEventListener('click', editTodo);
131 | window.addEventListener('DOMContentloaded', getTodo);
132 | deleteCompleted.addEventListener('click', removeDone);
133 |
--------------------------------------------------------------------------------
/review.js:
--------------------------------------------------------------------------------
1 | import "./style.css";
2 | // SELECT REQUIRED ELEMENTS
3 | const todoInput = document.querySelector("#addlist");
4 | const todoForm = document.querySelector(".todo-form");
5 | const todoWrapper = document.querySelector(".wrapper");
6 | const deleteCompleted = document.querySelector(".remove");
7 | const addLocalStorage = (todo) => {
8 | const todos = JSON.parse(localStorage.getItem("todos")) || [];
9 | todos.push(todo);
10 | localStorage.setItem("todos", JSON.stringify(todos));
11 | };
12 |
13 | // ADD TODO
14 | const addTodo = (e) => {
15 | e.preventDefault();
16 | const todo = todoInput.value;
17 | if (todo) {
18 | const todos = JSON.parse(localStorage.getItem("todos")) || [];
19 | const id = todos.length + 1;
20 | const completed = false;
21 | addLocalStorage(id, todo, completed);
22 | const todoItem = document.createElement("div");
23 | todoItem.className = `todo-item${id}`;
24 | todoItem.setAttribute("id", "new-todo");
25 | todoItem.innerHTML = `
26 |
27 |
Edit
28 |
Delete `;
29 | todoWrapper.appendChild(todoItem);
30 | todoInput.value = "";
31 | }
32 | };
33 | // REMOVE FROM LOCAL STORAGE
34 | const removeLocalStorage = (id) => {
35 | let todos = JSON.parse(localStorage.getItem("todos")) || [];
36 | todos = todos.filter((todo) => todo.id !== id);
37 | localStorage.setItem("todos", JSON.stringify(todos));
38 | };
39 | // DELETE TODO
40 | const deleteTodo = (e) => {
41 | if (e.target.classList.contains("delete")) {
42 | removeLocalStorage(e.target.parentElement.classList[1]);
43 | e.target.parentElement.remove();
44 | }
45 | };
46 |
47 | // CHECK TODO
48 | const checkTodo = (e) => {
49 | if (e.target.className === "todo-check") {
50 | const id = e.target.parentElement.classList[1];
51 | const isChecked = e.target.checked;
52 |
53 | if (isChecked) {
54 | e.target.nextElementSibling.style.textDecoration = "line-through";
55 | } else {
56 | e.target.nextElementSibling.style.textDecoration = "none";
57 | }
58 | let todos = JSON.parse(localStorage.getItem("todos")) || [];
59 | todos = todos.map((todo) => {
60 | if (todo.id === id) {
61 | todo.completed = isChecked;
62 | }
63 | return todo;
64 | });
65 | localStorage.setItem("todos", JSON.stringify(todos));
66 | }
67 | };
68 |
69 | // GET TODO
70 | const getTodo = () => {
71 | const todos = JSON.parse(localStorage.getItem("todos")) || [];
72 | todos.forEach((todo) => {
73 | const todoItem = document.createElement("div");
74 | todoItem.className = `todo-item${todo.id}`;
75 | todoItem.innerHTML = `
78 |
81 |
Edit
82 |
Delete `;
83 | todoWrapper.appendChild(todoItem);
84 | todoInput.value = "";
85 | });
86 | };
87 | // REMOVE DONE TODOS
88 | const removeDone = (e) => {
89 | if (e.target.classList.contains("remove")) {
90 | let todos = JSON.parse(localStorage.getItem("todos")) || [];
91 | todos = todos.filter((todo) => todo.checked === true);
92 | localStorage.setItem("todos", JSON.stringify(todos));
93 | todoWrapper.innerHTML = "";
94 | getTodo();
95 | }
96 | };
97 |
98 | // EDIT LOCAL STORAGE
99 | const editLocalStorage = (id) => {
100 | let todos = JSON.parse(localStorage.getItem("todos")) || [];
101 | todos = todos.map((todo) => {
102 | if (todo.id === id) {
103 | todo.text = todo;
104 | }
105 | return todo;
106 | });
107 | localStorage.setItem("todos", JSON.stringify(todos));
108 | };
109 |
110 | // EDIT TODO
111 | const editTodo = (e) => {
112 | if (e.target.className === "edit") {
113 | const todoText = e.target.parentElement.querySelector(".todo-text");
114 | const id = e.target.parentElement.classList[1];
115 | if (todoText.disabled) {
116 | todoText.disabled = false;
117 | e.target.textContent = "Save";
118 | } else {
119 | todoText.disabled = true;
120 | e.target.textContent = "Edit";
121 | editLocalStorage(id, todoText.value);
122 | }
123 | }
124 | };
125 |
126 | // EVENT LISTENER FOR TODO
127 | todoForm.addEventListener("submit", addTodo);
128 | todoWrapper.addEventListener("click", deleteTodo);
129 | todoWrapper.addEventListener("click", checkTodo);
130 | todoWrapper.addEventListener("click", editTodo);
131 | window.addEventListener("DOMContentloaded", getTodo);
132 | deleteCompleted.addEventListener("click", removeDone);
133 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # TODOList
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | # 📗 Table of Contents
15 |
16 | - [📖 About the Project](#about-project)
17 | - [🛠 Built With](#built-with)
18 | - [Tech Stack](#tech-stack)
19 | - [Key Features](#key-features)
20 | - [🚀 Visit my website](https://kevin-mena.github.io/Personal-Portfolio-Website/)
21 | - [💻 Getting Started](#getting-started)
22 | - [Setup](#setup)
23 | - [Prerequisites](#prerequisites)
24 | - [Install](#install)
25 | - [Usage](#usage)
26 | - [Run tests](#run-tests)
27 | - [Deployment](#triangular_flag_on_post-deployment)
28 | - [👥 Authors](#authors)
29 | - [🔭 Future Features](#future-features)
30 | - [🤝 Contributing](#contributing)
31 | - [⭐️ Show your support](#support)
32 | - [🙏 Acknowledgements](#acknowledgements)
33 | - [❓ FAQ (OPTIONAL)](#faq)
34 | - [📝 License](#license)
35 |
36 | # 📖 [ToDo List]
37 |
38 | **[ToDo List] is a simple app for keeping track simple tasks to be done by an individual.
39 |
40 | ## 🛠 Built With
41 |
42 | ### Tech Stack
43 |
44 |
45 | Markup
46 |
49 |
50 |
51 |
52 | Styles
53 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 | ### Key Features
64 |
65 |
66 | - **[Local Storage]**
67 | - **[Todo activities]**
68 |
69 |
(back to top )
70 |
71 |
72 | ## 🚀 Live Demo
73 |
74 | - [Live Demo Link](https://kevin-mena.github.io/TODOList/dist)
75 |
76 |
(back to top )
77 |
78 | ## 💻 Getting Started
79 |
80 | To get a local copy up and running, follow these steps.
81 |
82 | ### Prerequisites
83 |
84 | In order to run this project you need:
85 | A text-editor like VS code or Sublime Editor and a github account.
86 | ### Setup
87 |
88 | Clone this repository to your desired folder:
89 |
90 | ### Install
91 |
92 | Install this project with git bash or github desktop.
93 | ### Usage
94 |
95 | To run the project, execute the following command:
96 | $git clone to clone the project to your desktop.
97 | ### Run tests
98 |
99 | To run tests, run the following command:
100 | bin/rails test test/models/article_test.rb
101 |
(back to top )
102 |
103 | ## 👥 Authors
104 |
105 |
106 | 👤 **Kevin Okoth**
107 |
108 | - GitHub: [@githubhandle](https://github.com/Kevin-Mena)
109 | - Twitter: [@twitterhandle](https://twitter.com/Fmenawende)
110 | - LinkedIn: [LinkedIn](https://www.linkedin.com/in/kevin-okoth-19407119b/)
111 |
112 |
113 |
114 |
(back to top )
115 |
116 |
117 | ## 🔭 Future Features
118 |
119 | - [ ] **[UI]**
120 | - [ ] **[Add&Delete Features]**
121 | - [ ] **[Visual Support]**
122 |
123 |
(back to top )
124 |
125 |
126 | ## 🤝 Contributing
127 |
128 | Contributions, issues, and feature requests are welcome!
129 |
130 | Feel free to check the [issues page](../../issues/).
131 |
132 |
(back to top )
133 |
134 | ## ⭐️ Show your support
135 |
136 | If you like this project,give it a ⭐️!
137 |
138 |
(back to top )
139 |
140 | ## 🙏 Acknowledgments
141 |
142 | Thanks to everyone whose idea and codebase was used in this project🙏
143 |
144 |
(back to top )
145 |
146 | ## ❓ FAQ (OPTIONAL)
147 |
148 |
149 |
150 |
(back to top )
151 |
152 |
153 | ## 📝 License
MIT License
154 |
155 | This project is [MIT](Copyright (c) [2023] [Kevin Okoth]
156 |
157 | Permission is hereby granted, free of charge, to any person obtaining a copy
158 | of this software and associated documentation files (the "Software"), to deal
159 | in the Software without restriction, including without limitation the rights
160 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
161 | copies of the Software, and to permit persons to whom the Software is
162 | furnished to do so, subject to the following conditions:
163 |
164 | The above copyright notice and this permission notice shall be included in all
165 | copies or substantial portions of the Software.
166 |
167 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
168 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
169 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
170 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
171 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
172 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
173 | SOFTWARE. ) licensed.
174 | MIT License
175 |
176 | (back to top )
177 |
--------------------------------------------------------------------------------
/dist/bundlef680703b453e2db9fd1c.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"bundlef680703b453e2db9fd1c.js","mappings":";;;;;;;;;;;;;;;;;;AAAA;AAC0G;AACjB;AACzF,8BAA8B,mFAA2B,CAAC,4FAAqC;AAC/F,4HAA4H,kBAAkB;AAC9I;AACA,4EAA4E,uBAAuB,sBAAsB,sBAAsB,oCAAoC,6CAA6C,KAAK,oCAAoC,gBAAgB,iBAAiB,6BAA6B,sCAAsC,KAAK,cAAc,oCAAoC,sCAAsC,KAAK,kBAAkB,qCAAqC,iBAAiB,qBAAqB,oBAAoB,oBAAoB,6BAA6B,uBAAuB,mBAAmB,4BAA4B,gCAAgC,KAAK,sBAAsB,oBAAoB,qCAAqC,2BAA2B,0BAA0B,KAAK,eAAe,oBAAoB,qCAAqC,mBAAmB,0BAA0B,KAAK,oBAAoB,oBAAoB,qCAAqC,cAAc,KAAK,WAAW,uBAAuB,wBAAwB,kBAAkB,KAAK,4CAA4C,kBAAkB,mBAAmB,mBAAmB,uBAAuB,mBAAmB,oBAAoB,KAAK,uBAAuB,kBAAkB,0BAA0B,yBAAyB,KAAK,uBAAuB,oBAAoB,qCAAqC,0BAA0B,mBAAmB,KAAK,kDAAkD,kDAAkD,gCAAgC,KAAK,uBAAuB,oBAAoB,2CAA2C,wBAAwB,kBAAkB,KAAK,eAAe,oBAAoB,KAAK,eAAe,qBAAqB,KAAK,yBAAyB,0BAA0B,KAAK,kCAAkC,mBAAmB,oBAAoB,uBAAuB,sBAAsB,KAAK,eAAe,oCAAoC,kBAAkB,KAAK,mBAAmB,0BAA0B,eAAe,mBAAmB,2CAA2C,8BAA8B,0BAA0B,wBAAwB,KAAK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;;AAEb;;AAEA;AACA;;AAEA,kBAAkB,wBAAwB;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,oBAAoB,4BAA4B;AAChD;AACA;AACA;AACA;;AAEA;;AAEA,qBAAqB,6BAA6B;AAClD;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;ACvGa;;AAEb;AACA;;AAEA;AACA;AACA,sDAAsD;;AAEtD;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;ACtCa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;ACVa;;AAEb;AACA;AACA,cAAc,KAAwC,GAAG,sBAAiB,GAAG,CAAI;;AAEjF;AACA;AACA;AACA;;AAEA;;;;;;;;;;ACXa;;AAEb;AACA;AACA;;AAEA;AACA,kDAAkD;AAClD;;AAEA;AACA,0CAA0C;AAC1C;;AAEA;;AAEA;AACA,iFAAiF;AACjF;;AAEA;;AAEA;AACA,aAAa;AACb;;AAEA;AACA,aAAa;AACb;;AAEA;AACA,aAAa;AACb;;AAEA;;AAEA;AACA,yDAAyD;AACzD,IAAI;;AAEJ;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,KA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pack-starter/./node_modules/css-loader/dist/runtime/api.js","webpack://webpack-starter/./node_modules/css-loader/dist/runtime/sourceMaps.js","webpack://webpack-starter/./src/style.css?7163","webpack://webpack-starter/./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","webpack://webpack-starter/./node_modules/style-loader/dist/runtime/insertBySelector.js","webpack://webpack-starter/./node_modules/style-loader/dist/runtime/insertStyleElement.js","webpack://webpack-starter/./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js","webpack://webpack-starter/./node_modules/style-loader/dist/runtime/styleDomAPI.js","webpack://webpack-starter/./node_modules/style-loader/dist/runtime/styleTagTransform.js","webpack://webpack-starter/webpack/bootstrap","webpack://webpack-starter/webpack/runtime/compat get default export","webpack://webpack-starter/webpack/runtime/define property getters","webpack://webpack-starter/webpack/runtime/hasOwnProperty shorthand","webpack://webpack-starter/webpack/runtime/make namespace object","webpack://webpack-starter/webpack/runtime/nonce","webpack://webpack-starter/./src/index.js"],"sourcesContent":["// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n___CSS_LOADER_EXPORT___.push([module.id, \"@import url(https://fonts.googleapis.com/css2?family=Lato&family=Poppins:wght@300;500&display=swap);\"]);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/* GLOBAL STYLES */\\r\\n\\r\\n:root {\\r\\n --light: #f5f5f5;\\r\\n --dark: #313154;\\r\\n --grey: #e8e8e8;\\r\\n --yellow: rgba(234, 201, 101);\\r\\n --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);\\r\\n}\\r\\n\\r\\n*,\\r\\n::after,\\r\\n::before {\\r\\n margin: 0;\\r\\n padding: 0;\\r\\n box-sizing: border-box;\\r\\n font-family: 'Lato', sans-serif;\\r\\n}\\r\\n\\r\\nbody {\\r\\n background-color: var(--grey);\\r\\n font-family: 'Lato', sans-serif;\\r\\n}\\r\\n\\r\\n.content {\\r\\n background-color: var(--light);\\r\\n width: 80%;\\r\\n margin: 0 auto;\\r\\n padding: 1rem;\\r\\n display: flex;\\r\\n flex-direction: column;\\r\\n margin-top: 4rem;\\r\\n height: auto;\\r\\n border-radius: 0.5rem;\\r\\n box-shadow: var(--shadow);\\r\\n}\\r\\n\\r\\n.todo-header {\\r\\n display: flex;\\r\\n justify-content: space-between;\\r\\n padding-bottom: 1rem;\\r\\n align-items: center;\\r\\n}\\r\\n\\r\\n.form {\\r\\n display: flex;\\r\\n justify-content: space-between;\\r\\n height: 4rem;\\r\\n align-items: center;\\r\\n}\\r\\n\\r\\n.todo-form {\\r\\n display: flex;\\r\\n justify-content: space-between;\\r\\n flex: 2;\\r\\n}\\r\\n\\r\\ni {\\r\\n background: none;\\r\\n font-size: 1.5rem;\\r\\n color: grey;\\r\\n}\\r\\n\\r\\ninput[type=\\\"text\\\"]:focus-visible {\\r\\n width: 100%;\\r\\n height: 2rem;\\r\\n border: none;\\r\\n background: none;\\r\\n flex: 1 1 0%;\\r\\n outline: none;\\r\\n}\\r\\n\\r\\n::placeholder {\\r\\n color: grey;\\r\\n font-size: 1.275rem;\\r\\n font-style: italic;\\r\\n}\\r\\n\\r\\n.todo-content {\\r\\n display: flex;\\r\\n justify-content: space-between;\\r\\n align-items: center;\\r\\n height: 4rem;\\r\\n}\\r\\n\\r\\n.todo-content,\\r\\n.form,\\r\\n.todo-header {\\r\\n border-bottom: 1px solid rgb(211, 200, 200);\\r\\n box-shadow: var(--shadow);\\r\\n}\\r\\n\\r\\n.content-list {\\r\\n display: grid;\\r\\n grid-template-columns: auto 1fr auto;\\r\\n flex-wrap: nowrap;\\r\\n width: 100%;\\r\\n}\\r\\n\\r\\n.hide {\\r\\n display: none;\\r\\n}\\r\\n\\r\\n.show {\\r\\n display: block;\\r\\n}\\r\\n\\r\\n.show-container {\\r\\n visibility: visible;\\r\\n}\\r\\n\\r\\ninput[type=\\\"checkbox\\\"] {\\r\\n border: none;\\r\\n outline: none;\\r\\n background: none;\\r\\n cursor: initial;\\r\\n}\\r\\n\\r\\n.done {\\r\\n text-decoration: line-through;\\r\\n color: grey;\\r\\n}\\r\\n\\r\\n#new-todo {\\r\\n align-items: center;\\r\\n gap: 6px;\\r\\n height: 2rem;\\r\\n border-bottom: 2px solid var(--grey);\\r\\n box-shadow: var(--grey);\\r\\n margin-bottom: 1rem;\\r\\n padding: 5px 10px;\\r\\n}\\r\\n\\r\\n#new-todo input {\\r\\n font-size: 1.5rem;\\r\\n}\\r\\n\\r\\n.remove {\\r\\n height: 3rem;\\r\\n width: 100%;\\r\\n display: flex;\\r\\n justify-content: center;\\r\\n align-items: center;\\r\\n background-color: var(--grey);\\r\\n font-size: 1.22rem;\\r\\n color: grey;\\r\\n border: none;\\r\\n padding: 1rem;\\r\\n border-bottom-left-radius: 0.5rem;\\r\\n border-bottom-right-radius: 0.5rem;\\r\\n margin-top: 1rem;\\r\\n}\\r\\n\\r\\n.todo-list {\\r\\n display: flex;\\r\\n align-items: center;\\r\\n gap: 6px;\\r\\n height: 2rem;\\r\\n border-bottom: 2px solid var(--grey);\\r\\n box-shadow: var(--grey);\\r\\n margin-bottom: 1rem;\\r\\n}\\r\\n\\r\\n.edit {\\r\\n background-color: black;\\r\\n border-radius: 4px;\\r\\n padding: 4px;\\r\\n font-size: 1rem;\\r\\n color: #fff;\\r\\n border: none;\\r\\n cursor: pointer;\\r\\n margin-left: 2rem;\\r\\n margin-right: 2rem;\\r\\n}\\r\\n\\r\\n.delete {\\r\\n background-color: rgb(219, 29, 29);\\r\\n border-radius: 4px;\\r\\n padding: 3px;\\r\\n font-size: 1rem;\\r\\n color: #fff;\\r\\n border: none;\\r\\n cursor: pointer;\\r\\n}\\r\\n\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/style.css\"],\"names\":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AAW;EACX,aAAa;EACb,uBAAuB;EACvB,mBAAmB;EACnB,6BAA6B;EAC7B,kBAAkB;EAClB,WAAW;EACX,YAAY;EACZ,aAAa;EACb,iCAAiC;EACjC,kCAAkC;EAClC,gBAAgB;AAClB;;AAEA;EACE,aAAa;EACb,mBAAmB;EACnB,QAAQ;EACR,YAAY;EACZ,oCAAoC;EACpC,uBAAuB;EACvB,mBAAmB;AACrB;;AAEA;EACE,uBAAuB;EACvB,kBAAkB;EAClB,YAAY;EACZ,eAAe;EACf,WAAW;EACX,YAAY;EACZ,eAAe;EACf,iBAAiB;EACjB,kBAAkB;AACpB;;AAEA;EACE,kCAAkC;EAClC,kBAAkB;EAClB,YAAY;EACZ,eAAe;EACf,WAAW;EACX,YAAY;EACZ,eAAe;AACjB\",\"sourcesContent\":[\"@import url('https://fonts.googleapis.com/css2?family=Lato&family=Poppins:wght@300;500&display=swap');\\r\\n\\r\\n/* GLOBAL STYLES */\\r\\n\\r\\n:root {\\r\\n --light: #f5f5f5;\\r\\n --dark: #313154;\\r\\n --grey: #e8e8e8;\\r\\n --yellow: rgba(234, 201, 101);\\r\\n --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);\\r\\n}\\r\\n\\r\\n*,\\r\\n::after,\\r\\n::before {\\r\\n margin: 0;\\r\\n padding: 0;\\r\\n box-sizing: border-box;\\r\\n font-family: 'Lato', sans-serif;\\r\\n}\\r\\n\\r\\nbody {\\r\\n background-color: var(--grey);\\r\\n font-family: 'Lato', sans-serif;\\r\\n}\\r\\n\\r\\n.content {\\r\\n background-color: var(--light);\\r\\n width: 80%;\\r\\n margin: 0 auto;\\r\\n padding: 1rem;\\r\\n display: flex;\\r\\n flex-direction: column;\\r\\n margin-top: 4rem;\\r\\n height: auto;\\r\\n border-radius: 0.5rem;\\r\\n box-shadow: var(--shadow);\\r\\n}\\r\\n\\r\\n.todo-header {\\r\\n display: flex;\\r\\n justify-content: space-between;\\r\\n padding-bottom: 1rem;\\r\\n align-items: center;\\r\\n}\\r\\n\\r\\n.form {\\r\\n display: flex;\\r\\n justify-content: space-between;\\r\\n height: 4rem;\\r\\n align-items: center;\\r\\n}\\r\\n\\r\\n.todo-form {\\r\\n display: flex;\\r\\n justify-content: space-between;\\r\\n flex: 2;\\r\\n}\\r\\n\\r\\ni {\\r\\n background: none;\\r\\n font-size: 1.5rem;\\r\\n color: grey;\\r\\n}\\r\\n\\r\\ninput[type=\\\"text\\\"]:focus-visible {\\r\\n width: 100%;\\r\\n height: 2rem;\\r\\n border: none;\\r\\n background: none;\\r\\n flex: 1 1 0%;\\r\\n outline: none;\\r\\n}\\r\\n\\r\\n::placeholder {\\r\\n color: grey;\\r\\n font-size: 1.275rem;\\r\\n font-style: italic;\\r\\n}\\r\\n\\r\\n.todo-content {\\r\\n display: flex;\\r\\n justify-content: space-between;\\r\\n align-items: center;\\r\\n height: 4rem;\\r\\n}\\r\\n\\r\\n.todo-content,\\r\\n.form,\\r\\n.todo-header {\\r\\n border-bottom: 1px solid rgb(211, 200, 200);\\r\\n box-shadow: var(--shadow);\\r\\n}\\r\\n\\r\\n.content-list {\\r\\n display: grid;\\r\\n grid-template-columns: auto 1fr auto;\\r\\n flex-wrap: nowrap;\\r\\n width: 100%;\\r\\n}\\r\\n\\r\\n.hide {\\r\\n display: none;\\r\\n}\\r\\n\\r\\n.show {\\r\\n display: block;\\r\\n}\\r\\n\\r\\n.show-container {\\r\\n visibility: visible;\\r\\n}\\r\\n\\r\\ninput[type=\\\"checkbox\\\"] {\\r\\n border: none;\\r\\n outline: none;\\r\\n background: none;\\r\\n cursor: initial;\\r\\n}\\r\\n\\r\\n.done {\\r\\n text-decoration: line-through;\\r\\n color: grey;\\r\\n}\\r\\n\\r\\n#new-todo {\\r\\n align-items: center;\\r\\n gap: 6px;\\r\\n height: 2rem;\\r\\n border-bottom: 2px solid var(--grey);\\r\\n box-shadow: var(--grey);\\r\\n margin-bottom: 1rem;\\r\\n padding: 5px 10px;\\r\\n}\\r\\n\\r\\n#new-todo input {\\r\\n font-size: 1.5rem;\\r\\n}\\r\\n\\r\\n.remove {\\r\\n height: 3rem;\\r\\n width: 100%;\\r\\n display: flex;\\r\\n justify-content: center;\\r\\n align-items: center;\\r\\n background-color: var(--grey);\\r\\n font-size: 1.22rem;\\r\\n color: grey;\\r\\n border: none;\\r\\n padding: 1rem;\\r\\n border-bottom-left-radius: 0.5rem;\\r\\n border-bottom-right-radius: 0.5rem;\\r\\n margin-top: 1rem;\\r\\n}\\r\\n\\r\\n.todo-list {\\r\\n display: flex;\\r\\n align-items: center;\\r\\n gap: 6px;\\r\\n height: 2rem;\\r\\n border-bottom: 2px solid var(--grey);\\r\\n box-shadow: var(--grey);\\r\\n margin-bottom: 1rem;\\r\\n}\\r\\n\\r\\n.edit {\\r\\n background-color: black;\\r\\n border-radius: 4px;\\r\\n padding: 4px;\\r\\n font-size: 1rem;\\r\\n color: #fff;\\r\\n border: none;\\r\\n cursor: pointer;\\r\\n margin-left: 2rem;\\r\\n margin-right: 2rem;\\r\\n}\\r\\n\\r\\n.delete {\\r\\n background-color: rgb(219, 29, 29);\\r\\n border-radius: 4px;\\r\\n padding: 3px;\\r\\n font-size: 1rem;\\r\\n color: #fff;\\r\\n border: none;\\r\\n cursor: pointer;\\r\\n}\\r\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};","\"use strict\";\n\nmodule.exports = function (item) {\n var content = item[1];\n var cssMapping = item[3];\n if (!cssMapping) {\n return content;\n }\n if (typeof btoa === \"function\") {\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n var sourceMapping = \"/*# \".concat(data, \" */\");\n return [content].concat([sourceMapping]).join(\"\\n\");\n }\n return [content].join(\"\\n\");\n};","\n import API from \"!../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../node_modules/css-loader/dist/cjs.js!./style.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../node_modules/css-loader/dist/cjs.js!./style.css\";\n export default content && content.locals ? content.locals : undefined;\n","\"use strict\";\n\nvar stylesInDOM = [];\n\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n\n for (var i = 0; i < stylesInDOM.length; i++) {\n if (stylesInDOM[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n\n return result;\n}\n\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var indexByIdentifier = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3],\n supports: item[4],\n layer: item[5]\n };\n\n if (indexByIdentifier !== -1) {\n stylesInDOM[indexByIdentifier].references++;\n stylesInDOM[indexByIdentifier].updater(obj);\n } else {\n var updater = addElementStyle(obj, options);\n options.byIndex = i;\n stylesInDOM.splice(i, 0, {\n identifier: identifier,\n updater: updater,\n references: 1\n });\n }\n\n identifiers.push(identifier);\n }\n\n return identifiers;\n}\n\nfunction addElementStyle(obj, options) {\n var api = options.domAPI(options);\n api.update(obj);\n\n var updater = function updater(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {\n return;\n }\n\n api.update(obj = newObj);\n } else {\n api.remove();\n }\n };\n\n return updater;\n}\n\nmodule.exports = function (list, options) {\n options = options || {};\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDOM[index].references--;\n }\n\n var newLastIdentifiers = modulesToDom(newList, options);\n\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n\n var _index = getIndexByIdentifier(_identifier);\n\n if (stylesInDOM[_index].references === 0) {\n stylesInDOM[_index].updater();\n\n stylesInDOM.splice(_index, 1);\n }\n }\n\n lastIdentifiers = newLastIdentifiers;\n };\n};","\"use strict\";\n\nvar memo = {};\n/* istanbul ignore next */\n\nfunction getTarget(target) {\n if (typeof memo[target] === \"undefined\") {\n var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself\n\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n\n memo[target] = styleTarget;\n }\n\n return memo[target];\n}\n/* istanbul ignore next */\n\n\nfunction insertBySelector(insert, style) {\n var target = getTarget(insert);\n\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n\n target.appendChild(style);\n}\n\nmodule.exports = insertBySelector;","\"use strict\";\n\n/* istanbul ignore next */\nfunction insertStyleElement(options) {\n var element = document.createElement(\"style\");\n options.setAttributes(element, options.attributes);\n options.insert(element, options.options);\n return element;\n}\n\nmodule.exports = insertStyleElement;","\"use strict\";\n\n/* istanbul ignore next */\nfunction setAttributesWithoutAttributes(styleElement) {\n var nonce = typeof __webpack_nonce__ !== \"undefined\" ? __webpack_nonce__ : null;\n\n if (nonce) {\n styleElement.setAttribute(\"nonce\", nonce);\n }\n}\n\nmodule.exports = setAttributesWithoutAttributes;","\"use strict\";\n\n/* istanbul ignore next */\nfunction apply(styleElement, options, obj) {\n var css = \"\";\n\n if (obj.supports) {\n css += \"@supports (\".concat(obj.supports, \") {\");\n }\n\n if (obj.media) {\n css += \"@media \".concat(obj.media, \" {\");\n }\n\n var needLayer = typeof obj.layer !== \"undefined\";\n\n if (needLayer) {\n css += \"@layer\".concat(obj.layer.length > 0 ? \" \".concat(obj.layer) : \"\", \" {\");\n }\n\n css += obj.css;\n\n if (needLayer) {\n css += \"}\";\n }\n\n if (obj.media) {\n css += \"}\";\n }\n\n if (obj.supports) {\n css += \"}\";\n }\n\n var sourceMap = obj.sourceMap;\n\n if (sourceMap && typeof btoa !== \"undefined\") {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n } // For old IE\n\n /* istanbul ignore if */\n\n\n options.styleTagTransform(css, styleElement, options.options);\n}\n\nfunction removeStyleElement(styleElement) {\n // istanbul ignore if\n if (styleElement.parentNode === null) {\n return false;\n }\n\n styleElement.parentNode.removeChild(styleElement);\n}\n/* istanbul ignore next */\n\n\nfunction domAPI(options) {\n var styleElement = options.insertStyleElement(options);\n return {\n update: function update(obj) {\n apply(styleElement, options, obj);\n },\n remove: function remove() {\n removeStyleElement(styleElement);\n }\n };\n}\n\nmodule.exports = domAPI;","\"use strict\";\n\n/* istanbul ignore next */\nfunction styleTagTransform(css, styleElement) {\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css;\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild);\n }\n\n styleElement.appendChild(document.createTextNode(css));\n }\n}\n\nmodule.exports = styleTagTransform;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nc = undefined;","import './style.css';\r\n// SELECT REQUIRED ELEMENTS\r\nconst todoInput = document.querySelector('#addlist');\r\nconst todoForm = document.querySelector('.todo-form');\r\nconst todoWrapper = document.querySelector('.wrapper');\r\nconst deleteCompleted = document.querySelector('.remove');\r\nconst addLocalStorage = (todo) => {\r\n const todos = JSON.parse(localStorage.getItem('todos')) || [];\r\n todos.push(todo);\r\n localStorage.setItem('todos', JSON.stringify(todos));\r\n};\r\n\r\n// ADD TODO\r\nconst addTodo = (e) => {\r\n e.preventDefault();\r\n const todo = todoInput.value;\r\n if (todo) {\r\n const todos = JSON.parse(localStorage.getItem('todos')) || [];\r\n const id = todos.length + 1;\r\n const completed = false;\r\n addLocalStorage(id, todo, completed);\r\n const todoItem = document.createElement('div');\r\n todoItem.className = `todo-item${id}`;\r\n todoItem.setAttribute('id', 'new-todo');\r\n todoItem.innerHTML = ` \r\n \r\n Edit \r\n Delete `;\r\n todoWrapper.appendChild(todoItem);\r\n todoInput.value = '';\r\n }\r\n};\r\n// REMOVE FROM LOCAL STORAGE\r\nconst removeLocalStorage = (id) => {\r\n let todos = JSON.parse(localStorage.getItem('todos')) || [];\r\n todos = todos.filter((todo) => todo.id !== id);\r\n localStorage.setItem('todos', JSON.stringify(todos));\r\n};\r\n// DELETE TODO\r\nconst deleteTodo = (e) => {\r\n if (e.target.classList.contains('delete')) {\r\n removeLocalStorage(e.target.parentElement.classList[1]);\r\n e.target.parentElement.remove();\r\n }\r\n};\r\n\r\n// CHECK TODO\r\nconst checkTodo = (e) => {\r\n if (e.target.className === 'todo-check') {\r\n const id = e.target.parentElement.classList[1];\r\n const isChecked = e.target.checked;\r\n\r\n if (isChecked) {\r\n e.target.nextElementSibling.style.textDecoration = 'line-through';\r\n } else {\r\n e.target.nextElementSibling.style.textDecoration = 'none';\r\n }\r\n let todos = JSON.parse(localStorage.getItem('todos')) || [];\r\n todos = todos.map((todo) => {\r\n if (todo.id === id) {\r\n todo.completed = isChecked;\r\n }\r\n return todo;\r\n });\r\n localStorage.setItem('todos', JSON.stringify(todos));\r\n }\r\n};\r\n\r\n// GET TODO\r\nconst getTodo = () => {\r\n const todos = JSON.parse(localStorage.getItem('todos')) || [];\r\n todos.forEach((todo) => {\r\n const todoItem = document.createElement('div');\r\n todoItem.className = `todo-item${todo.id}`;\r\n todoItem.innerHTML = ` \r\n \r\n Edit \r\n Delete `;\r\n todoWrapper.appendChild(todoItem);\r\n todoInput.value = '';\r\n });\r\n};\r\n// REMOVE DONE TODOS\r\nconst removeDone = (e) => {\r\n if (e.target.classList.contains('remove')) {\r\n let todos = JSON.parse(localStorage.getItem('todos')) || [];\r\n todos = todos.filter((todo) => todo.checked === true);\r\n localStorage.setItem('todos', JSON.stringify(todos));\r\n todoWrapper.innerHTML = '';\r\n getTodo();\r\n }\r\n};\r\n\r\n// EDIT LOCAL STORAGE\r\nconst editLocalStorage = (id) => {\r\n let todos = JSON.parse(localStorage.getItem('todos')) || [];\r\n todos = todos.map((todo) => {\r\n if (todo.id === id) {\r\n todo.text = todo;\r\n }\r\n return todo;\r\n });\r\n localStorage.setItem('todos', JSON.stringify(todos));\r\n};\r\n\r\n// EDIT TODO\r\nconst editTodo = (e) => {\r\n if (e.target.className === 'edit') {\r\n const todoText = e.target.parentElement.querySelector('.todo-text');\r\n const id = e.target.parentElement.classList[1];\r\n if (todoText.disabled) {\r\n todoText.disabled = false;\r\n e.target.textContent = 'Save';\r\n } else {\r\n todoText.disabled = true;\r\n e.target.textContent = 'Edit';\r\n editLocalStorage(id, todoText.value);\r\n }\r\n }\r\n};\r\n\r\n// EVENT LISTENER FOR TODO\r\ntodoForm.addEventListener('submit', addTodo);\r\ntodoWrapper.addEventListener('click', deleteTodo);\r\ntodoWrapper.addEventListener('click', checkTodo);\r\ntodoWrapper.addEventListener('click', editTodo);\r\nwindow.addEventListener('DOMContentloaded', getTodo);\r\ndeleteCompleted.addEventListener('click', removeDone);\r\n"],"names":["todoInput","document","querySelector","todoForm","todoWrapper","deleteCompleted","addLocalStorage","todo","todos","JSON","parse","localStorage","getItem","push","setItem","stringify","addTodo","e","preventDefault","value","id","length","completed","todoItem","createElement","className","concat","setAttribute","innerHTML","appendChild","removeLocalStorage","filter","deleteTodo","target","classList","contains","parentElement","remove","checkTodo","isChecked","checked","nextElementSibling","style","textDecoration","map","getTodo","forEach","removeDone","editLocalStorage","text","editTodo","todoText","disabled","textContent","addEventListener","window"],"sourceRoot":""}
--------------------------------------------------------------------------------
/dist/bundlef680703b453e2db9fd1c.js:
--------------------------------------------------------------------------------
1 | /******/ (() => { // webpackBootstrap
2 | /******/ "use strict";
3 | /******/ var __webpack_modules__ = ({
4 |
5 | /***/ "./node_modules/css-loader/dist/cjs.js!./src/style.css":
6 | /*!*************************************************************!*\
7 | !*** ./node_modules/css-loader/dist/cjs.js!./src/style.css ***!
8 | \*************************************************************/
9 | /***/ ((module, __webpack_exports__, __webpack_require__) => {
10 |
11 | __webpack_require__.r(__webpack_exports__);
12 | /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13 | /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
14 | /* harmony export */ });
15 | /* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../node_modules/css-loader/dist/runtime/sourceMaps.js */ "./node_modules/css-loader/dist/runtime/sourceMaps.js");
16 | /* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
17 | /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
18 | /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
19 | // Imports
20 |
21 |
22 | var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
23 | ___CSS_LOADER_EXPORT___.push([module.id, "@import url(https://fonts.googleapis.com/css2?family=Lato&family=Poppins:wght@300;500&display=swap);"]);
24 | // Module
25 | ___CSS_LOADER_EXPORT___.push([module.id, "/* GLOBAL STYLES */\r\n\r\n:root {\r\n --light: #f5f5f5;\r\n --dark: #313154;\r\n --grey: #e8e8e8;\r\n --yellow: rgba(234, 201, 101);\r\n --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);\r\n}\r\n\r\n*,\r\n::after,\r\n::before {\r\n margin: 0;\r\n padding: 0;\r\n box-sizing: border-box;\r\n font-family: 'Lato', sans-serif;\r\n}\r\n\r\nbody {\r\n background-color: var(--grey);\r\n font-family: 'Lato', sans-serif;\r\n}\r\n\r\n.content {\r\n background-color: var(--light);\r\n width: 80%;\r\n margin: 0 auto;\r\n padding: 1rem;\r\n display: flex;\r\n flex-direction: column;\r\n margin-top: 4rem;\r\n height: auto;\r\n border-radius: 0.5rem;\r\n box-shadow: var(--shadow);\r\n}\r\n\r\n.todo-header {\r\n display: flex;\r\n justify-content: space-between;\r\n padding-bottom: 1rem;\r\n align-items: center;\r\n}\r\n\r\n.form {\r\n display: flex;\r\n justify-content: space-between;\r\n height: 4rem;\r\n align-items: center;\r\n}\r\n\r\n.todo-form {\r\n display: flex;\r\n justify-content: space-between;\r\n flex: 2;\r\n}\r\n\r\ni {\r\n background: none;\r\n font-size: 1.5rem;\r\n color: grey;\r\n}\r\n\r\ninput[type=\"text\"]:focus-visible {\r\n width: 100%;\r\n height: 2rem;\r\n border: none;\r\n background: none;\r\n flex: 1 1 0%;\r\n outline: none;\r\n}\r\n\r\n::placeholder {\r\n color: grey;\r\n font-size: 1.275rem;\r\n font-style: italic;\r\n}\r\n\r\n.todo-content {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n height: 4rem;\r\n}\r\n\r\n.todo-content,\r\n.form,\r\n.todo-header {\r\n border-bottom: 1px solid rgb(211, 200, 200);\r\n box-shadow: var(--shadow);\r\n}\r\n\r\n.content-list {\r\n display: grid;\r\n grid-template-columns: auto 1fr auto;\r\n flex-wrap: nowrap;\r\n width: 100%;\r\n}\r\n\r\n.hide {\r\n display: none;\r\n}\r\n\r\n.show {\r\n display: block;\r\n}\r\n\r\n.show-container {\r\n visibility: visible;\r\n}\r\n\r\ninput[type=\"checkbox\"] {\r\n border: none;\r\n outline: none;\r\n background: none;\r\n cursor: initial;\r\n}\r\n\r\n.done {\r\n text-decoration: line-through;\r\n color: grey;\r\n}\r\n\r\n#new-todo {\r\n align-items: center;\r\n gap: 6px;\r\n height: 2rem;\r\n border-bottom: 2px solid var(--grey);\r\n box-shadow: var(--grey);\r\n margin-bottom: 1rem;\r\n padding: 5px 10px;\r\n}\r\n\r\n#new-todo input {\r\n font-size: 1.5rem;\r\n}\r\n\r\n.remove {\r\n height: 3rem;\r\n width: 100%;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n background-color: var(--grey);\r\n font-size: 1.22rem;\r\n color: grey;\r\n border: none;\r\n padding: 1rem;\r\n border-bottom-left-radius: 0.5rem;\r\n border-bottom-right-radius: 0.5rem;\r\n margin-top: 1rem;\r\n}\r\n\r\n.todo-list {\r\n display: flex;\r\n align-items: center;\r\n gap: 6px;\r\n height: 2rem;\r\n border-bottom: 2px solid var(--grey);\r\n box-shadow: var(--grey);\r\n margin-bottom: 1rem;\r\n}\r\n\r\n.edit {\r\n background-color: black;\r\n border-radius: 4px;\r\n padding: 4px;\r\n font-size: 1rem;\r\n color: #fff;\r\n border: none;\r\n cursor: pointer;\r\n margin-left: 2rem;\r\n margin-right: 2rem;\r\n}\r\n\r\n.delete {\r\n background-color: rgb(219, 29, 29);\r\n border-radius: 4px;\r\n padding: 3px;\r\n font-size: 1rem;\r\n color: #fff;\r\n border: none;\r\n cursor: pointer;\r\n}\r\n", "",{"version":3,"sources":["webpack://./src/style.css"],"names":[],"mappings":"AAEA,kBAAkB;;AAElB;EACE,gBAAgB;EAChB,eAAe;EACf,eAAe;EACf,6BAA6B;EAC7B,sCAAsC;AACxC;;AAEA;;;EAGE,SAAS;EACT,UAAU;EACV,sBAAsB;EACtB,+BAA+B;AACjC;;AAEA;EACE,6BAA6B;EAC7B,+BAA+B;AACjC;;AAEA;EACE,8BAA8B;EAC9B,UAAU;EACV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mB;AACrB;;AAEA;EACE,uBAAuB;EACvB,kBAAkB;EAClB,YAAY;EACZ,eAAe;EACf,WAAW;EACX,YAAY;EACZ,eAAe;EACf,iBAAiB;EACjB,kBAAkB;AACpB;;AAEA;EACE,kCAAkC;EAClC,kBAAkB;EAClB,YAAY;EACZ,eAAe;EACf,WAAW;EACX,YAAY;EACZ,eAAe;AACjB","sourcesContent":["@import url('https://fonts.googleapis.com/css2?family=Lato&family=Poppins:wght@300;500&display=swap');\r\n\r\n/* GLOBAL STYLES */\r\n\r\n:root {\r\n --light: #f5f5f5;\r\n --dark: #313154;\r\n --grey: #e8e8e8;\r\n --yellow: rgba(234, 201, 101);\r\n --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);\r\n}\r\n\r\n*,\r\n::after,\r\n::before {\r\n margin: 0;\r\n padding: 0;\r\n box-sizing: border-box;\r\n font-family: 'Lato', sans-serif;\r\n}\r\n\r\nbody {\r\n background-color: var(--grey);\r\n font-family: 'Lato', sans-serif;\r\n}\r\n\r\n.content {\r\n background-color: var(--light);\r\n width: 80%;\r\n margin: 0 auto;\r\n padding: 1rem;\r\n display: flex;\r\n flex-direction: column;\r\n margin-top: 4rem;\r\n height: auto;\r\n border-radius: 0.5rem;\r\n box-shadow: var(--shadow);\r\n}\r\n\r\n.todo-header {\r\n display: flex;\r\n justify-content: space-between;\r\n padding-bottom: 1rem;\r\n align-items: center;\r\n}\r\n\r\n.form {\r\n display: flex;\r\n justify-content: space-between;\r\n height: 4rem;\r\n align-items: center;\r\n}\r\n\r\n.todo-form {\r\n display: flex;\r\n justify-content: space-between;\r\n flex: 2;\r\n}\r\n\r\ni {\r\n background: none;\r\n font-size: 1.5rem;\r\n color: grey;\r\n}\r\n\r\ninput[type=\"text\"]:focus-visible {\r\n width: 100%;\r\n height: 2rem;\r\n border: none;\r\n background: none;\r\n flex: 1 1 0%;\r\n outline: none;\r\n}\r\n\r\n::placeholder {\r\n color: grey;\r\n font-size: 1.275rem;\r\n font-style: italic;\r\n}\r\n\r\n.todo-content {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n height: 4rem;\r\n}\r\n\r\n.todo-content,\r\n.form,\r\n.todo-header {\r\n border-bottom: 1px solid rgb(211, 200, 200);\r\n box-shadow: var(--shadow);\r\n}\r\n\r\n.content-list {\r\n display: grid;\r\n grid-template-columns: auto 1fr auto;\r\n flex-wrap: nowrap;\r\n width: 100%;\r\n}\r\n\r\n.hide {\r\n display: none;\r\n}\r\n\r\n.show {\r\n display: block;\r\n}\r\n\r\n.show-container {\r\n visibility: visible;\r\n}\r\n\r\ninput[type=\"checkbox\"] {\r\n border: none;\r\n outline: none;\r\n background: none;\r\n cursor: initial;\r\n}\r\n\r\n.done {\r\n text-decoration: line-through;\r\n color: grey;\r\n}\r\n\r\n#new-todo {\r\n align-items: center;\r\n gap: 6px;\r\n height: 2rem;\r\n border-bottom: 2px solid var(--grey);\r\n box-shadow: var(--grey);\r\n margin-bottom: 1rem;\r\n padding: 5px 10px;\r\n}\r\n\r\n#new-todo input {\r\n font-size: 1.5rem;\r\n}\r\n\r\n.remove {\r\n height: 3rem;\r\n width: 100%;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n background-color: var(--grey);\r\n font-size: 1.22rem;\r\n color: grey;\r\n border: none;\r\n padding: 1rem;\r\n border-bottom-left-radius: 0.5rem;\r\n border-bottom-right-radius: 0.5rem;\r\n margin-top: 1rem;\r\n}\r\n\r\n.todo-list {\r\n display: flex;\r\n align-items: center;\r\n gap: 6px;\r\n height: 2rem;\r\n border-bottom: 2px solid var(--grey);\r\n box-shadow: var(--grey);\r\n margin-bottom: 1rem;\r\n}\r\n\r\n.edit {\r\n background-color: black;\r\n border-radius: 4px;\r\n padding: 4px;\r\n font-size: 1rem;\r\n color: #fff;\r\n border: none;\r\n cursor: pointer;\r\n margin-left: 2rem;\r\n margin-right: 2rem;\r\n}\r\n\r\n.delete {\r\n background-color: rgb(219, 29, 29);\r\n border-radius: 4px;\r\n padding: 3px;\r\n font-size: 1rem;\r\n color: #fff;\r\n border: none;\r\n cursor: pointer;\r\n}\r\n"],"sourceRoot":""}]);
26 | // Exports
27 | /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
28 |
29 |
30 | /***/ }),
31 |
32 | /***/ "./node_modules/css-loader/dist/runtime/api.js":
33 | /*!*****************************************************!*\
34 | !*** ./node_modules/css-loader/dist/runtime/api.js ***!
35 | \*****************************************************/
36 | /***/ ((module) => {
37 |
38 |
39 |
40 | /*
41 | MIT License http://www.opensource.org/licenses/mit-license.php
42 | Author Tobias Koppers @sokra
43 | */
44 | module.exports = function (cssWithMappingToString) {
45 | var list = [];
46 |
47 | // return the list of modules as css string
48 | list.toString = function toString() {
49 | return this.map(function (item) {
50 | var content = "";
51 | var needLayer = typeof item[5] !== "undefined";
52 | if (item[4]) {
53 | content += "@supports (".concat(item[4], ") {");
54 | }
55 | if (item[2]) {
56 | content += "@media ".concat(item[2], " {");
57 | }
58 | if (needLayer) {
59 | content += "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {");
60 | }
61 | content += cssWithMappingToString(item);
62 | if (needLayer) {
63 | content += "}";
64 | }
65 | if (item[2]) {
66 | content += "}";
67 | }
68 | if (item[4]) {
69 | content += "}";
70 | }
71 | return content;
72 | }).join("");
73 | };
74 |
75 | // import a list of modules into the list
76 | list.i = function i(modules, media, dedupe, supports, layer) {
77 | if (typeof modules === "string") {
78 | modules = [[null, modules, undefined]];
79 | }
80 | var alreadyImportedModules = {};
81 | if (dedupe) {
82 | for (var k = 0; k < this.length; k++) {
83 | var id = this[k][0];
84 | if (id != null) {
85 | alreadyImportedModules[id] = true;
86 | }
87 | }
88 | }
89 | for (var _k = 0; _k < modules.length; _k++) {
90 | var item = [].concat(modules[_k]);
91 | if (dedupe && alreadyImportedModules[item[0]]) {
92 | continue;
93 | }
94 | if (typeof layer !== "undefined") {
95 | if (typeof item[5] === "undefined") {
96 | item[5] = layer;
97 | } else {
98 | item[1] = "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {").concat(item[1], "}");
99 | item[5] = layer;
100 | }
101 | }
102 | if (media) {
103 | if (!item[2]) {
104 | item[2] = media;
105 | } else {
106 | item[1] = "@media ".concat(item[2], " {").concat(item[1], "}");
107 | item[2] = media;
108 | }
109 | }
110 | if (supports) {
111 | if (!item[4]) {
112 | item[4] = "".concat(supports);
113 | } else {
114 | item[1] = "@supports (".concat(item[4], ") {").concat(item[1], "}");
115 | item[4] = supports;
116 | }
117 | }
118 | list.push(item);
119 | }
120 | };
121 | return list;
122 | };
123 |
124 | /***/ }),
125 |
126 | /***/ "./node_modules/css-loader/dist/runtime/sourceMaps.js":
127 | /*!************************************************************!*\
128 | !*** ./node_modules/css-loader/dist/runtime/sourceMaps.js ***!
129 | \************************************************************/
130 | /***/ ((module) => {
131 |
132 |
133 |
134 | module.exports = function (item) {
135 | var content = item[1];
136 | var cssMapping = item[3];
137 | if (!cssMapping) {
138 | return content;
139 | }
140 | if (typeof btoa === "function") {
141 | var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));
142 | var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64);
143 | var sourceMapping = "/*# ".concat(data, " */");
144 | return [content].concat([sourceMapping]).join("\n");
145 | }
146 | return [content].join("\n");
147 | };
148 |
149 | /***/ }),
150 |
151 | /***/ "./src/style.css":
152 | /*!***********************!*\
153 | !*** ./src/style.css ***!
154 | \***********************/
155 | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
156 |
157 | __webpack_require__.r(__webpack_exports__);
158 | /* harmony export */ __webpack_require__.d(__webpack_exports__, {
159 | /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
160 | /* harmony export */ });
161 | /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
162 | /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
163 | /* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/styleDomAPI.js */ "./node_modules/style-loader/dist/runtime/styleDomAPI.js");
164 | /* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);
165 | /* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/insertBySelector.js */ "./node_modules/style-loader/dist/runtime/insertBySelector.js");
166 | /* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);
167 | /* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js");
168 | /* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);
169 | /* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/insertStyleElement.js */ "./node_modules/style-loader/dist/runtime/insertStyleElement.js");
170 | /* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);
171 | /* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/styleTagTransform.js */ "./node_modules/style-loader/dist/runtime/styleTagTransform.js");
172 | /* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);
173 | /* harmony import */ var _node_modules_css_loader_dist_cjs_js_style_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../node_modules/css-loader/dist/cjs.js!./style.css */ "./node_modules/css-loader/dist/cjs.js!./src/style.css");
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 | var options = {};
186 |
187 | options.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());
188 | options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
189 |
190 | options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
191 |
192 | options.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
193 | options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());
194 |
195 | var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_style_css__WEBPACK_IMPORTED_MODULE_6__["default"], options);
196 |
197 |
198 |
199 |
200 | /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_style_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_style_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_style_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);
201 |
202 |
203 | /***/ }),
204 |
205 | /***/ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js":
206 | /*!****************************************************************************!*\
207 | !*** ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js ***!
208 | \****************************************************************************/
209 | /***/ ((module) => {
210 |
211 |
212 |
213 | var stylesInDOM = [];
214 |
215 | function getIndexByIdentifier(identifier) {
216 | var result = -1;
217 |
218 | for (var i = 0; i < stylesInDOM.length; i++) {
219 | if (stylesInDOM[i].identifier === identifier) {
220 | result = i;
221 | break;
222 | }
223 | }
224 |
225 | return result;
226 | }
227 |
228 | function modulesToDom(list, options) {
229 | var idCountMap = {};
230 | var identifiers = [];
231 |
232 | for (var i = 0; i < list.length; i++) {
233 | var item = list[i];
234 | var id = options.base ? item[0] + options.base : item[0];
235 | var count = idCountMap[id] || 0;
236 | var identifier = "".concat(id, " ").concat(count);
237 | idCountMap[id] = count + 1;
238 | var indexByIdentifier = getIndexByIdentifier(identifier);
239 | var obj = {
240 | css: item[1],
241 | media: item[2],
242 | sourceMap: item[3],
243 | supports: item[4],
244 | layer: item[5]
245 | };
246 |
247 | if (indexByIdentifier !== -1) {
248 | stylesInDOM[indexByIdentifier].references++;
249 | stylesInDOM[indexByIdentifier].updater(obj);
250 | } else {
251 | var updater = addElementStyle(obj, options);
252 | options.byIndex = i;
253 | stylesInDOM.splice(i, 0, {
254 | identifier: identifier,
255 | updater: updater,
256 | references: 1
257 | });
258 | }
259 |
260 | identifiers.push(identifier);
261 | }
262 |
263 | return identifiers;
264 | }
265 |
266 | function addElementStyle(obj, options) {
267 | var api = options.domAPI(options);
268 | api.update(obj);
269 |
270 | var updater = function updater(newObj) {
271 | if (newObj) {
272 | if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {
273 | return;
274 | }
275 |
276 | api.update(obj = newObj);
277 | } else {
278 | api.remove();
279 | }
280 | };
281 |
282 | return updater;
283 | }
284 |
285 | module.exports = function (list, options) {
286 | options = options || {};
287 | list = list || [];
288 | var lastIdentifiers = modulesToDom(list, options);
289 | return function update(newList) {
290 | newList = newList || [];
291 |
292 | for (var i = 0; i < lastIdentifiers.length; i++) {
293 | var identifier = lastIdentifiers[i];
294 | var index = getIndexByIdentifier(identifier);
295 | stylesInDOM[index].references--;
296 | }
297 |
298 | var newLastIdentifiers = modulesToDom(newList, options);
299 |
300 | for (var _i = 0; _i < lastIdentifiers.length; _i++) {
301 | var _identifier = lastIdentifiers[_i];
302 |
303 | var _index = getIndexByIdentifier(_identifier);
304 |
305 | if (stylesInDOM[_index].references === 0) {
306 | stylesInDOM[_index].updater();
307 |
308 | stylesInDOM.splice(_index, 1);
309 | }
310 | }
311 |
312 | lastIdentifiers = newLastIdentifiers;
313 | };
314 | };
315 |
316 | /***/ }),
317 |
318 | /***/ "./node_modules/style-loader/dist/runtime/insertBySelector.js":
319 | /*!********************************************************************!*\
320 | !*** ./node_modules/style-loader/dist/runtime/insertBySelector.js ***!
321 | \********************************************************************/
322 | /***/ ((module) => {
323 |
324 |
325 |
326 | var memo = {};
327 | /* istanbul ignore next */
328 |
329 | function getTarget(target) {
330 | if (typeof memo[target] === "undefined") {
331 | var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself
332 |
333 | if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
334 | try {
335 | // This will throw an exception if access to iframe is blocked
336 | // due to cross-origin restrictions
337 | styleTarget = styleTarget.contentDocument.head;
338 | } catch (e) {
339 | // istanbul ignore next
340 | styleTarget = null;
341 | }
342 | }
343 |
344 | memo[target] = styleTarget;
345 | }
346 |
347 | return memo[target];
348 | }
349 | /* istanbul ignore next */
350 |
351 |
352 | function insertBySelector(insert, style) {
353 | var target = getTarget(insert);
354 |
355 | if (!target) {
356 | throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");
357 | }
358 |
359 | target.appendChild(style);
360 | }
361 |
362 | module.exports = insertBySelector;
363 |
364 | /***/ }),
365 |
366 | /***/ "./node_modules/style-loader/dist/runtime/insertStyleElement.js":
367 | /*!**********************************************************************!*\
368 | !*** ./node_modules/style-loader/dist/runtime/insertStyleElement.js ***!
369 | \**********************************************************************/
370 | /***/ ((module) => {
371 |
372 |
373 |
374 | /* istanbul ignore next */
375 | function insertStyleElement(options) {
376 | var element = document.createElement("style");
377 | options.setAttributes(element, options.attributes);
378 | options.insert(element, options.options);
379 | return element;
380 | }
381 |
382 | module.exports = insertStyleElement;
383 |
384 | /***/ }),
385 |
386 | /***/ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js":
387 | /*!**********************************************************************************!*\
388 | !*** ./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js ***!
389 | \**********************************************************************************/
390 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
391 |
392 |
393 |
394 | /* istanbul ignore next */
395 | function setAttributesWithoutAttributes(styleElement) {
396 | var nonce = true ? __webpack_require__.nc : 0;
397 |
398 | if (nonce) {
399 | styleElement.setAttribute("nonce", nonce);
400 | }
401 | }
402 |
403 | module.exports = setAttributesWithoutAttributes;
404 |
405 | /***/ }),
406 |
407 | /***/ "./node_modules/style-loader/dist/runtime/styleDomAPI.js":
408 | /*!***************************************************************!*\
409 | !*** ./node_modules/style-loader/dist/runtime/styleDomAPI.js ***!
410 | \***************************************************************/
411 | /***/ ((module) => {
412 |
413 |
414 |
415 | /* istanbul ignore next */
416 | function apply(styleElement, options, obj) {
417 | var css = "";
418 |
419 | if (obj.supports) {
420 | css += "@supports (".concat(obj.supports, ") {");
421 | }
422 |
423 | if (obj.media) {
424 | css += "@media ".concat(obj.media, " {");
425 | }
426 |
427 | var needLayer = typeof obj.layer !== "undefined";
428 |
429 | if (needLayer) {
430 | css += "@layer".concat(obj.layer.length > 0 ? " ".concat(obj.layer) : "", " {");
431 | }
432 |
433 | css += obj.css;
434 |
435 | if (needLayer) {
436 | css += "}";
437 | }
438 |
439 | if (obj.media) {
440 | css += "}";
441 | }
442 |
443 | if (obj.supports) {
444 | css += "}";
445 | }
446 |
447 | var sourceMap = obj.sourceMap;
448 |
449 | if (sourceMap && typeof btoa !== "undefined") {
450 | css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */");
451 | } // For old IE
452 |
453 | /* istanbul ignore if */
454 |
455 |
456 | options.styleTagTransform(css, styleElement, options.options);
457 | }
458 |
459 | function removeStyleElement(styleElement) {
460 | // istanbul ignore if
461 | if (styleElement.parentNode === null) {
462 | return false;
463 | }
464 |
465 | styleElement.parentNode.removeChild(styleElement);
466 | }
467 | /* istanbul ignore next */
468 |
469 |
470 | function domAPI(options) {
471 | var styleElement = options.insertStyleElement(options);
472 | return {
473 | update: function update(obj) {
474 | apply(styleElement, options, obj);
475 | },
476 | remove: function remove() {
477 | removeStyleElement(styleElement);
478 | }
479 | };
480 | }
481 |
482 | module.exports = domAPI;
483 |
484 | /***/ }),
485 |
486 | /***/ "./node_modules/style-loader/dist/runtime/styleTagTransform.js":
487 | /*!*********************************************************************!*\
488 | !*** ./node_modules/style-loader/dist/runtime/styleTagTransform.js ***!
489 | \*********************************************************************/
490 | /***/ ((module) => {
491 |
492 |
493 |
494 | /* istanbul ignore next */
495 | function styleTagTransform(css, styleElement) {
496 | if (styleElement.styleSheet) {
497 | styleElement.styleSheet.cssText = css;
498 | } else {
499 | while (styleElement.firstChild) {
500 | styleElement.removeChild(styleElement.firstChild);
501 | }
502 |
503 | styleElement.appendChild(document.createTextNode(css));
504 | }
505 | }
506 |
507 | module.exports = styleTagTransform;
508 |
509 | /***/ })
510 |
511 | /******/ });
512 | /************************************************************************/
513 | /******/ // The module cache
514 | /******/ var __webpack_module_cache__ = {};
515 | /******/
516 | /******/ // The require function
517 | /******/ function __webpack_require__(moduleId) {
518 | /******/ // Check if module is in cache
519 | /******/ var cachedModule = __webpack_module_cache__[moduleId];
520 | /******/ if (cachedModule !== undefined) {
521 | /******/ return cachedModule.exports;
522 | /******/ }
523 | /******/ // Create a new module (and put it into the cache)
524 | /******/ var module = __webpack_module_cache__[moduleId] = {
525 | /******/ id: moduleId,
526 | /******/ // no module.loaded needed
527 | /******/ exports: {}
528 | /******/ };
529 | /******/
530 | /******/ // Execute the module function
531 | /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
532 | /******/
533 | /******/ // Return the exports of the module
534 | /******/ return module.exports;
535 | /******/ }
536 | /******/
537 | /************************************************************************/
538 | /******/ /* webpack/runtime/compat get default export */
539 | /******/ (() => {
540 | /******/ // getDefaultExport function for compatibility with non-harmony modules
541 | /******/ __webpack_require__.n = (module) => {
542 | /******/ var getter = module && module.__esModule ?
543 | /******/ () => (module['default']) :
544 | /******/ () => (module);
545 | /******/ __webpack_require__.d(getter, { a: getter });
546 | /******/ return getter;
547 | /******/ };
548 | /******/ })();
549 | /******/
550 | /******/ /* webpack/runtime/define property getters */
551 | /******/ (() => {
552 | /******/ // define getter functions for harmony exports
553 | /******/ __webpack_require__.d = (exports, definition) => {
554 | /******/ for(var key in definition) {
555 | /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
556 | /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
557 | /******/ }
558 | /******/ }
559 | /******/ };
560 | /******/ })();
561 | /******/
562 | /******/ /* webpack/runtime/hasOwnProperty shorthand */
563 | /******/ (() => {
564 | /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
565 | /******/ })();
566 | /******/
567 | /******/ /* webpack/runtime/make namespace object */
568 | /******/ (() => {
569 | /******/ // define __esModule on exports
570 | /******/ __webpack_require__.r = (exports) => {
571 | /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
572 | /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
573 | /******/ }
574 | /******/ Object.defineProperty(exports, '__esModule', { value: true });
575 | /******/ };
576 | /******/ })();
577 | /******/
578 | /******/ /* webpack/runtime/nonce */
579 | /******/ (() => {
580 | /******/ __webpack_require__.nc = undefined;
581 | /******/ })();
582 | /******/
583 | /************************************************************************/
584 | var __webpack_exports__ = {};
585 | // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
586 | (() => {
587 | /*!**********************!*\
588 | !*** ./src/index.js ***!
589 | \**********************/
590 | __webpack_require__.r(__webpack_exports__);
591 | /* harmony import */ var _style_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style.css */ "./src/style.css");
592 |
593 | // SELECT REQUIRED ELEMENTS
594 | var todoInput = document.querySelector('#addlist');
595 | var todoForm = document.querySelector('.todo-form');
596 | var todoWrapper = document.querySelector('.wrapper');
597 | var deleteCompleted = document.querySelector('.remove');
598 | var addLocalStorage = function addLocalStorage(todo) {
599 | var todos = JSON.parse(localStorage.getItem('todos')) || [];
600 | todos.push(todo);
601 | localStorage.setItem('todos', JSON.stringify(todos));
602 | };
603 |
604 | // ADD TODO
605 | var addTodo = function addTodo(e) {
606 | e.preventDefault();
607 | var todo = todoInput.value;
608 | if (todo) {
609 | var todos = JSON.parse(localStorage.getItem('todos')) || [];
610 | var id = todos.length + 1;
611 | var completed = false;
612 | addLocalStorage(id, todo, completed);
613 | var todoItem = document.createElement('div');
614 | todoItem.className = "todo-item".concat(id);
615 | todoItem.setAttribute('id', 'new-todo');
616 | todoItem.innerHTML = " \n \n Edit \n Delete ");
617 | todoWrapper.appendChild(todoItem);
618 | todoInput.value = '';
619 | }
620 | };
621 | // REMOVE FROM LOCAL STORAGE
622 | var removeLocalStorage = function removeLocalStorage(id) {
623 | var todos = JSON.parse(localStorage.getItem('todos')) || [];
624 | todos = todos.filter(function (todo) {
625 | return todo.id !== id;
626 | });
627 | localStorage.setItem('todos', JSON.stringify(todos));
628 | };
629 | // DELETE TODO
630 | var deleteTodo = function deleteTodo(e) {
631 | if (e.target.classList.contains('delete')) {
632 | removeLocalStorage(e.target.parentElement.classList[1]);
633 | e.target.parentElement.remove();
634 | }
635 | };
636 |
637 | // CHECK TODO
638 | var checkTodo = function checkTodo(e) {
639 | if (e.target.className === 'todo-check') {
640 | var id = e.target.parentElement.classList[1];
641 | var isChecked = e.target.checked;
642 | if (isChecked) {
643 | e.target.nextElementSibling.style.textDecoration = 'line-through';
644 | } else {
645 | e.target.nextElementSibling.style.textDecoration = 'none';
646 | }
647 | var todos = JSON.parse(localStorage.getItem('todos')) || [];
648 | todos = todos.map(function (todo) {
649 | if (todo.id === id) {
650 | todo.completed = isChecked;
651 | }
652 | return todo;
653 | });
654 | localStorage.setItem('todos', JSON.stringify(todos));
655 | }
656 | };
657 |
658 | // GET TODO
659 | var getTodo = function getTodo() {
660 | var todos = JSON.parse(localStorage.getItem('todos')) || [];
661 | todos.forEach(function (todo) {
662 | var todoItem = document.createElement('div');
663 | todoItem.className = "todo-item".concat(todo.id);
664 | todoItem.innerHTML = " \n \n Edit \n Delete ");
665 | todoWrapper.appendChild(todoItem);
666 | todoInput.value = '';
667 | });
668 | };
669 | // REMOVE DONE TODOS
670 | var removeDone = function removeDone(e) {
671 | if (e.target.classList.contains('remove')) {
672 | var todos = JSON.parse(localStorage.getItem('todos')) || [];
673 | todos = todos.filter(function (todo) {
674 | return todo.checked === true;
675 | });
676 | localStorage.setItem('todos', JSON.stringify(todos));
677 | todoWrapper.innerHTML = '';
678 | getTodo();
679 | }
680 | };
681 |
682 | // EDIT LOCAL STORAGE
683 | var editLocalStorage = function editLocalStorage(id) {
684 | var todos = JSON.parse(localStorage.getItem('todos')) || [];
685 | todos = todos.map(function (todo) {
686 | if (todo.id === id) {
687 | todo.text = todo;
688 | }
689 | return todo;
690 | });
691 | localStorage.setItem('todos', JSON.stringify(todos));
692 | };
693 |
694 | // EDIT TODO
695 | var editTodo = function editTodo(e) {
696 | if (e.target.className === 'edit') {
697 | var todoText = e.target.parentElement.querySelector('.todo-text');
698 | var id = e.target.parentElement.classList[1];
699 | if (todoText.disabled) {
700 | todoText.disabled = false;
701 | e.target.textContent = 'Save';
702 | } else {
703 | todoText.disabled = true;
704 | e.target.textContent = 'Edit';
705 | editLocalStorage(id, todoText.value);
706 | }
707 | }
708 | };
709 |
710 | // EVENT LISTENER FOR TODO
711 | todoForm.addEventListener('submit', addTodo);
712 | todoWrapper.addEventListener('click', deleteTodo);
713 | todoWrapper.addEventListener('click', checkTodo);
714 | todoWrapper.addEventListener('click', editTodo);
715 | window.addEventListener('DOMContentloaded', getTodo);
716 | deleteCompleted.addEventListener('click', removeDone);
717 | })();
718 |
719 | /******/ })()
720 | ;
721 | //# sourceMappingURL=bundlef680703b453e2db9fd1c.js.map
--------------------------------------------------------------------------------