repos.tmpl 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. {{template "base/head" .}}
  2. <div class="explore repositories">
  3. <div class="ui container">
  4. <div class="ui grid">
  5. {{template "explore/navbar" .}}
  6. <div class="twelve wide column content">
  7. {{template "explore/repo_list" .}}
  8. {{with .Page}}
  9. {{if gt .TotalPages 1}}
  10. <div class="center page buttons">
  11. <div class="ui borderless pagination menu">
  12. <a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?page={{.Previous}}"{{end}}>
  13. <i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
  14. </a>
  15. {{range .Pages}}
  16. {{if eq .Num -1}}
  17. <a class="disabled item">...</a>
  18. {{else}}
  19. <a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?page={{.Num}}"{{end}}>{{.Num}}</a>
  20. {{end}}
  21. {{end}}
  22. <a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?page={{.Next}}"{{end}}>
  23. {{$.i18n.Tr "repo.issues.next"}} <i class="icon right arrow"></i>
  24. </a>
  25. </div>
  26. </div>
  27. {{end}}
  28. {{end}}
  29. </div>
  30. </div>
  31. </div>
  32. </div>
  33. {{template "base/footer" .}}