mirror of https://github.com/gogits/gogs.git
Browse Source
- copy link button: #1396, #1168, #1668, - synxtax highlight: #1712, #1549, #1315, #670 - z-index: #1942pull/1950/head
Unknwon
9 years ago
24 changed files with 931 additions and 551 deletions
File diff suppressed because one or more lines are too long
@ -0,0 +1,98 @@ |
|||||||
|
/* |
||||||
|
|
||||||
|
github.com style (c) Vasily Polovnyov <vast@whiteants.net> |
||||||
|
|
||||||
|
*/ |
||||||
|
|
||||||
|
.hljs { |
||||||
|
display: block; |
||||||
|
overflow-x: auto; |
||||||
|
padding: 0.5em; |
||||||
|
color: #333; |
||||||
|
background: #f8f8f8; |
||||||
|
} |
||||||
|
|
||||||
|
.hljs-comment, |
||||||
|
.hljs-quote { |
||||||
|
color: #998; |
||||||
|
font-style: italic; |
||||||
|
} |
||||||
|
|
||||||
|
.hljs-keyword, |
||||||
|
.hljs-selector-tag, |
||||||
|
.hljs-subst { |
||||||
|
color: #333; |
||||||
|
font-weight: bold; |
||||||
|
} |
||||||
|
|
||||||
|
.hljs-number, |
||||||
|
.hljs-literal, |
||||||
|
.hljs-variable, |
||||||
|
.hljs-template-variable, |
||||||
|
.hljs-tag .hljs-attr { |
||||||
|
color: #008080; |
||||||
|
} |
||||||
|
|
||||||
|
.hljs-string, |
||||||
|
.hljs-doctag { |
||||||
|
color: #d14; |
||||||
|
} |
||||||
|
|
||||||
|
.hljs-title, |
||||||
|
.hljs-section, |
||||||
|
.hljs-selector-id { |
||||||
|
color: #900; |
||||||
|
font-weight: bold; |
||||||
|
} |
||||||
|
|
||||||
|
.hljs-subst { |
||||||
|
font-weight: normal; |
||||||
|
} |
||||||
|
|
||||||
|
.hljs-type, |
||||||
|
.hljs-class .hljs-title { |
||||||
|
color: #458; |
||||||
|
font-weight: bold; |
||||||
|
} |
||||||
|
|
||||||
|
.hljs-tag, |
||||||
|
.hljs-name, |
||||||
|
.hljs-attribute { |
||||||
|
color: #000080; |
||||||
|
font-weight: normal; |
||||||
|
} |
||||||
|
|
||||||
|
.hljs-regexp, |
||||||
|
.hljs-link { |
||||||
|
color: #009926; |
||||||
|
} |
||||||
|
|
||||||
|
.hljs-symbol, |
||||||
|
.hljs-bullet { |
||||||
|
color: #990073; |
||||||
|
} |
||||||
|
|
||||||
|
.hljs-built_in { |
||||||
|
color: #0086b3; |
||||||
|
} |
||||||
|
|
||||||
|
.hljs-meta { |
||||||
|
color: #999; |
||||||
|
font-weight: bold; |
||||||
|
} |
||||||
|
|
||||||
|
.hljs-deletion { |
||||||
|
background: #fdd; |
||||||
|
} |
||||||
|
|
||||||
|
.hljs-addition { |
||||||
|
background: #dfd; |
||||||
|
} |
||||||
|
|
||||||
|
.hljs-emphasis { |
||||||
|
font-style: italic; |
||||||
|
} |
||||||
|
|
||||||
|
.hljs-strong { |
||||||
|
font-weight: bold; |
||||||
|
} |
Binary file not shown.
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 67 KiB |
Binary file not shown.
Binary file not shown.
@ -1,81 +1,117 @@ |
|||||||
{{template "ng/base/head" .}} |
{{template "base/head" .}} |
||||||
{{template "ng/base/header" .}} |
<div class="repository file list"> |
||||||
<div id="repo-wrapper"> |
{{template "repo/header" .}} |
||||||
{{template "repo/header_old" .}} |
<div class="ui container"> |
||||||
<div id="repo-content" class="clear container"> |
{{template "repo/sidebar" .}} |
||||||
<div id="repo-main" class="left grid-5-6"> |
<div class="ui grid"> |
||||||
<p id="repo-desc"> |
<div class="ui ten wide column"> |
||||||
{{if .Repository.DescriptionHtml}}<span class="description">{{.Repository.DescriptionHtml}}</span>{{else}}<span class="no-description text-italic">{{.i18n.Tr "repo.no_desc"}}</span>{{end}} |
<p id="repo-desc"> |
||||||
<a class="link" href="{{.Repository.Website}}">{{.Repository.Website}}</a> |
{{if .Repository.DescriptionHtml}}<span class="description">{{.Repository.DescriptionHtml}}</span>{{else}}<span class="no-description text-italic">{{.i18n.Tr "repo.no_desc"}}</span>{{end}} |
||||||
</p> |
<a class="link" href="{{.Repository.Website}}">{{.Repository.Website}}</a> |
||||||
<ul id="repo-file-nav" class="clear menu menu-line"> |
</p> |
||||||
{{if and .IsRepositoryAdmin .Repository.BaseRepo}} |
</div> |
||||||
{{ $baseRepo := .Repository.BaseRepo}} |
<div class="ui six wide column"> |
||||||
<li> |
<div class="ui action small clone input"> |
||||||
<a href="{{AppSubUrl}}/{{$baseRepo.Owner.Name}}/{{$baseRepo.Name}}/compare/{{$.BaseDefaultBranch}}...{{$.Owner.Name}}:{{$.BranchName}}"> |
{{if not $.DisableSSH}} |
||||||
<button class="btn btn-green btn-small btn-radius" id="repo-compare-btn"><i class="octicon octicon-git-compare"></i></button> |
<button class="ui blue basic clone button" id="repo-clone-ssh" data-link="{{.CloneLink.SSH}}"> |
||||||
</a> |
SSH |
||||||
</li> |
</button> |
||||||
{{end}} |
{{end}} |
||||||
<li id="repo-branch-switch" class="down drop"> |
<button class="ui {{if $.DisableSSH}}blue{{end}} basic clone button" id="repo-clone-https" data-link="{{.CloneLink.HTTPS}}"> |
||||||
<a> |
HTTPS |
||||||
<button class="btn btn-gray btn-medium btn-radius"> |
</button> |
||||||
<i class="octicon octicon-git-branch"></i> {{if .IsViewBranch}}{{.i18n.Tr "repo.branch"}}{{else}}{{.i18n.Tr "repo.tree"}}{{end}}: |
<input id="repo-clone-url" value="{{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}" readonly> |
||||||
<strong id="repo-branch-current">{{if .IsViewBranch}}{{.BranchName}}{{else}}{{ShortSha .BranchName}}{{end}}</strong> |
<button class="ui basic icon button poping up clipboard" id="clipboard-btn" data-original="{{.i18n.Tr "repo.copy_link"}}" data-success="{{.i18n.Tr "repo.copy_link_success"}}" data-error="{{.i18n.Tr "repo.copy_link_error"}}" data-content="{{.i18n.Tr "repo.copy_link"}}" data-variation="inverted tiny" data-clipboard-target="#repo-clone-url"> |
||||||
</button> |
<i class="octicon octicon-clippy"></i> |
||||||
</a> |
</button> |
||||||
<div class="drop-down panel"> |
<div class="ui basic jump dropdown icon button"> |
||||||
<p class="panel-header text-bold">{{.i18n.Tr "repo.branch_and_tags"}}</p> |
<i class="download icon"></i> |
||||||
<!-- <input id="repo-branch-filter-ipt" class="ipt ipt-large" type="text" placeholder="find branches / tags"/> --> |
<div class="menu"> |
||||||
<div id="repo-branch-tag"> |
<a class="item" href="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.zip"><i class="icon octicon octicon-file-zip"></i> ZIP</a> |
||||||
<ul class="menu menu-line tab-nav clear" id="repo-branch-tab-nav"> |
<a class="item" href="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.tar.gz"><i class="icon octicon octicon-file-zip"></i> TAR.GZ</a> |
||||||
<li class="js-tab-nav {{if not .IsTag}}js-tab-nav-show{{end}} left" data-tab-target="#repo-branch-list"><a>{{.i18n.Tr "repo.branches"}}</a></li> |
</div> |
||||||
<li class="js-tab-nav {{if .IsTag}}js-tab-nav-show{{end}} left" data-tab-target="#repo-tag-list"><a>{{.i18n.Tr "repo.tags"}}</a></li> |
</div> |
||||||
</ul> |
</div> |
||||||
<ul class="menu menu-vertical switching-list {{if .IsTag}}hide{{end}}" id="repo-branch-list"> |
</div> |
||||||
{{range .Branches}} |
</div> |
||||||
<li {{if eq . $.BranchName}}class="checked"{{end}}><a href="{{$.RepoLink}}/src/{{EscapePound .}}"><i class="octicon octicon-check"></i>{{.}}</a></li> |
|
||||||
{{end}} |
<ul class="head meta"> |
||||||
</ul> |
{{if and .IsRepositoryAdmin .Repository.BaseRepo}} |
||||||
<ul class="menu menu-vertical switching-list {{if not .IsTag}}hide{{end}}" id="repo-tag-list"> |
<li> |
||||||
{{range .Tags}} |
{{ $baseRepo := .Repository.BaseRepo}} |
||||||
<li {{if eq . $.BranchName}}class="checked"{{end}}><a href="{{$.RepoLink}}/src/{{EscapePound .}}"><i class="octicon octicon-check"></i>{{.}}</a></li> |
<a href="{{AppSubUrl}}/{{$baseRepo.Owner.Name}}/{{$baseRepo.Name}}/compare/{{$.BaseDefaultBranch}}...{{$.Owner.Name}}:{{$.BranchName}}"> |
||||||
{{end}} |
<button class="ui green small button"><i class="octicon octicon-git-compare"></i></button> |
||||||
</ul> |
</a> |
||||||
</div> |
</li> |
||||||
</div> |
{{end}} |
||||||
</li> |
<li> |
||||||
<li id="repo-bread" class="breads"> |
<div class="choose reference"> |
||||||
<a class="title bread" href="{{.RepoLink}}/src/{{EscapePound .BranchName}}">{{.Repository.Name}}</a> |
<div class="ui floating filter dropdown" data-no-results="{{.i18n.Tr "repo.pulls.no_results"}}"> |
||||||
{{ $n := len .Treenames}} |
<div class="ui basic small button"> |
||||||
{{ $l := Subtract $n 1}} |
<span class="text"> |
||||||
{{range $i, $v := .Treenames}} |
<i class="octicon octicon-git-branch"></i> |
||||||
{{if eq $i $l}} |
{{if .IsViewBranch}}{{.i18n.Tr "repo.branch"}}{{else}}{{.i18n.Tr "repo.tree"}}{{end}}: |
||||||
<span class="bread">{{$v}}</span> |
<strong>{{if .IsViewBranch}}{{.BranchName}}{{else}}{{ShortSha .BranchName}}{{end}}</strong> |
||||||
{{else}} |
</span> |
||||||
{{ $p := index $.Paths $i}} |
<i class="dropdown icon"></i> |
||||||
<span class="bread"><a href="{{EscapePound $.BranchLink}}/{{EscapePound $p}}">{{$v}}</a></span> |
</div> |
||||||
{{end}} |
<div class="menu"> |
||||||
{{end}} |
<div class="ui icon search input"> |
||||||
</li> |
<i class="filter icon"></i> |
||||||
<!-- <li id="repo-commits-jump" class="repo-jump right"> |
<input name="search" placeholder="{{.i18n.Tr "repo.filter_branch_and_tag"}}..."> |
||||||
<a href="#"> |
</div> |
||||||
<button class="btn btn-small btn-gray btn-right-radius"><i class="octicon octicon-git-commit"></i></button> |
<div class="header"> |
||||||
|
<div class="ui grid"> |
||||||
|
<div class="two column row"> |
||||||
|
<a class="reference column" href="#" data-target="#branch-list"> |
||||||
|
<span class="text {{if .IsViewBranch}}black{{end}}"> |
||||||
|
<i class="icon octicon octicon-git-branch"></i> {{.i18n.Tr "repo.branches"}} |
||||||
|
</span> |
||||||
</a> |
</a> |
||||||
</li> |
<a class="reference column" href="#" data-target="#tag-list"> |
||||||
<li id="repo-find-jump" class="repo-jump right"> |
<span class="text {{if .IsTag}}black{{end}}"> |
||||||
<a href="#"> |
<i class="reference tags icon"></i> {{.i18n.Tr "repo.tags"}} |
||||||
<button class="btn btn-small btn-gray btn-left-radius"><i class="octicon octicon-list-unordered"></i></button> |
</span> |
||||||
</a> |
</a> |
||||||
</li> --> |
</div> |
||||||
</ul> |
</div> |
||||||
{{if .IsFile}} |
</div> |
||||||
{{template "repo/view_file" .}} |
<div id="branch-list" class="scrolling menu" {{if .IsTag}}style="display: none"{{end}}> |
||||||
|
{{range .Branches}} |
||||||
|
<div class="item {{if eq $.BranchName .}}selected{{end}}" data-url="{{$.RepoLink}}/src/{{EscapePound .}}">{{.}}</div> |
||||||
|
{{end}} |
||||||
|
</div> |
||||||
|
<div id="tag-list" class="scrolling menu" {{if .IsViewBranch}}style="display: none"{{end}}> |
||||||
|
{{range .Tags}} |
||||||
|
<div class="item {{if eq $.BranchName .}}selected{{end}}" data-url="{{$.RepoLink}}/src/{{EscapePound .}}">{{.}}</div> |
||||||
|
{{end}} |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</li> |
||||||
|
<li> |
||||||
|
<div class="ui breadcrumb"> |
||||||
|
<a class="section" href="{{.RepoLink}}/src/{{EscapePound .BranchName}}">{{.Repository.Name}}</a> |
||||||
|
{{ $n := len .Treenames}} |
||||||
|
{{ $l := Subtract $n 1}} |
||||||
|
{{range $i, $v := .Treenames}} |
||||||
|
<div class="divider"> / </div> |
||||||
|
{{if eq $i $l}} |
||||||
|
<span class="active section">{{$v}}</span> |
||||||
{{else}} |
{{else}} |
||||||
{{template "repo/view_list" .}} |
{{ $p := index $.Paths $i}} |
||||||
|
<span class="section"><a href="{{EscapePound $.BranchLink}}/{{EscapePound $p}}">{{$v}}</a></span> |
||||||
{{end}} |
{{end}} |
||||||
|
{{end}} |
||||||
</div> |
</div> |
||||||
{{template "repo/sidebar" .}} |
</li> |
||||||
</div> |
</ul> |
||||||
|
{{if .IsFile}} |
||||||
|
{{template "repo/view_file" .}} |
||||||
|
{{else}} |
||||||
|
{{template "repo/view_list" .}} |
||||||
|
{{end}} |
||||||
|
</div> |
||||||
</div> |
</div> |
||||||
{{template "ng/base/footer" .}} |
{{template "base/footer" .}} |
||||||
|
@ -1,30 +1,19 @@ |
|||||||
<div id="repo-sidebar" class="right grid-1-6"> |
<div class="ui five item menu"> |
||||||
<ul class="menu menu-vertical" id="repo-sidebar-nav"> |
<a class="item" href="{{.RepoLink}}/issues"> |
||||||
<li> |
<i class="icon octicon octicon-issue-opened"></i> {{.i18n.Tr "repo.issues"}} <span class="ui blue label">{{.Repository.NumOpenIssues}}</span> |
||||||
<a class="radius" href="{{.RepoLink}}/issues"><i class="octicon octicon-issue-opened"></i>{{.i18n.Tr "repo.issues"}}<span class="num right label label-blue label-radius">{{.Repository.NumOpenIssues}}</span></a> |
</a> |
||||||
</li> |
<a class="item" href="{{.RepoLink}}/pulls"> |
||||||
<li> |
<i class="icon octicon octicon-git-pull-request"></i> {{.i18n.Tr "repo.pulls"}} <span class="ui blue label">{{.Repository.NumOpenPulls}}</span> |
||||||
<a class="radius" href="{{.RepoLink}}/pulls"><i class="octicon octicon-git-pull-request"></i>{{.i18n.Tr "repo.pulls"}}<span class="num right label label-blue label-radius">{{.Repository.NumOpenPulls}}</span></a> |
</a> |
||||||
</li> |
<a class="item" href="{{.RepoLink}}/commits/{{EscapePound .BranchName}}"> |
||||||
<li class="border-bottom"></li> |
<i class="icon octicon octicon-history"></i> {{.i18n.Tr "repo.commits"}} <span class="ui blue label">{{.CommitsCount}}</span> |
||||||
<li class="head">{{if .IsViewBranch}}{{.BranchName}}{{else}}{{ShortSha .BranchName}}{{end}}</li> |
</a> |
||||||
<li> |
<a class="item" href="{{.RepoLink}}/releases"> |
||||||
<a class="radius" href="{{.RepoLink}}/commits/{{EscapePound .BranchName}}"><i class="octicon octicon-history"></i>{{.i18n.Tr "repo.commits"}} <span class="num right label label-gray label-radius">{{.CommitsCount}}</span></a> |
<i class="icon octicon octicon-tag"></i> {{.i18n.Tr "repo.releases"}} <span class="ui blue label">{{.Repository.NumTags}}</span> |
||||||
</li> |
</a> |
||||||
<!-- <li> |
{{if .IsRepositoryAdmin}} |
||||||
<a class="radius" href="{{.RepoLink}}/branches"><i class="octicon octicon-git-branch"></i>Branches<span class="num right label label-gray label-radius">{{.BrancheCount}}</span></a> |
<a class="item" href="{{.RepoLink}}/settings"> |
||||||
</li> --> |
<i class="icon octicon octicon-tools"></i> {{.i18n.Tr "repo.settings"}} |
||||||
<li> |
</a> |
||||||
<a class="radius" href="{{.RepoLink}}/releases"><i class="octicon octicon-tag"></i>{{.i18n.Tr "repo.releases"}} <span class="num right label label-gray label-radius">{{.Repository.NumTags}}</span></a> |
{{end}} |
||||||
</li> |
|
||||||
<!-- <li> |
|
||||||
<a class="radius" href="#"><i class="octicon octicon-organization"></i>contributors <span class="num right label label-gray label-radius">43</span></a> |
|
||||||
</li> --> |
|
||||||
{{if .IsRepositoryAdmin}} |
|
||||||
<li class="border-bottom"></li> |
|
||||||
<li> |
|
||||||
<a class="radius" href="{{.RepoLink}}/settings"><i class="octicon octicon-tools"></i>{{.i18n.Tr "repo.settings"}}</a> |
|
||||||
</li> |
|
||||||
{{end}} |
|
||||||
</ul> |
|
||||||
</div> |
</div> |
@ -1,12 +0,0 @@ |
|||||||
<ul class="menu menu-vertical" id="repo-sidebar-mini"> |
|
||||||
<li><a href="#" class="btn-right-radius"><i class="octicon octicon-code"></i></a></li> |
|
||||||
<li class="border-bottom"></li> |
|
||||||
<li><a href="#" class="btn-right-radius"><i class="octicon octicon-issue-opened"></i> |
|
||||||
<span class="num label label-blue">999</span> |
|
||||||
</a></li> |
|
||||||
<li class="current"><a href="#" class="btn-right-radius"><i class="octicon octicon-git-pull-request"></i> |
|
||||||
<span class="num label label-black">12</span> |
|
||||||
</a></li> |
|
||||||
<li class="border-bottom"></li> |
|
||||||
<li><a href="#" class="btn-right-radius"><i class="octicon octicon-tools"></i></a></li> |
|
||||||
</ul> |
|
@ -1,50 +1,50 @@ |
|||||||
<div class="panel panel-radius" id="{{if .ReadmeExist}}repo-readme{{else}}repo-read-file{{end}}"> |
<div id="file-content"> |
||||||
<p class="panel-header"> |
<h4 class="ui top attached header" id="{{if .ReadmeExist}}repo-readme{{else}}repo-read-file{{end}}"> |
||||||
{{if .ReadmeExist}} |
{{if .ReadmeExist}} |
||||||
<i class="icon fa fa-book fa-lg"></i> |
<i class="book icon ui left"></i> |
||||||
{{if .ReadmeInList}} |
{{if .ReadmeInList}} |
||||||
<strong class="file-name">{{.FileName}}</strong> |
<strong>{{.FileName}}</strong> |
||||||
{{else}} |
{{else}} |
||||||
<strong>{{.FileName}}</strong><span class="file-size">{{FileSize .FileSize}}</span> |
<strong>{{.FileName}}</strong> <span class="text grey normal">{{FileSize .FileSize}}</span> |
||||||
{{end}} |
{{end}} |
||||||
{{else}} |
{{else}} |
||||||
<i class="icon fa fa-file-text-o"></i> |
<i class="file text outline icon ui left"></i> |
||||||
<strong class="file-name">{{.FileName}}</strong><span class="file-size">{{FileSize .FileSize}}</span> |
<strong>{{.FileName}}</strong> <span class="text grey normal">{{FileSize .FileSize}}</span> |
||||||
{{end}} |
{{end}} |
||||||
{{if not .ReadmeInList}} |
{{if not .ReadmeInList}} |
||||||
{{if not .IsCommit}} |
<div class="ui right"> |
||||||
<a class="right" href="{{.RepoLink}}/src/{{.CommitID}}/{{EscapePound .TreeName}}"> |
<div class="ui small grey basic buttons"> |
||||||
<button class="btn btn-medium btn-gray btn-right-radius btn-comb">{{.i18n.Tr "repo.file_permalink"}}</button> |
{{if not .IsCommit}} |
||||||
</a> |
<a class="ui button" href="{{.RepoLink}}/src/{{.CommitID}}/{{EscapePound .TreeName}}">{{.i18n.Tr "repo.file_permalink"}}</a> |
||||||
{{end}} |
|
||||||
<a class="right" href="{{.RepoLink}}/commits/{{EscapePound .BranchName}}/{{EscapePound .TreeName}}"> |
|
||||||
<button class="btn btn-medium btn-gray btn-right-radius btn-comb">{{.i18n.Tr "repo.file_history"}}</button> |
|
||||||
</a> |
|
||||||
<a class="right" href="{{EscapePound .FileLink}}"> |
|
||||||
<button class="btn btn-medium btn-gray btn-left-radius btn-comb">{{.i18n.Tr "repo.file_raw"}}</button> |
|
||||||
</a> |
|
||||||
{{end}} |
{{end}} |
||||||
</p> |
<a class="ui button" href="{{.RepoLink}}/commits/{{EscapePound .BranchName}}/{{EscapePound .TreeName}}">{{.i18n.Tr "repo.file_history"}}</a> |
||||||
<div class="{{if .ReadmeExist}}panel-content markdown{{end}} code-view" id="repo-code-view"> |
<a class="ui button" href="{{EscapePound .FileLink}}">{{.i18n.Tr "repo.file_raw"}}</a> |
||||||
{{if .ReadmeExist}} |
</div> |
||||||
{{if .FileContent}}{{.FileContent | Str2html}}{{end}} |
</div> |
||||||
|
{{end}} |
||||||
|
</h4> |
||||||
|
<div class="ui attached table segment"> |
||||||
|
<div class="{{if .ReadmeExist}}markdown{{else if .IsFileText}}code-view{{end}}"> |
||||||
|
{{if .ReadmeExist}} |
||||||
|
{{if .FileContent}}{{.FileContent | Str2html}}{{end}} |
||||||
{{else if not .IsFileText}} |
{{else if not .IsFileText}} |
||||||
<div class="view-raw"> |
<div class="view-raw"> |
||||||
{{if .IsImageFile}} |
{{if .IsImageFile}} |
||||||
<img src="{{EscapePound .FileLink}}"> |
<img src="{{EscapePound .FileLink}}"> |
||||||
{{else}} |
{{else}} |
||||||
<a href="{{EscapePound .FileLink}}" rel="nofollow" class="btn btn-gray btn-radius">{{.i18n.Tr "repo.file_view_raw"}}</a> |
<a href="{{EscapePound .FileLink}}" rel="nofollow" class="btn btn-gray btn-radius">{{.i18n.Tr "repo.file_view_raw"}}</a> |
||||||
{{end}} |
{{end}} |
||||||
</div> |
</div> |
||||||
{{else if .FileSize}} |
{{else if .FileSize}} |
||||||
<table> |
<table> |
||||||
<tbody> |
<tbody> |
||||||
<tr> |
<tr> |
||||||
<td class="lines-num"></td> |
<td class="lines-num"></td> |
||||||
<td class="lines-code"><pre class="prettyprint linenums {{if .FileExt}}lang-{{.FileExt}}{{end}}"><code>{{.FileContent}}</code></pre></td> |
<td class="lines-code"><pre class="{{if .FileExt}}lang-{{.FileExt}}{{end}}"><code><ol class="linenums">{{.FileContent}}</ol></code></pre></td> |
||||||
</tr> |
</tr> |
||||||
</tbody> |
</tbody> |
||||||
</table> |
</table> |
||||||
{{end}} |
{{end}} |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
|
</div> |
@ -1,69 +1,64 @@ |
|||||||
<table id="repo-files-table" class="table-border table-block table-radius"> |
<table id="repo-files-table" class="ui table"> |
||||||
<thead> |
<thead> |
||||||
<tr> |
<tr> |
||||||
<th colspan="5" class="clear"> |
<th colspan="5" class="clear"> |
||||||
<span class="author left"> |
<span> |
||||||
{{if .LastCommitUser}} |
{{if .LastCommitUser}} |
||||||
<img class="avatar-24 radius" src="{{.LastCommitUser.AvatarLink}}" /> |
<img class="ui avatar image img-12" src="{{.LastCommitUser.AvatarLink}}" /> |
||||||
<a href="{{AppSubUrl}}/{{.LastCommitUser.Name}}"><strong>{{.LastCommit.Author.Name}}</strong></a>: |
<a href="{{AppSubUrl}}/{{.LastCommitUser.Name}}"><strong>{{.LastCommit.Author.Name}}</strong></a>: |
||||||
{{else}} |
{{else}} |
||||||
<img class="avatar-24 radius" src="{{AvatarLink .LastCommit.Author.Email}}" /> |
<img class="ui avatar image img-12" src="{{AvatarLink .LastCommit.Author.Email}}" /> |
||||||
<strong>{{.LastCommit.Author.Name}}</strong>: |
<strong>{{.LastCommit.Author.Name}}</strong>: |
||||||
{{end}} |
{{end}} |
||||||
|
</span> |
||||||
</span> |
<a class="text black" href="{{.RepoLink}}/commit/{{.LastCommit.ID}}" rel="nofollow"> |
||||||
<span class="last-commit"><a href="{{.RepoLink}}/commit/{{.LastCommit.ID}}" rel="nofollow"> |
<strong>{{ShortSha .LastCommit.ID.String}}</strong></a> |
||||||
<strong>{{ShortSha .LastCommit.ID.String}}</strong></a> |
<span class="text truncate grey" id="last-commit-message">{{RenderCommitMessage .LastCommit.Summary .RepoLink}}</span> |
||||||
<span class="text-truncate">{{RenderCommitMessage .LastCommit.Summary .RepoLink}}</span> |
<span class="ui right text grey age">{{TimeSince .LastCommit.Author.When $.Lang}}</span> |
||||||
</span> |
</th> |
||||||
<span class="age right">{{TimeSince .LastCommit.Author.When $.Lang}}</span> |
|
||||||
</th> |
|
||||||
</tr> |
</tr> |
||||||
</thead> |
</thead> |
||||||
<tbody> |
<tbody> |
||||||
{{if .HasParentPath}} |
{{if .HasParentPath}} |
||||||
<tr class="has-parent"> |
<tr class="has-parent"> |
||||||
<td class="icon"></td> |
<td><span class="octicon octicon-mail-reply"></span></td> |
||||||
<td class="name"><a href="{{EscapePound .BranchLink}}{{.ParentPath}}">..</a></td> |
<td><a href="{{EscapePound .BranchLink}}{{.ParentPath}}">..</a></td> |
||||||
<th class="sha">SHA1</th> |
</tr> |
||||||
<td class="msg"></td> |
{{end}} |
||||||
<td class="age"></td> |
{{range $item := .Files}} |
||||||
</tr> |
{{$entry := index $item 0}} |
||||||
{{end}} |
{{$commit := index $item 1}} |
||||||
{{range $item := .Files}} |
<tr> |
||||||
{{$entry := index $item 0}} |
{{if $entry.IsSubModule}} |
||||||
{{$commit := index $item 1}} |
<td> |
||||||
<tr> |
<span class="icon octicon octicon-file-submodule"></span> |
||||||
{{if $entry.IsSubModule}} |
</td> |
||||||
<td class="icon"> |
<td> |
||||||
<span class="octicon octicon-file-submodule"></span> |
{{if $commit.RefUrl}} |
||||||
</td> |
<a href="{{$commit.RefUrl}}" class="text truncate">{{$entry.Name}}</a> @ <a href="{{$commit.RefUrl}}/commit/{{$commit.RefId}}">{{ShortSha $commit.RefId}}</a> |
||||||
<td class="name"> |
{{else}} |
||||||
{{if $commit.RefUrl}} |
{{$entry.Name}} @ {{ShortSha $commit.RefId}} |
||||||
<a href="{{$commit.RefUrl}}" class="text-truncate">{{$entry.Name}}</a> @ <a href="{{$commit.RefUrl}}/commit/{{$commit.RefId}}">{{ShortSha $commit.RefId}}</a> |
{{end}} |
||||||
{{else}} |
</td> |
||||||
{{$entry.Name}} @ {{ShortSha $commit.RefId}} |
{{else}} |
||||||
{{end}} |
<td> |
||||||
</td> |
<span class="icon octicon octicon-file-{{if or $entry.IsDir}}directory{{else}}text{{end}}"></span> |
||||||
{{else}} |
</td> |
||||||
<td class="icon"> |
<td class="name"> |
||||||
<span class="octicon octicon-file-{{if or $entry.IsDir}}directory{{else}}text{{end}}"></span> |
<a href="{{EscapePound $.BranchLink}}/{{EscapePound $.TreePath}}{{EscapePound $entry.Name}}" class="text truncate">{{$entry.Name}}</a> |
||||||
</td> |
</td> |
||||||
<td class="name"> |
|
||||||
<a href="{{EscapePound $.BranchLink}}/{{EscapePound $.TreePath}}{{EscapePound $entry.Name}}" class="text-truncate">{{$entry.Name}}</a> |
|
||||||
</td> |
|
||||||
{{end}} |
|
||||||
<td class="sha"> |
|
||||||
<a rel="nofollow" class="label label-green" href="{{AppSubUrl}}/{{$.Username}}/{{$.Reponame}}/commit/{{$commit.ID}} ">{{SubStr $commit.ID.String 0 10}} </a> |
|
||||||
</td> |
|
||||||
<td class="message"> |
|
||||||
<span class="text-truncate">{{RenderCommitMessage $commit.Summary $.RepoLink}}</span> |
|
||||||
</td> |
|
||||||
<td class="age">{{TimeSince $commit.Committer.When $.Lang}}</td> |
|
||||||
</tr> |
|
||||||
{{end}} |
{{end}} |
||||||
</tbody> |
<td class="sha"> |
||||||
|
<a rel="nofollow" class="ui green sha label" href="{{AppSubUrl}}/{{$.Username}}/{{$.Reponame}}/commit/{{$commit.ID}} ">{{SubStr $commit.ID.String 0 10}} </a> |
||||||
|
</td> |
||||||
|
<td class="message"> |
||||||
|
<span class="text truncate">{{RenderCommitMessage $commit.Summary $.RepoLink}}</span> |
||||||
|
</td> |
||||||
|
<td class="text grey right age">{{TimeSince $commit.Committer.When $.Lang}}</td> |
||||||
|
</tr> |
||||||
|
{{end}} |
||||||
|
</tbody> |
||||||
</table> |
</table> |
||||||
{{if .ReadmeExist}} |
{{if .ReadmeExist}} |
||||||
{{template "repo/view_file" .}} |
{{template "repo/view_file" .}} |
||||||
{{end}} |
{{end}} |
||||||
|
Loading…
Reference in new issue