-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
40 lines (40 loc) · 1.7 KB
/
index.html
File metadata and controls
40 lines (40 loc) · 1.7 KB
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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Tandem Command</title>
<link rel="stylesheet" type="text/css" href="tandem.css">
</head>
<body>
<div class="tandem" data-bind="foreach: spots">
<div class="spot">
<!-- ko foreach: requests -->
<div class="car" data-bind="text: driver, style: { height: $parent.carHeight() }"></div>
<!-- /ko -->
<!-- ko with: parked -->
<div class="car parked" data-bind="text: driver, style: { height: $parent.carHeight() }"></div>
<!-- /ko -->
</div>
</div>
<div class="garage" data-bind="foreach: cars">
<div class="garage-spot">
<div class="car" data-bind="click: function() { $parent.selectCar($data) }, css: { requested: $parent.car() === $data, parked: parked() == 'street' }">
<span data-bind="text: driver"></span>
<span data-bind="text: time"></span>
<span data-bind="text: suggestion"></span>
</div>
</div>
</div>
<button data-bind="click: function() { park() }">park in</button>
<button data-bind="click: function() { park(true) }">streetpark</button>
<button data-bind="click: function() { unpark() }">unpark</button>
<button data-bind="click: function() { save() }">save</button>
<form class="schedule" data-bind="submit: schedule">
<input type="text" data-bind="value: time" placeholder="time (2400)">
<button type="submit">Schedule</button>
</form>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/knockout/3.1.0/knockout-min.js"></script>
<script src="tandem.js"></script>
</body>
</html>