-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
105 lines (102 loc) · 4.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
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
<!DOCTYPE html>
<html>
<head>
<title>Todo</title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="bower_components/todomvc-common/base.css">
<style> [v-cloak] { display: none; } </style>
</head>
<body>
<section id="todoapp">
<header id="header">
<h1>todos</h1>
<input
id="new-todo"
autofocus
autocomplete="off"
placeholder="What needs to be done?"
v-model="newTodo"
v-on="keyup:addTodo | key enter"
>
</header>
<section id="main" v-show="todos.length" v-cloak>
<input
id="toggle-all"
type="checkbox"
v-model="allDone"
>
<ul id="todo-list">
<li
class="todo"
v-repeat="todos | filterTodos"
v-class="
completed : completed,
editing : this == editedTodo
"
>
<div class="view">
<input
class="toggle"
type="checkbox"
v-model="completed"
>
<label v-text="title" v-on="dblclick: editTodo(this)"></label>
<button class="destroy" v-on="click: removeTodo(this)"></button>
</div>
<input
class="edit"
type="text"
v-model="title"
v-todo-focus="this == editedTodo"
v-on="
blur : doneEdit(this),
keyup : doneEdit(this) | key enter,
keyup : cancelEdit(this) | key esc
"
>
</li>
</ul>
</section>
<footer id="footer" v-show="todos.length" v-cloak>
<span id="todo-count">
<strong v-text="remaining"></strong> {{remaining | pluralize item}} left
</span>
<ul id="filters">
<li><a href="#/all" v-class="selected: activeFilter == 'all'">All</a></li>
<li><a href="#/active" v-class="selected: activeFilter == 'active'">Active</a></li>
<li><a href="#/completed" v-class="selected: activeFilter == 'completed'">Completed</a></li>
</ul>
<button id="clear-completed" v-on="click:removeCompleted" v-show="todos.length > remaining">
Clear completed ({{todos.length - remaining}})
</button>
</footer>
</section>
<footer id="info">
<p>Double-click to edit a todo</p>
<p>Powered by <a href="http://vuejs.org">Vue.js</a></p>
<p>Javascript Version Created by <a href="http://evanyou.me">Evan You</a></p>
<p>Compiled from Go to Javascript by <a href="http://gopherjs.org/">GopherJS</a></p>
<p>Golang Port by <a href="https://github.com/rusco/">Rusco</a></p>
</footer>
<!-- testing/benchmark only -->
<script>
var isPhantom = navigator.userAgent.indexOf('PhantomJS') > -1
if (isPhantom) {
localStorage.clear()
} else {
var now = window.performance && window.performance.now
? function () { return window.performance.now() }
: Date.now
var metrics = { beforeLoad: now() }
}
</script>
<!-- end testing/bench -->
<script src="js/vue.js"></script>
<script>metrics.afterLoad = now()</script>
<script src="bower_components/director/director.js"></script>
<script>metrics.beforeRender = now()</script>
<script src="js/app.js"></script>
<script>metrics.afterRender = now()</script>
<script src="js/perf.js"></script>
</body>
</html>