summaryrefslogtreecommitdiff
path: root/src/templates/index.hbs
diff options
context:
space:
mode:
Diffstat (limited to 'src/templates/index.hbs')
-rw-r--r--src/templates/index.hbs74
1 files changed, 74 insertions, 0 deletions
diff --git a/src/templates/index.hbs b/src/templates/index.hbs
new file mode 100644
index 0000000..6bd539b
--- /dev/null
+++ b/src/templates/index.hbs
@@ -0,0 +1,74 @@
+{{#> base}}
+{{#*inline "navItem"}}
+<li>
+ <div class="menuToggle">
+ <a class="openMenu" href="#"><span>
+ <svg style="width: 24px; height: 24px" viewBox="0 0 24 24">
+ <path fill="currentColor" d="M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z" />
+ </svg>
+ </span></a>
+ <a class="closeMenu" href="#hidden"><span>
+ <svg style="width: 24px; height: 24px" viewBox="0 0 24 24">
+ <path fill="currentColor"
+ d="M21,15.61L19.59,17L14.58,12L19.59,7L21,8.39L17.44,12L21,15.61M3,6H16V8H3V6M3,13V11H13V13H3M3,18V16H16V18H3Z" />
+ </svg>
+ </span></a>
+ </div>
+</li>
+{{/inline}}
+{{#*inline "body"}}
+<nav class="sidebar">
+ {{#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}}
+</nav>
+
+<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="hit enter to search" />
+ </form>
+</section>
+
+<section>
+ <table class="catalogTable">
+ <tbody>
+ {{#each parts}}
+ <tr>
+ <td>{{ this }}</td>
+ </tr>
+ {{/each}}
+ </tbody>
+ </table>
+</section>
+{{/inline}}
+{{/base}}