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

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