summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorsiddharth ravikumar <s@ricketyspace.net>2022-05-28 10:37:14 -0400
committersiddharth ravikumar <s@ricketyspace.net>2022-05-28 10:37:14 -0400
commite4d4d271d22b0efe8c59f4f0117e884a73fb81b3 (patch)
tree1468fae1abba8eaee4053a90eeea32f86ae07c24 /templates
parent7fdc2d19e14bc972426f11ee9ff8567efbff07de (diff)
peach: add handling for /search
Initial version.
Diffstat (limited to 'templates')
-rw-r--r--templates/search.tmpl50
1 files changed, 50 insertions, 0 deletions
diff --git a/templates/search.tmpl b/templates/search.tmpl
new file mode 100644
index 0000000..a6d7cff
--- /dev/null
+++ b/templates/search.tmpl
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="UTF-8">
+ <title>peach - {{.Title}}</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <meta name="author" content="siddharth ravikumar">
+ <link rel="preload" href="/static/peach.css" as="style" />
+ <style>@import url("/static/peach.css");</style>
+ </head>
+ <body>
+ <div class="peach">
+ <div class="root-container">
+
+ <div class="search-container">
+ <form method="post">
+ <div class="search-box">
+ <input type="text" class="location" placeholder="us city"
+ value="{{ .Location }}" name="location" required>
+ </div>
+ <div class="search-btn">
+ <input type="submit" value="search">
+ </div>
+ </form>
+ </div>
+
+ {{ if .Message }}
+ <div class="message-container">
+ <div class="message-block">
+ <p>{{ .Message }}</p>
+ </div>
+ </div>
+ {{ end }}
+
+ {{ if .MatchingCoords }}
+ <div class="search-result-container">
+ {{ range .MatchingCoords }}
+ <div class="item">
+ <div class="location-name">
+ <a href="/{{ printf "%.4f,%.4f" .Lat .Lng }}">{{ .Name }}</a>
+ </div>
+ </div>
+ {{ end }}
+ </div>
+ {{ end }}
+
+ </div> <!-- root-container end -->
+ </div> <!-- peach end -->
+ </body>
+</html>