summaryrefslogtreecommitdiff
path: root/src/templates/index.hbs
blob: aa708e13cfac680f54970636ac10457a98025818 (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
{{#> base}}
{{#*inline "main"}}
<aside>
	<a class="closeMenu" href="#hidden">
		<svg style="width: 24px; height: 24px" viewBox="0 0 24 24">
			<path fill="#ffffff"
				d="M21,15.61L19.59,17L14.58,12L19.59,7L21,8.39L17.44,12L21,15.61M3,6H16V8H3V6M3,13V11H13V13H3M3,18V16H16V18H3Z" />
		</svg>
	</a>
	{{#each makes}}
	<form action="/">
		{{#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}}
	<button disabled class="make">(No makes found)</button>
	{{/each}}
</aside>

<article>
	<a class="openMenu" href="#">
		<svg style="width: 24px; height: 24px" viewBox="0 0 24 24">
			<path fill="#195970" d="M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z" />
		</svg>
	</a>

	<section>
		<form>
			{{#if selected_make}}
			<input type="hidden" name="make" value="{{ selected_make }}" />
			{{/if}}
			{{#if selected_model}}
			<input type="hidden" name="model" value="{{ selected_model }}" />
			{{/if}}
			<input autofocus type="search" name="search" placeholder="press enter key to search" />
		</form>
	</section>

	<section>
		<table>
			<tbody>
				{{#each parts}}
				<tr>
					<td>{{ this }}</td>
				</tr>
				{{/each}}
			</tbody>
		</table>
	</section>
</article>

{{/inline}}
{{/base}}