navid/veinsforge / f19b5da8080ed8686dfea72c79bec23d4628b62386bdf7c391249f8a5ff2e44a / 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}}