summaryrefslogtreecommitdiff
path: root/src/templates/index.html
blob: 683891c5c7fa7aaa29c5612be21d4965aaff3154 (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
<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />

    <style>
      input[type="submit"] {
        display: block;
      }
    </style>
  </head>
  <body>
    <h1>Parts Catalog</h1>
    {{#each makes}}
    <form action="/parts">
      {{#if (eq this ../selected_make)}}
      <input disabled type="submit" name="make" value="{{ this }}" />
      <input type="hidden" name="make" value="{{ ../selected_make }}" />
      {{#each ../models}}
      {{#if (eq this ../../selected_model)}}
      <input disabled type="submit" name="model" value="{{ this }}" />
      Parts for {{ this }}
      {{else}}
      <input type="submit" name="model" value="{{ this }}" />
      {{/if}}
      {{else}}
      No models found.
      {{/each}}
      {{else}}
      <input type="submit" name="make" value="{{ this }}" />
      {{/if}}
    </form>
    {{else}}
    No makes found.
    {{/each}}
  </body>
</html>