summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-11-16 23:28:46 -0500
committerUnknwon <u@gogs.io>2015-11-16 23:28:46 -0500
commit9ab96172fc41c5a10f88045d6a19e83641e3b859 (patch)
tree9bf80165cadf7d63dc942a4241740c8c0656462e /templates
parente06558e2083e6281500cc1c91ac54425b91390fe (diff)
downloadgitea-9ab96172fc41c5a10f88045d6a19e83641e3b859.tar.gz
gitea-9ab96172fc41c5a10f88045d6a19e83641e3b859.zip
new watchers, stars and forks UI
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/forks.tmpl44
-rw-r--r--templates/repo/home.tmpl2
-rw-r--r--templates/repo/stars.tmpl61
-rw-r--r--templates/repo/watchers.tmpl110
4 files changed, 74 insertions, 143 deletions
diff --git a/templates/repo/forks.tmpl b/templates/repo/forks.tmpl
index d1fd0320c0..e3fd90c671 100644
--- a/templates/repo/forks.tmpl
+++ b/templates/repo/forks.tmpl
@@ -1,27 +1,23 @@
-{{template "ng/base/head" .}}
-{{template "ng/base/header" .}}
-<div id="repo-wrapper">
- {{template "repo/header_old" .}}
- <div id="repo-content" class="clear container">
- <div id="repo-main" class="left grid-5-6">
- <div id="forks">
- <h4>
- <strong>{{.i18n.Tr "repos.forks"}}</strong>
- </h4>
-
- <ol>
- {{range .Forks}}
- <p>
- <img class="avatar-small" src="{{.Owner.AvatarLink}}">
- <a href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a>
- /
- <a href="{{AppSubUrl}}/{{.Owner.Name}}/{{.Name}}">{{.Name}}</a>
- </p>
- {{end}}
- </div>
+{{template "base/head" .}}
+<div class="repository forks">
+ {{template "repo/header" .}}
+ <div class="ui container">
+ {{template "repo/sidebar" .}}
+ <h2 class="ui dividing header">
+ {{.i18n.Tr "repo.forks"}}
+ </h2>
+ <div class="ui list">
+ {{range .Forks}}
+ <div class="item">
+ <img class="ui avatar image" src="{{.Owner.AvatarLink}}">
+ <div class="link">
+ <a href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a>
+ /
+ <a href="{{AppSubUrl}}/{{.Owner.Name}}/{{.Name}}">{{.Name}}</a>
+ </div>
</div>
-
- {{template "repo/sidebar" .}}
+ {{end}}
</div>
+ </div>
</div>
-{{template "ng/base/footer" .}}
+{{template "base/footer" .}}
diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl
index d15e7b30ef..ea0778328b 100644
--- a/templates/repo/home.tmpl
+++ b/templates/repo/home.tmpl
@@ -114,4 +114,4 @@
{{end}}
</div>
</div>
-{{template "base/footer" .}}
+{{template "base/footer" .}} \ No newline at end of file
diff --git a/templates/repo/stars.tmpl b/templates/repo/stars.tmpl
deleted file mode 100644
index af3193dcf7..0000000000
--- a/templates/repo/stars.tmpl
+++ /dev/null
@@ -1,61 +0,0 @@
-{{template "ng/base/head" .}}
-{{template "ng/base/header" .}}
-<div id="repo-wrapper">
- {{template "repo/header_old" .}}
- <div id="repo-content" class="clear container">
- <div id="repo-main" class="left grid-5-6">
- <div id="stars">
- <h4>
- <strong>{{.i18n.Tr "repos.stars"}}</strong>
- </h4>
-
- <ol>
- {{range .Stars}}
- <li>
- <a href="{{AppSubUrl}}/{{.Name}}">
- <img class="avatar" src="{{.AvatarLink}}" title="{{.Name}}"/>
-
- <h3>{{.Name}}</h3>
- </a>
-
- <p>
- {{if .Website}}
- <span class="octicon octicon-link"></span> <a href="{{.Website}}" target="_blank">{{.Website}}</a>
- {{else if .Location}}
- <span class="octicon octicon-location"></span> {{.Location}}
- {{else}}
- <span class="octicon octicon-clock"></span> {{$.i18n.Tr "user.join_on"}} {{DateFmtShort .Created}}
- {{end}}
- </p>
- </li>
- {{end}}
- </ol>
-
- {{with .Page}}
- {{if gt .TotalPages 1}}
- <div class="pagination">
- {{if .HasPrevious}}
- <a href="{{$.RepoLink}}/stars?page={{.Previous}}">{{$.i18n.Tr "issues.previous"}}</a>
- {{end}}
-
- {{range .Pages}}
- {{if eq .Num -1}}
- <a class="disabled item">...</a>
- {{else}}
- <a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.RepoLink}}/stars?page={{.Num}}"{{end}}>{{.Num}}</a>
- {{end}}
- {{end}}
-
- {{if .HasNext}}
- <a href="{{$.RepoLink}}/stars?page={{.Next}}">{{$.i18n.Tr "issues.next"}}</a>
- {{end}}
- </div>
- {{end}}
- {{end}}
- </div>
- </div>
-
- {{template "repo/sidebar" .}}
- </div>
-</div>
-{{template "ng/base/footer" .}}
diff --git a/templates/repo/watchers.tmpl b/templates/repo/watchers.tmpl
index 03aba0e9ad..bfac88bb25 100644
--- a/templates/repo/watchers.tmpl
+++ b/templates/repo/watchers.tmpl
@@ -1,61 +1,57 @@
-{{template "ng/base/head" .}}
-{{template "ng/base/header" .}}
-<div id="repo-wrapper">
- {{template "repo/header_old" .}}
- <div id="repo-content" class="clear container">
- <div id="repo-main" class="left grid-5-6">
- <div id="stars">
- <h4>
- <strong>{{.i18n.Tr "repos.watches"}}</strong>
- </h4>
+{{template "base/head" .}}
+<div class="repository watchers">
+ {{template "repo/header" .}}
+ <div class="ui container">
+ {{template "repo/sidebar" .}}
+ <h2 class="ui dividing header">
+ {{if .PageIsWatchers}}
+ {{.i18n.Tr "repo.watchers"}}
+ {{else}}
+ {{.i18n.Tr "repo.stargazers"}}
+ {{end}}
+ </h2>
+ <ul class="list">
+ {{range .Watchers}}
+ <li class="item ui segment">
+ <a href="{{.HomeLink}}">
+ <img class="avatar" src="{{.AvatarLink}}"/>
+ </a>
+ <h3 class="name"><a href="{{.HomeLink}}">{{.DisplayName}}</a></h3>
- <ol>
- {{range .Watchers}}
- <li>
- <a href="{{AppSubUrl}}/{{.Name}}">
- <img class="avatar" src="{{.AvatarLink}}" title="{{.Name}}"/>
-
- <h3>{{.Name}}</h3>
- </a>
-
- <p>
- {{if .Website}}
- <span class="octicon octicon-link"></span> <a href="{{.Website}}" target="_blank">{{.Website}}</a>
- {{else if .Location}}
- <span class="octicon octicon-location"></span> {{.Location}}
- {{else}}
- <span class="octicon octicon-clock"></span> {{$.i18n.Tr "user.join_on"}} {{DateFmtShort .Created}}
- {{end}}
- </p>
- </li>
- {{end}}
- </ol>
-
- {{with .Page}}
- {{if gt .TotalPages 1}}
- <div class="pagination">
- {{if .HasPrevious}}
- <a href="{{$.RepoLink}}/watchers?page={{.Previous}}">{{$.i18n.Tr "issues.previous"}}</a>
- {{end}}
-
- {{range .Pages}}
- {{if eq .Num -1}}
- <a class="disabled item">...</a>
- {{else}}
- <a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.RepoLink}}/watchers?page={{.Num}}"{{end}}>{{.Num}}</a>
- {{end}}
- {{end}}
-
- {{if .HasNext}}
- <a href="{{$.RepoLink}}/watchers?page={{.Next}}">{{$.i18n.Tr "issues.next"}}</a>
- {{end}}
- </div>
- {{end}}
- {{end}}
- </div>
+ <div class="meta">
+ {{if .Website}}
+ <span class="icon octicon octicon-link"></span> <a href="{{.Website}}" target="_blank">{{.Website}}</a>
+ {{else if .Location}}
+ <span class="icon octicon octicon-location"></span> {{.Location}}
+ {{else}}
+ <span class="icon octicon octicon-clock"></span> {{$.i18n.Tr "user.join_on"}} {{DateFmtShort .Created}}
+ {{end}}
</div>
-
- {{template "repo/sidebar" .}}
+ </li>
+ {{end}}
+ </ul>
+
+ {{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"}}&nbsp;<i class="icon right arrow"></i>
+ </a>
+ </div>
</div>
+ {{end}}
+ {{end}}
+ </div>
</div>
-{{template "ng/base/footer" .}}
+{{template "base/footer" .}} \ No newline at end of file