aboutsummaryrefslogtreecommitdiff
path: root/templates/search.tmpl
blob: de80facb6918b66f8c49fdb413f38733bea0ef37 (plain)
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
{{template "header.tmpl" .HeaderData}}
{{template "navigation.tmpl" .NavbarData}}
<div class="page-title"> Search </div>

<div>
	<form action="/search" method="GET">
		<span class="post-form-field>
			<label for="query"> Query </label>
			<input id="query" name="q" value="{{.Q}}">
		</span>
		<span class="post-form-field>
			<label for="type"> Type </label>
			<select id="type" name="type">
				<option value="statuses" {{if eq .Type "statuses"}}selected{{end}}>Statuses</option>
				<option value="accounts" {{if eq .Type "accounts"}}selected{{end}}>Accounts</option>
			</select>
		</span>
		<button type="submit"> Search </button>
	</form>
</div>

{{if eq .Type "statuses"}}
{{range .Statuses}}
{{template "status.tmpl" .}}
{{end}}

{{end}}
{{if eq .Type "accounts"}}
{{template "userlist.tmpl" .Users}}
{{end}}

<div class="pagination">
	{{if .HasNext}}
		<a href="{{.NextLink}}">next</a>
	{{end}}
</div>
{{template "footer.tmpl"}}