Browse Source

Merge pull request #1551 from peppage/explore-ui

Update Explore UI
for-closed-social
无闻 9 years ago
parent
commit
67f07e21f5
5 changed files with 46 additions and 35 deletions
  1. +1
    -1
      public/css/gogs.min.css
  2. +3
    -0
      public/less/_explore.less
  3. +2
    -1
      public/less/gogs.less
  4. +7
    -7
      templates/explore/nav.tmpl
  5. +33
    -26
      templates/explore/repos.tmpl

+ 1
- 1
public/css/gogs.min.css
File diff suppressed because it is too large
View File


+ 3
- 0
public/less/_explore.less View File

@ -0,0 +1,3 @@
.explore {
padding-top: 15px;
}

+ 2
- 1
public/less/gogs.less View File

@ -8,4 +8,5 @@
@import "_organization"; @import "_organization";
@import "_user"; @import "_user";
@import "_dashboard"; @import "_dashboard";
@import "_admin";
@import "_admin";
@import "_explore";

+ 7
- 7
templates/explore/nav.tmpl View File

@ -1,8 +1,8 @@
<div id="setting-menu" class="grid-1-5 panel panel-radius left">
<p class="panel-header"><strong>{{.i18n.Tr "explore"}}</strong></p>
<div class="panel-body">
<ul class="menu menu-vertical switching-list grid-1-5 left">
<li {{if .PageIsExploreRepositories}}class="current"{{end}}><a href="{{AppSubUrl}}/explore">{{.i18n.Tr "explore.repos"}}</a></li>
</ul>
</div>
<div class="four wide column">
<div class="ui vertical menu">
<div class="header item">{{.i18n.Tr "explore"}}</div>
<a class="{{if .PageIsExploreRepositories}}active{{end}} item" href="{{AppSubUrl}}/explore">
{{.i18n.Tr "explore.repos"}}
</a>
</div>
</div> </div>

+ 33
- 26
templates/explore/repos.tmpl View File

@ -1,27 +1,34 @@
{{template "ng/base/head" .}}
{{template "ng/base/header" .}}
<div id="setting-wrapper" class="main-wrapper">
<div id="org-setting" class="container clear">
{{template "explore/nav" .}}
<div class="grid-4-5 left">
<div class="setting-content">
<div id="org-repo-list">
{{range .Repos}}
<div class="org-repo-item">
<ul class="org-repo-status right">
<li><i class="octicon octicon-star"></i> {{.NumStars}}</li>
<li><i class="octicon octicon-git-branch"></i> {{.NumForks}}</li>
</ul>
<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>
{{end}}
</div>
</div>
</div>
</div>
{{template "base/head" .}}
<div class="explore">
<div class="ui container">
<div class="ui grid">
{{template "explore/nav" .}}
<div class="twelve wide column content">
<h4 class="ui top attached header">
{{.i18n.Tr "explore.repos"}}
</h4>
<div class="ui attached segment">
{{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>
<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}}
{{end}}
</div>
</div>
</div>
</div>
</div> </div>
{{template "ng/base/footer" .}}
{{template "base/footer" .}}

Loading…
Cancel
Save