Skip to content

Commit

Permalink
Merge pull request LondheShubham153#113 from LondheShubham153/LondheS…
Browse files Browse the repository at this point in the history
…hubham153-patch-10

Update todo.ejs
  • Loading branch information
LondheShubham153 authored Nov 17, 2023
2 parents 261df48 + e476f94 commit dffff53
Showing 1 changed file with 83 additions and 9 deletions.
92 changes: 83 additions & 9 deletions views/todo.ejs
Original file line number Diff line number Diff line change
@@ -1,37 +1,111 @@
<!DOCTYPE html>

<html>

<head>
<title>Todo List APP test</title>
<style>
a {
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;
color: black;
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>Batch 5 is just Amazing, Awesome,shaandaar, majedaar and I will attend Live sessions</h1>
<h1>Todo List - Made using Node</h1>
<ul>
<% todolist.forEach(function(todo, index) { %>
<li>
<a href="/todo/delete/<%= index %>"></a>
<a href="/todo/<%= index %>"></a>
<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 shoud I do?</label>
<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>

0 comments on commit dffff53

Please sign in to comment.