Skip to content

Commit f0c4552

Browse files
titled the app and added a delete completed button
1 parent d4189cd commit f0c4552

1 file changed

Lines changed: 42 additions & 31 deletions

File tree

‎Sprint-3/todo-list/index.html‎

Lines changed: 42 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,51 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
3-
<head>
4-
<meta charset="UTF-8" />
5-
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
6-
<title>ToDo List</title>
7-
<link rel="stylesheet" href="style.css" />
8-
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>ToDo List</title>
7+
<link rel="stylesheet" href="style.css" />
8+
<link
9+
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"
10+
rel="stylesheet"
11+
/>
912

10-
<script type="module" src="script.mjs"></script>
11-
</head>
12-
<body>
13-
<div class="todo-container">
14-
<h1>My ToDo List</h1>
13+
<script type="module" src="script.mjs"></script>
14+
</head>
15+
<body>
16+
<div class="todo-container">
17+
<h1>My ToDo List</h1>
1518

16-
<div class="todo-input">
17-
<input type="text" id="new-task-input" placeholder="Enter a new task..." />
18-
<button id="add-task-btn">Add</button>
19-
</div>
19+
<div class="todo-input">
20+
<input
21+
type="text"
22+
id="new-task-input"
23+
placeholder="Enter a new task..."
24+
/>
25+
<button id="add-task-btn">Add</button>
26+
<button id="delete-completed-btn">Delete completed</button>
27+
</div>
2028

21-
<ul id="todo-list" class="todo-list">
22-
</ul>
29+
<ul id="todo-list" class="todo-list"></ul>
2330

24-
<!--
31+
<!--
2532
This is a template for the To-do list item.
2633
It can simplify the creation of list item node in JS script.
2734
-->
28-
<template id="todo-item-template">
29-
<li class="todo-item"> <!-- include class "completed" if the task completed state is true -->
30-
<span class="description">Task description</span>
31-
<div class="actions">
32-
<button class="complete-btn"><span class="fa-solid fa-check" aria-hidden="true"></span></button>
33-
<button class="delete-btn"><span class="fa-solid fa-trash" aria-hidden="true"></span></button>
34-
</div>
35-
</li>
36-
</template>
37-
38-
</div>
39-
</body>
35+
<template id="todo-item-template">
36+
<li class="todo-item">
37+
<!-- include class "completed" if the task completed state is true -->
38+
<span class="description">Task description</span>
39+
<div class="actions">
40+
<button class="complete-btn">
41+
<span class="fa-solid fa-check" aria-hidden="true"></span>
42+
</button>
43+
<button class="delete-btn">
44+
<span class="fa-solid fa-trash" aria-hidden="true"></span>
45+
</button>
46+
</div>
47+
</li>
48+
</template>
49+
</div>
50+
</body>
4051
</html>

0 commit comments

Comments
 (0)