summaryrefslogtreecommitdiffstats
path: root/templates/search.tmpl
blob: 28a1a57045c21d0ca671b1c13c713d2c8c68ba8a (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
39
40
41
42
43
44
45
<!DOCTYPE html>
<html lang="en">
	<head>
		{{ template "head.tmpl" . }}
	</head>
	<body>
		<div class="peach">
			<div class="root-container">

				<div class="search-container">
					<form method="post" class="search-form">
						<div class="search-box">
							<input type="text"  class="location" placeholder="us city"
								value="{{ .Location }}" name="location" required>
						</div>
						<div class="btn-block">
							<input type="submit" class="search-btn" 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>