about summary refs log tree commit diff stats
path: root/frontend/templates
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/templates')
-rw-r--r--frontend/templates/index.gotmpl (renamed from frontend/templates/index.tmpl)9
1 files changed, 7 insertions, 2 deletions
diff --git a/frontend/templates/index.tmpl b/frontend/templates/index.gotmpl
index 303d030..511f663 100644
--- a/frontend/templates/index.tmpl
+++ b/frontend/templates/index.gotmpl
@@ -11,14 +11,19 @@
     <header>
       <h1>Searchix</h1>
       <p>Search Nix Packages and options from NixOS, Darwin and Home-Manager</p>
+      <nav>
+        <a href="/">Home</a>
+      </nav>
     </header>
     <main>
       <label for="query">Search </label>
-      <form>
-        <input id="query" name="query" type="search" value="" />
+      <form id="search" action="/options/results">
+        <input id="query" name="query" type="search" value="{{ .Query }}" />
         <button>Search</button>
       </form>
+      <div id="results">{{ block "results" . }}{{ end }}</div>
     </main>
+    <script src="/static/search.js" defer></script>
     {{ .LiveReload }}
   </body>
 </html>