navid/veinsforge / 63285f2f5d2a393973991e37c053cc38309039a403f8ab54ee76b01499670c0e / internal/web/templates/explore.html
explore.html
← internal/web/templates · 783 bytes · raw · download
{{define "content"}}
<h1>Repositories</h1>
<form class="search-line" action="/explore" method="get">
<input type="search" name="q" value="{{.Data.Query}}" placeholder="name, owner or description" maxlength="100">
<button class="btn" type="submit">Search</button>
{{if .Data.Query}}<a href="/explore">Clear</a>{{end}}
</form>
<p class="muted">{{.Data.Count}} results</p>
{{template "repo-list" .Data.Repos}}
{{if or (gt .Data.Page 1) .Data.HasNext}}
<p class="pager">
{{if gt .Data.Page 1}}<a href="/explore?q={{.Data.Query | urlquery}}&page={{sub .Data.Page 1}}">← previous</a>{{end}}
<span class="muted">page {{.Data.Page}}</span>
{{if .Data.HasNext}}<a href="/explore?q={{.Data.Query | urlquery}}&page={{add .Data.Page 1}}">next →</a>{{end}}
</p>
{{end}}
{{end}}