mirror of
https://git.freesoftwareextremist.com/bloat
synced 2024-11-14 02:04:11 +00:00
41 lines
981 B
Cheetah
41 lines
981 B
Cheetah
{{with .Data}}
|
|
{{template "header.tmpl" (WithContext .CommonData $.Ctx)}}
|
|
<h1>Search</h1>
|
|
|
|
<form action="/search" method="GET">
|
|
<p>
|
|
<label>
|
|
Query <input type="text" name="q" value="{{.Q}}">
|
|
</label>
|
|
<label>
|
|
Type
|
|
<select name="type">
|
|
<option value="statuses" {{if eq .Type "statuses"}}selected{{end}}>Statuses</option>
|
|
<option value="accounts" {{if eq .Type "accounts"}}selected{{end}}>Accounts</option>
|
|
<option value="hashtags" {{if eq .Type "hashtags"}}selected{{end}}>Hashtags</option>
|
|
</select>
|
|
</label>
|
|
<button type="submit"> Search </button>
|
|
</p>
|
|
</form>
|
|
|
|
{{if eq .Type "statuses"}}
|
|
{{range .Statuses}}
|
|
{{template "status.tmpl" (WithContext . $.Ctx)}}
|
|
{{else}}
|
|
{{if .Q}}<p>No data found</p>{{end}}
|
|
{{end}}
|
|
{{end}}
|
|
|
|
{{if eq .Type "accounts"}}
|
|
{{template "userlist.tmpl" (WithContext .Users $.Ctx)}}
|
|
{{end}}
|
|
|
|
<nav class="pagination">
|
|
{{if .NextLink}}
|
|
<a href="{{.NextLink}}">[next]</a>
|
|
{{end}}
|
|
</nav>
|
|
|
|
{{template "footer.tmpl"}}
|
|
{{end}}
|