/
index.html
117 lines (115 loc) · 2.61 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
106
107
108
109
110
111
112
113
114
115
116
117
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Todo List</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script type="text/javascript"
src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="script/underscore.js"></script>
<script src="script/backbone.js"></script>
<script src="script/backbone-storage.js"></script>
<script src="script/jquery-ui.js"></script>
<script src="script/todolist.js"></script>
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<style type="text/css">
body {
background: #dfdfdf no-repeat 20px 100px;
font-family: Helvetica,Arial,sans-serif;
}
#container {
background: #fff;
border-radius: 4px;
position: relative;
left: 50%;
box-shadow: 0 3px 6px rgba(0,0,0,.4), 0 -1px 2px rgba(0,0,0,.2);
width:400px;
margin-left:-200px;
padding-bottom: 10px;
}
#container h1 {
background: -webkit-gradient(linear, 0 0, 0 100%, from(#3161A8), to(#214170));
border-radius: 4px 4px 0 0;
color: #FFF;
margin: 0;
padding: 10px;
text-shadow: 1px 1px 1px rgba(0,0,0,1);
text-align: center;
}
#new-todo{
width:100%;
height: 50px;
position:relative;
margin:0 auto;
text-align: center;
}
#plus{
position: absolute;
left: 0px;
}
#todo-list{
list-style-type: none;
margin: 10px;
}
#todo-input{
margin-top: 10px;
width: 80%;
height: 30px;
font-size: 30px;
text-align: center;
margin-left: 40px;
}
#done {
width: 100%;
padding: 10px;
display: none;
}
.display{
font-size: 25px;
}
@media only screen and (max-width : 320px) {
#list{
left:10px;
margin-left:0px;
width:300px;}
#todo-input{
font-size: 15px;
}
#plus{
top:3px;
width:50px;
}
}
</style>
</head>
<body>
<div id="todo-app">
<div id="container">
<h1>Todo List</h1>
<div id="new-todo"><input id="todo-input" placeholder="insert todo" type="text"><img src="img/plus.png" id="plus" alt="add todo" /></div>
<ul id="todo-list"></ul>
<div id="done">
there are <span class="count"></span> todos done
<button type="button" class="clearBtn">clear</button>
</div>
</div>
</div>
<!-- TEMPLATES-->
<script type="text/template" id="item-template">
<div class="todo <%= done ? 'done' : '' %>">
<div class="display">
<input class="check" type="checkbox" <%=done ? 'checked="checked"' :'' %>/>
<label class="todo-content">
<%=content%>
</label>
<span class="todo-destroy"></span>
</div>
<div class="edit" style="display:none">
<input class="todo-input" type="text" value="<%= content %>" />
</div>
</div>
</script>
</body>
</html>