about summary refs log tree commit diff stats
path: root/frontend/templates/index.gotmpl
diff options
context:
space:
mode:
authorAlan Pearce2024-05-04 12:38:32 +0200
committerAlan Pearce2024-05-04 14:49:08 +0200
commitdf2a55f82d5efeed8c59c5cf3b4e7381c97959b5 (patch)
treedb5fe1e53a4317fa8d35ef9596a082ac20fe70de /frontend/templates/index.gotmpl
parent1fb64b09e2dba34784732a61cbebc119cd847803 (diff)
downloadsearchix-df2a55f82d5efeed8c59c5cf3b4e7381c97959b5.tar.lz
searchix-df2a55f82d5efeed8c59c5cf3b4e7381c97959b5.tar.zst
searchix-df2a55f82d5efeed8c59c5cf3b4e7381c97959b5.zip
chore: use prettier with plugin to format go templates
Diffstat (limited to 'frontend/templates/index.gotmpl')
-rw-r--r--frontend/templates/index.gotmpl29
1 files changed, 29 insertions, 0 deletions
diff --git a/frontend/templates/index.gotmpl b/frontend/templates/index.gotmpl
new file mode 100644
index 0000000..511f663
--- /dev/null
+++ b/frontend/templates/index.gotmpl
@@ -0,0 +1,29 @@
+<!doctype html>
+<html lang="en-GB">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1" />
+    <title>Searchix</title>
+    <link href="/static/base.css" rel="stylesheet" />
+    <link href="/static/style.css" rel="stylesheet" />
+  </head>
+  <body>
+    <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 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>