summaryrefslogtreecommitdiffstats
path: root/templates/explore
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-09-01 07:04:35 -0400
committerUnknwon <u@gogs.io>2015-09-01 07:04:35 -0400
commit7714e792a4ff5b179c24b1db35a5d452716c47f0 (patch)
treee0b0a08395de1d7400faba2d2d303b5d333c8730 /templates/explore
parent67f07e21f55c599eb335806e054b7d40d28b4e3e (diff)
downloadgitea-7714e792a4ff5b179c24b1db35a5d452716c47f0.tar.gz
gitea-7714e792a4ff5b179c24b1db35a5d452716c47f0.zip
minor fixes on #1551
Diffstat (limited to 'templates/explore')
-rw-r--r--templates/explore/navbar.tmpl (renamed from templates/explore/nav.tmpl)0
-rw-r--r--templates/explore/repos.tmpl55
2 files changed, 35 insertions, 20 deletions
diff --git a/templates/explore/nav.tmpl b/templates/explore/navbar.tmpl
index 374376bf77..374376bf77 100644
--- a/templates/explore/nav.tmpl
+++ b/templates/explore/navbar.tmpl
diff --git a/templates/explore/repos.tmpl b/templates/explore/repos.tmpl
index 20e1b9d919..75940e1150 100644
--- a/templates/explore/repos.tmpl
+++ b/templates/explore/repos.tmpl
@@ -1,32 +1,47 @@
{{template "base/head" .}}
-<div class="explore">
+<div class="explore repositories">
<div class="ui container">
<div class="ui grid">
- {{template "explore/nav" .}}
+ {{template "explore/navbar" .}}
<div class="twelve wide column content">
- <h4 class="ui top attached header">
- {{.i18n.Tr "explore.repos"}}
- </h4>
- <div class="ui attached segment">
+ <div class="ui repository list">
{{range $i, $v := .Repos}}
- <div class="item">
- <div class="ui right">
- <span class="text grey right"><i class="octicon octicon-star"></i> {{.NumStars}}</li> </span>
- <span class="text grey right"><i class="octicon octicon-git-branch"></i> {{.NumForks}}</li></span>
+ <div class="item">
+ <div class="ui header">
+ <a href="{{AppSubUrl}}/{{.Owner.Name}}/{{.Name}}">{{.Owner.Name}} / {{.Name}}</a>
+
+ <div class="ui right metas">
+ <span class="text grey"><i class="octicon octicon-star"></i> {{.NumStars}}</span>
+ <span class="text grey"><i class="octicon octicon-git-branch"></i> {{.NumForks}}</span>
</div>
- <h2>
- <a href="{{AppSubUrl}}/{{.Owner.Name}}/{{.Name}}">{{.Owner.Name}} / {{.Name}}</a>
- </h2>
- <p class="org-repo-description">{{.Description}}</p>
- <p class="org-repo-updated">{{$.i18n.Tr "org.repo_updated"}} {{TimeSince .Updated $.i18n.Lang}}</p>
</div>
- {{if not (eq 1 (len $.Repos))}}
- {{if not $i}}
- <div class="ui divider"></div>
- {{end}}
- {{end}}
+ {{if .Description}}<p>{{.Description}}</p>{{end}}
+ <p class="time">{{$.i18n.Tr "org.repo_updated"}} {{TimeSince .Updated $.i18n.Lang}}</p>
+ </div>
{{end}}
</div>
+
+ {{with .Page}}
+ {{if gt .TotalPages 1}}
+ <div class="center page buttons">
+ <div class="ui borderless pagination menu">
+ <a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?page={{.Previous}}"{{end}}>
+ <i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
+ </a>
+ {{range .Pages}}
+ {{if eq .Num -1}}
+ <a class="disabled item">...</a>
+ {{else}}
+ <a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?page={{.Num}}"{{end}}>{{.Num}}</a>
+ {{end}}
+ {{end}}
+ <a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?page={{.Next}}"{{end}}>
+ {{$.i18n.Tr "repo.issues.next"}} <i class="icon right arrow"></i>
+ </a>
+ </div>
+ </div>
+ {{end}}
+ {{end}}
</div>
</div>
</div>