-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
261 lines (221 loc) · 10.2 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<title>TinyPlanner · Work out when you need to start something</title>
<link rel="stylesheet" href="_assets/css/global.css">
<link rel="apple-touch-icon" href="apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="72x72" href="apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="114x114" href="apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="144x144" href="apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="76x76" href="touch-icon-ipad.png">
<link rel="apple-touch-icon" sizes="120x120" href="touch-icon-iphone-retina.png">
<link rel="apple-touch-icon" sizes="152x152" href="touch-icon-ipad-retina.png">
<link rel="apple-touch-startup-image" href="apple-touch-startup-image.png">
<link rel="icon" href="favicon.ico" type="image/vnd.microsoft.icon">
</head>
<body>
<header role="banner">
<h1>
<a href="/" role="link">TinyPlanner</a>
</h1>
</header><!-- /@banner -->
<main class="main" role="main">
<div class="tiny-planner">
</div>
</main>
<!--
Views
-->
<script type="text/template" id="template-plan-form">
<div class="plan-form onboarding">
<div class="field">
<label>I’m planning
<input type="text" name="plan-title" required placeholder="to serve dinner, world domination" x-webkit-speech>
</label>
</div>
<div class="field">
To be finished by
<div class="split">
<div class="split-major">
<div class="split">
<div class="split-even">
<input type="number" name="plan-hour" min="1" max="12" pattern="[0-9]" placeholder="hour">
</div>
<div class="split-even">
<input type="number" name="plan-minute" min="0" max="59" pattern="[0-9]" step="15" placeholder="minute">
</div>
</div>
</div>
<div class="split-minor">
<div class="toggle split">
<label class="split-even">
<input type="radio" name="meridian" value="am">
<span class="toggle-label">am</span>
</label>
<label class="split-even">
<input type="radio" name="meridian" value="pm" checked>
<span class="toggle-label">pm</span>
</label>
</div>
</div>
</div>
</div>
<button class="field">Create</button>
</div>
</script>
<script type="text/template" id="template-home-plans">
<section>
<h3 class="prose">My plans</h3>
<div class="plans">
{{ plans }}
</div>
</section>
</script>
<script type="text/template" id="template-footer">
<footer class="page-footer">
<p class="small"><a href="/about.html"rel="help">About TinyPlanner</a></p>
</footer>
</script>
<script type="text/view" id="template-plan">
<div class="plan">
<a href="#plan/edit/{{ id }}">{{ title }} <span class="delete">x</span></a>
</div>
</script>
<script type="text/html" id="template-plans-edit">
<div class="onboarding">
<h2>{{ title }}</h2>
<div class="timing">
<div class="split">
<div class="split-even starttime">
Start at <span class="timing-value">{{ starttime }}</span>
</div>
<div class="split-even endtime">
Finish by <span class="timing-value">{{ endtime }}</span>
</div>
</div>
<p>You need {{ totalduration }}</p>
</div>
</div>
<div class="new-step-form"></div>
</script>
<script type="text/template" id="template-plan-steps">
<section>
<ol class="plan-steps">
{{ steps }}
</ol>
</section>
</script>
<script type="text/html" id="template-add-first-step">
<div class="step add-step">
<div class="split field">
<span>First</span>
</div>
<textarea class="field" name="step-title" placeholder="bring to the boil, go to the station" required></textarea>
<div class="split field">
<div class="split-even">
<input type="number" pattern="[0-9]" name="step-duration" placeholder="e.g. 15" required>
</div>
<div class="split-even split toggle">
<label class="split-even">
<input type="radio" name="step-unit" value="minutes" checked>
<span class="toggle-label">Mins</span>
</label>
<label class="split-even">
<input type="radio" name="step-unit" value="hours">
<span class="toggle-label">Hours</span>
</label>
</div>
</div>
<button class="field">Add step</button>
<div>
</script>
<script type="text/html" id="template-add-step">
<div class="step add-step">
<div class="split toggle field">
<label class="split-even">
<input type="radio" name="step-type" value="then" checked>
<span class="toggle-label">Then</span>
</label>
<label class="split-even">
<input type="radio" name="step-type" value="meanwhile">
<span class="toggle-label">And also</span>
</label>
</div>
<textarea class="field" name="step-title" placeholder="bring to the boil, go to the station" required></textarea>
<div class="split field">
<div class="split-even">
<input type="number" pattern="[0-9]" name="step-duration" placeholder="e.g. 15" required>
</div>
<div class="split-even split toggle">
<label class="split-even">
<input type="radio" name="step-unit" value="minutes" checked>
<span class="toggle-label">Mins</span>
</label>
<label class="split-even">
<input type="radio" name="step-unit" value="hours">
<span class="toggle-label">Hours</span>
</label>
</div>
</div>
<button class="field">Add step</button>
<div>
</script>
<script type="text/html" id="template-step">
<li class="step">
<div class="split">
<div class="split-minor">
<div class="step-time">
<h3 class="step-time-start">{{ starttime }}</h3>
<span class="step-time-meridian"></span>
</div>
</div>
<div class="split-major">
<div class="step-content">
<div class="step-content-meta">
<span class="meta-type">{{ type }}</span>
<span class="meta-duration">{{ duration }}</span>
</div>
<div class="step-content-text">
<p class="text-{{ type }}">{{ text }}</p>
</div>
</div>
</div>
</div>
</li>
</script>
<!--
Scripts
-->
<script>
(function() {
var routes = {
'' : 'Home',
'plan/create' : 'Plan@create',
'plan/edit' : 'Plan@edit',
'step/create' : 'Step@create',
}
TinyPlanner = {};
window.addEventListener("load", function() {
window.tinyrouter = tinyrouter(routes);
});
})();
</script>
<!-- Helpers -->
<script src="_assets/js/helpers.js"></script>
<script src="_assets/js/tinymvc.js"></script>
<!-- Models -->
<script src="_assets/js/models/Plan.js"></script>
<script src="_assets/js/models/Step.js"></script>
<!-- Controllers -->
<script src="_assets/js/controllers/HomeController.js"></script>
<script src="_assets/js/controllers/PlanController.js"></script>
<script src="_assets/js/controllers/StepController.js"></script>
<!-- Views -->
<script src="_assets/js/views/home.js"></script>
<script src="_assets/js/views/plan.js"></script>
<script src="_assets/js/views/step.js"></script>
</body>
</html>