Last active
August 8, 2019 13:47
-
-
Save LeoSaucedo/de8b57872be6ad0f6107257dc9f38284 to your computer and use it in GitHub Desktop.
todo-mini initial EJS.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>ToDo App</title> | |
<link | |
href="https://fonts.googleapis.com/css?family=Lato:100" | |
rel="stylesheet" | |
/> | |
<link href="/styles.css" rel="stylesheet" /> | |
</head> | |
<body> | |
<div class="container"> | |
<h2>To-Dos</h2> | |
<form action="/addtask" method="POST"> | |
<input | |
class="textbox" | |
type="text" | |
name="newtask" | |
placeholder="add new task" | |
/> | |
<button>Add Task</button> | |
<h2>Incomplete</h2> | |
<ul> | |
<% for( var i = 0; i < task.length; i++){ %> | |
<li> | |
<input type="checkbox" name="check" value="<%= task[i].task %>" /> | |
<%= task[i].task %> | |
</li> | |
<% } %> | |
</ul> | |
<button formaction="/removetask" type="submit" id="top"> | |
Complete | |
</button> | |
<h2>Completed</h2> | |
<button formaction="/clearcomplete" type="submit" id="bottom"> | |
Clear all tasks | |
</button> | |
</form> | |
<ul> | |
<% for(var i = 0; i < complete.length; i++){ %> | |
<li> | |
<input type="checkbox" checked disabled /><%= complete[i].task %> | |
</li> | |
<% } %> | |
</ul> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment