summaryrefslogblamecommitdiff
path: root/src/templates/index.hbs
blob: e948d534784cb427a9a4137945fbd4730d996294 (plain) (tree)
1
2
3
           

                   


























                                                                                  
        
 























                                                                                                                                                  
 











                                                           

           
{{#> base}}
{{#*inline "main"}}
<aside>
	{{#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>
	<a class="closeMenu" href="#hidden">
		<svg style="width: 24px; height: 24px" viewBox="0 0 24 24">
			<path fill="#195970"
				d="M21,15.61L19.59,17L14.58,12L19.59,7L21,8.39L17.44,12L21,15.61M3,6H16V8H3V6M3,13V11H13V13H3M3,18V16H16V18H3Z" />
		</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}}