-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.html
63 lines (63 loc) · 2.29 KB
/
index.html
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
<!doctype html>
<html lang="en" data-framework="gopherjs">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>GopherJS • TodoMVC</title>
<link rel="stylesheet" href="node_modules/todomvc-app-css/index.css">
<link rel="stylesheet" href="css/app.css">
</head>
<body>
<section id="todoapp">
<header id="header">
<h1>todos</h1>
<input id="new-todo" placeholder="What needs to be done?" autofocus>
</header>
<section id="main">
<input id="toggle-all" type="checkbox">
<label for="toggle-all">Mark all as complete</label>
<ul id="todo-list"></ul>
</section>
<footer id="footer">
<span id="todo-count"><strong>0</strong> item left</span>
<button id="clear-completed">Clear completed</button>
</footer>
</section>
<footer id="info">
<p>Double-click to edit a todo</p>
<p>Created by <a href="http://github.com/sindresorhus">Sindre Sorhus</a></p>
<p>Go port of <a href="http://todomvc.com/examples/jquery/">jQuery TodoMVC</a></p>
<p>Made with <a href="https://github.com/gopherjs/gopherjs">GopherJS</a></p>
</footer>
<script id="todo-template" type="text/x-golang-template">
{{range $k, $v := .}}
<li {{if $v.Completed}}class="completed"{{end}} data-id="{{$v.Id}}">
<div class="view">
<input class="toggle" type="checkbox" {{if $v.Completed}}checked{{end}}>
<label>{{$v.Text}}</label>
<button class="destroy"></button>
</div>
<input class="edit" value="{{$v.Text}}">
</li>
{{end}}
</script>
<script id="footer-template" type="text/x-golang-template">
<span id="todo-count"><strong>{{.ActiveTodoCount}}</strong> {{.ActiveTodoWord}} left</span>
<ul id="filters">
<li>
<a {{if eq .Filter "all"}}class="selected"{{end}} href="#/all">All</a>
</li>
<li>
<a {{if eq .Filter "active"}}class="selected"{{end}}href="#/active">Active</a>
</li>
<li>
<a {{if eq .Filter "completed"}}class="selected"{{end}}href="#/completed">Completed</a>
</li>
</ul>
{{if gt .CompletedTodos 0}}<button id="clear-completed">Clear completed ({{.CompletedTodos}})</button>{{end}}
</script>
<script src="node_modules/jquery/dist/jquery.js"></script>
<script src="node_modules/director/build/director.js"></script>
<script src="app.js"></script>
</body>
</html>