-
Notifications
You must be signed in to change notification settings - Fork 131
/
todos.html
93 lines (91 loc) · 1.82 KB
/
todos.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
<!DOCTYPE html>
<html>
<style>
* {
box-sizing: border-box;
font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
font-weight: 100;
letter-spacing: 1px;
}
body {
background-color: #f3f3f3;
padding: 25px;
text-align: center;
}
form {
background: #797979;
margin: 0 auto 50px;
padding: 25px;
width: 500px;
}
input {
border: none;
display: block;
font-size: 16px;
margin: 25px auto;
outline: none;
padding: 10px;
width: 100%;
}
input[type="submit"] {
background: #eaeaea;
}
input[type="submit"]:hover {
background: white;
cursor: pointer;
}
textarea {
border: none;
display: block;
font-size: 16px;
margin: 0 auto 25px;
outline: none;
padding: 10px;
width: 100%;
}
.list {
border-top: 1px solid #797979;
padding: 10px;
}
.list div {
background: #fff;
display: inline-block;
height: 200px;
margin: 10px;
overflow-y: scroll;
padding: 10px 25px;
width: 400px;
}
.list div p:first-child {
font-weight: 300;
letter-spacing: 2px;
text-transform: uppercase;
}
</style>
<head>
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js'></script>
<title>{{.PageTitle}}</title>
</head>
<script type='text/javascript'>
</script>
<body>
<h1>All Todos</h1>
<form action="/add-todo/" method="post">
<input type="text" placeholder="Title" name="title">
<textarea placeholder="Details..." name="content"></textarea>
<input type="submit">
</form>
<div class="list">
{{if not .PageTodos }}
<h2>No Todos</h2>
{{else}}
{{range .PageTodos}}
<div>
<p>{{.Title}}</p>
<p>{{.Content}}</p>
</div>
{{end}}
{{end}}
</div>
</body>
</html>