forked from LondheShubham153/node-todo-cicd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
todo.ejs
111 lines (97 loc) · 2.75 KB
/
todo.ejs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<!DOCTYPE html>
<html lang="en">
<head>
<title>Todo List APP test</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
color: #333;
margin: 0;
padding: 0;
}
h1 {
background-color: #4CAF50;
color: white;
margin: 0;
padding: 20px;
text-align: center;
}
ul {
list-style: none;
padding: 0;
}
ul li {
background: #fff;
border: 1px solid #ddd;
margin-bottom: 10px;
padding: 10px;
position: relative;
}
ul li a {
color: #333;
text-decoration: none;
font-weight: bold;
}
ul li a:hover {
color: #4CAF50;
}
.delete-btn {
color: red;
position: absolute;
right: 10px;
top: 10px;
}
.edit-btn {
color: #FFC107;
position: absolute;
right: 40px;
top: 10px;
}
form {
background: #fff;
padding: 20px;
margin-top: 20px;
}
label {
display: block;
margin-bottom: 10px;
}
input[type="text"] {
width: 100%;
padding: 10px;
margin-bottom: 10px;
border: 1px solid #ddd;
}
input[type="submit"] {
background-color: #4CAF50;
color: white;
border: none;
padding: 10px 20px;
cursor: pointer;
}
input[type="submit"]:hover {
background-color: #45a049;
}
</style>
</head>
<body>
<h1>Todo List - Made using Node</h1>
<ul>
<% todolist.forEach(function(todo, index) { %>
<li>
<a href="/todo/delete/<%= index %>" class="delete-btn">✘</a>
<a href="/todo/<%= index %>" class="edit-btn">✎</a>
<%- todo %>
</li>
<% }); %>
</ul>
<form action="/todo/add/" method="post">
<p>
<label for="newtodo">What should I do?</label>
<input type="text" name="newtodo" id="newtodo" autofocus />
<input type="submit" value="Add" />
</p>
</form>
</body>
</html>