Skip to content
Snippets Groups Projects
search.html 748 B
Newer Older
  • Learn to ignore specific revisions
  • ale's avatar
    ale committed
    {{template "_head.html" .}}
    
    {{if .Query}}
    
    <h1>
      Search results for "{{.Query}}"
    </h1>
    
    {{if .Results}}
    
    <p>
      Showing results 
      <b>{{.Pagination.Start}}</b>-<b>{{.Pagination.End}}</b>
      of <b>{{.Pagination.Total}}</b>.
    </p>
    
    <ul class="book-group">
      {{range .Results}}
      {{template "_book.html" .}}
      {{end}}
    </ul>
    
    <p style="text-align:center">
      {{if not .Pagination.IsFirstPage}}
      <a href="?q={{.Query}}&p={{.Pagination.Prev}}">Previous</a>
      {{end}}
      {{if not .Pagination.IsLastPage}}
      <a href="?q={{.Query}}&p={{.Pagination.Next}}">Next</a>
      {{end}}
    </p>
    
    {{else}}
    <p>
      No results found.
    </p>
    {{end}}
    
    
    {{else}}
    <h1>Search</h1>
    <p>Search for something using the box at the top of the page.</p>
    {{end}}
    
    {{template "_footer.html" .}}