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