Skip to content

Instantly share code, notes, and snippets.

@jpetto
Last active August 29, 2015 13:58
Show Gist options
  • Save jpetto/9945218 to your computer and use it in GitHub Desktop.
Save jpetto/9945218 to your computer and use it in GitHub Desktop.
ASWM CW: Underscore templates walkthrough
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Underscore Template Demo</title>
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/pure/0.4.2/pure-min.css">
<style type="text/css">
#todo-list {
margin-right: 40px;
}
#todo-list li {
padding: 10px;
}
.important {
background: #E8E890;
}
</style>
</head>
<body>
<h1>Todos</h1>
<div class="pure-g">
<div class="pure-u-1-2">
<form action="" id="todo-form" class="pure-form pure-form-aligned">
<div class="pure-control-group">
<label for="title">Title</label>
<input type="text" id="title" name="title">
</div>
<div class="pure-control-group">
<label for="due">Due</label>
<input type="date" id="due" name="due">
</div>
<div class="pure-control-group">
<label for="notes">Notes</label>
<textarea name="notes" id="notes" cols="30" rows="10"></textarea>
</div>
<div class="pure-control-group">
<label for="important">Important?</label>
<input type="checkbox" id="important">
</div>
<div class="pure-controls">
<button type="submit" id="create-todo" class="pure-button pure-button-primary">Add Task</button>
</div>
</form>
</div>
<div class="pure-u-1-2">
<ol id="todo-list"></ol>
</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment