mirror of https://github.com/gogits/gogs.git
Unknwon
10 years ago
21 changed files with 48 additions and 212 deletions
@ -1,40 +0,0 @@
|
||||
{{template "base/head" .}} |
||||
{{template "base/navbar" .}} |
||||
{{template "repo/nav" .}} |
||||
{{template "repo/toolbar" .}} |
||||
<div id="body" class="container"> |
||||
<div id="source"> |
||||
<div class="source-toolbar"> |
||||
{{ $n := len .Treenames}} |
||||
{{if not .IsFile}}<button class="btn btn-default pull-right hidden"><i class="fa fa-plus-square"></i>Add File</button>{{end}} |
||||
<div class="dropdown branch-switch"> |
||||
<a href="#" class="btn btn-success dropdown-toggle" data-toggle="dropdown"><i class="fa fa-chain"></i>{{if .IsBranch}}{{.BranchName}}{{else}}{{ShortSha .CommitId}}{{end}} |
||||
<b class="caret"></b></a> |
||||
<ul class="dropdown-menu"> |
||||
{{range .Branches}} |
||||
<li><a {{if eq . $.BranchName}}class="current" {{end}}href="{{AppSubUrl}}/{{$.Username}}/{{$.Reponame}}/src/{{.}}">{{.}}</a></li> |
||||
{{end}} |
||||
</ul> |
||||
</div> |
||||
{{ $l := Subtract $n 1}} |
||||
<ol class="breadcrumb"> |
||||
<li class="root dir"> |
||||
<a href="{{.BranchLink}}">{{.Repository.Name}}</a></li> |
||||
{{range $i, $v := .Treenames}} |
||||
<li class="dir"> |
||||
{{if eq $i $l}}{{$v}} |
||||
{{else}} |
||||
<a href="{{$.BranchLink}}/{{index $.Paths $i}}">{{$v}}</a> |
||||
{{end}} |
||||
</li> |
||||
{{end}} |
||||
</ol> |
||||
</div> |
||||
{{if .IsFile}} |
||||
{{template "repo/single_file" .}} |
||||
{{else}} |
||||
{{template "repo/single_list" .}} |
||||
{{end}} |
||||
</div> |
||||
</div> |
||||
{{template "base/footer" .}} |
@ -1,40 +0,0 @@
|
||||
{{template "base/head" .}} |
||||
{{template "base/navbar" .}} |
||||
{{template "repo/nav" .}} |
||||
{{template "repo/toolbar" .}} |
||||
<div id="body" class="container"> |
||||
<div id="source"> |
||||
<div class="panel panel-default guide-box clone-group-btn"> |
||||
<div class="panel-heading guide-head"> |
||||
<h4>Quick Guide</h4> |
||||
</div> |
||||
<div class="panel-body guide-content text-center"> |
||||
<h3>Clone this repository</h3> |
||||
<div class="input-group col-md-8 col-md-offset-2 guide-buttons"> |
||||
<span class="input-group-btn"> |
||||
<button class="btn btn-default" data-link="{{.CloneLink.SSH}}" type="button">SSH</button> |
||||
<button class="btn btn-default" data-link="{{.CloneLink.HTTPS}}" type="button">HTTPS</button> |
||||
</span> |
||||
<input type="text" class="form-control clone-group-url" id="guide-clone-url" value="" readonly/> |
||||
<span class="input-group-btn" style="position: relative"> |
||||
<button class="btn btn-default" type="button" data-toggle="tooltip" title="copy to clipboard" data-placement="top" data-init="copy" data-copy-val="val" data-copy-from="#guide-clone-url"><i class="fa fa-copy"></i></button> |
||||
</span> |
||||
</div> |
||||
<p>We recommend every repository include a <strong>README</strong>, <strong>LICENSE</strong>, and <strong>.gitignore</strong>.</p> |
||||
<hr/> |
||||
<h3>Create a new repository on the command line</h3> |
||||
<pre class="text-left"><code>touch README.md |
||||
git init |
||||
git add README.md |
||||
git commit -m "first commit" |
||||
git remote add origin <span class="clone-url"></span> |
||||
git push -u origin master</code></pre> |
||||
<hr/> |
||||
<h3>Push an existing repository from the command line</h3> |
||||
<pre class="text-left"><code>git remote add origin <span class="clone-url"></span> |
||||
git push -u origin master</code></pre> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
{{template "base/footer" .}} |
@ -1,51 +0,0 @@
|
||||
<div class="panel panel-default file-content"> |
||||
<div class="panel-heading file-head"> |
||||
{{if .ReadmeExist}} |
||||
<i class="icon fa fa-book"></i> |
||||
{{if .ReadmeInSingle}} |
||||
{{.FileName}} |
||||
{{else}} |
||||
{{.FileName}} <span class="file-size">{{FileSize .FileSize}}</span> |
||||
{{end}} |
||||
{{else}} |
||||
<i class="icon fa fa-file-text-o"></i> |
||||
{{.FileName}} <span class="file-size">{{FileSize .FileSize}}</span> |
||||
{{end}} |
||||
{{if not .ReadmeInSingle}} |
||||
<div class="btn-group pull-right"> |
||||
<a class="btn btn-default hidden" href="#">Edit</a> |
||||
<a class="btn btn-default" href="{{.FileLink}}" rel="nofollow">Raw</a> |
||||
<a class="btn btn-default hidden" href="#">Blame</a> |
||||
<a class="btn btn-default" href="{{.RepoLink}}/commits/{{.BranchName}}/{{.TreeName}}">History</a> |
||||
<a class="btn btn-danger hidden" href="#">Delete</a> |
||||
</div> |
||||
{{end}} |
||||
</div> |
||||
|
||||
{{if not .FileIsText}} |
||||
<div class="panel-body file-body file-code code-view"> |
||||
{{if .IsImageFile}} |
||||
<img src="{{.FileLink}}"> |
||||
{{else}} |
||||
<a href="{{.FileLink}}" rel="nofollow" class="btn btn-default">View Raw</a> |
||||
{{end}} |
||||
</div> |
||||
{{else}} |
||||
{{if .ReadmeExist}} |
||||
<div class="panel-body file-body markdown"> |
||||
{{.FileContent|str2html}} |
||||
</div> |
||||
{{else}} |
||||
<div class="panel-body file-body file-code code-view"> |
||||
<table> |
||||
<tbody> |
||||
<tr> |
||||
<td class="lines-num"></td> |
||||
<td class="lines-code markdown"><pre class="prettyprint linenums{{if .FileExt}} lang-{{.FileExt}}{{end}}">{{.FileContent}}</pre></td> |
||||
</tr> |
||||
</tbody> |
||||
</table> |
||||
</div> |
||||
{{end}} |
||||
{{end}} |
||||
</div> |
@ -1,51 +0,0 @@
|
||||
<div class="panel panel-default info-box"> |
||||
<div class="panel-heading info-head"> |
||||
<a href="{{AppSubUrl}}/{{.Username}}/{{.Reponame}}/commit/{{.LastCommit.Id}}" rel="nofollow">{{.LastCommit.Summary}}</a> |
||||
</div> |
||||
<div class="panel-body info-content"> |
||||
<a href="{{AppSubUrl}}/user/{{.LastCommit.Author.Name}}">{{.LastCommit.Author.Name}}</a> <span class="text-muted">{{TimeSince .LastCommit.Author.When}}</span> |
||||
</div> |
||||
<table class="panel-footer table file-list"> |
||||
<thead class="hidden"> |
||||
<tr> |
||||
<th class="icon"></th> |
||||
<th class="name">Filename</th> |
||||
<th class="text">Message</th> |
||||
<th class="date">Date modified</th> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
{{if .HasParentPath}} |
||||
<tr class="has-parent"> |
||||
<td class="icon"><a href="{{.BranchLink}}{{.ParentPath}}"><i class="fa fa-reply"></i></a></td> |
||||
<td class="name"><a href="{{.BranchLink}}{{.ParentPath}}">..</a></td> |
||||
<td class="text"></td> |
||||
<td class="date"></td> |
||||
</tr> |
||||
{{end}} |
||||
{{range $item := .Files}} |
||||
{{$entry := index $item 0}} |
||||
{{$commit := index $item 1}} |
||||
<tr {{if $entry.IsDir}}class="is-dir"{{end}}> |
||||
<td class="icon"> |
||||
<i class="fa {{if $entry.IsDir}}fa-folder{{else}}fa-file-text-o{{end}}"></i> |
||||
</td> |
||||
<td class="name"> |
||||
<span class="wrap"> |
||||
<a href="{{$.BranchLink}}/{{$.TreePath}}{{$entry.Name}}">{{$entry.Name}}</a> |
||||
</span> |
||||
</td> |
||||
<td class="text"> |
||||
<span class="wrap"><a rel="nofollow" href="{{AppSubUrl}}/{{$.Username}}/{{$.Reponame}}/commit/{{$commit.Id}}">{{$commit.Summary}}</a></span> |
||||
</td> |
||||
<td class="date"> |
||||
<span class="wrap">{{TimeSince $commit.Committer.When}}</span> |
||||
</td> |
||||
</tr> |
||||
{{end}} |
||||
</tbody> |
||||
</table> |
||||
</div> |
||||
{{if .ReadmeExist}} |
||||
{{template "repo/single_file" .}} |
||||
{{end}} |
Loading…
Reference in new issue