blob: 4663f5da962d006c38afe97ed8668fdeff59f2f3 (
plain) (
blame)
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
|
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<style>
.make {
display: block;
background: none;
border: 0 none;
cursor: pointer;
}
.model {
display: block;
background: none;
border: 0 none;
cursor: pointer;
margin-left: 20px;
}
.sidebar {
width: 300px;
height: 100%;
position: fixed;
z-index: 1;
}
.main {
margin-left: 300px;
height: 100%;
}
</style>
</head>
<body>
<div class="sidebar">
<h1>Parts Catalog</h1>
{{#each makes}}
<form action="/parts">
{{#if (eq this ../selected_make)}}
<button disabled class="make">
{{ this }}
</button>
<input type="hidden" name="make" value="{{ ../selected_make }}" />
{{#each ../models}}
{{#if (eq this ../../selected_model)}}
<button disabled class="model">{{ this }}</button>
{{else}}
<button class="model" name="model" value="{{ this }}">
{{ this }}
</button>
{{/if}}
{{else}}
<button disabled class="model">(No models found)</button>
{{/each}}
{{else}}
<button class="make" name="make" value="{{ this }}">{{ this }}</button>
{{/if}}
</form>
{{else}}
No makes found.
{{/each}}
</div>
<div class="main">
<form action="/parts">
<input type="hidden" name="make" value="{{ selected_make }}" />
<input type="hidden" name="model" value="{{ selected_model }}" />
<input
type="search"
name="search"
placeholder="Part #, Name, Source, etc."
/>
<button>Search</button>
</form>
<table>
{{#each parts}}
<tr>
<td>{{ this }}</td>
</tr>
{{/each}}
</table>
</div>
</body>
</html>
|