summaryrefslogtreecommitdiffstats
path: root/templates/repo/home.tmpl
blob: 5f16a7baf0780cbe6b50d70527872e7f6cebf69d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
{{template "ng/base/head" .}}
{{template "ng/base/header" .}}
<div id="repo-wrapper">
    <div id="repo-header" class="clear">
        <div class="container clear">
            <h1 id="repo-header-name" class="left public">
                <i class="mega-octicon octicon-{{if .Repository.IsPrivate}}lock{{else}}repo{{end}}"></i>
                <a class="author" href="/{{.Owner.Name}}">{{.Owner.Name}}</a>
                <span class="divider">/</span>
                <a class="repo text-bold" href="{{.RepoLink}}">{{.Repository.Name}}</a>
            </h1>
            <ul id="repo-header-meta" class="right menu menu-line">
                <li id="repo-header-download" class="inline-block down drop">
                    <a id="repo-header-download-btn" href="#">
                        <button class="btn btn-black text-bold btn-radius">
                            <i class="octicon octicon-cloud-download"></i>
                        </button>
                    </a>
                    <div id="repo-header-download-drop" class="drop-down">
                        <div id="repo-clone" class="clear">
                            <button id="repo-clone-ssh" class="btn btn-blue current left left btn-left-radius">SSH</button>
                            <button id="repo-clone-https" class="btn btn-gray left">HTTPS</button>
                            <input id="repo-clone-url" type="text" class="ipt ipt-disabled left" value="{{.CloneLink.SSH}}" />
                            <button id="repo-clone-copy" class="btn btn-black left btn-right-radius">Copy</button>
                            <p class="text-center" id="repo-clone-help">Need help cloning? Visit <a href="#">Help</a>!</p>
                            <hr/>
                            <div class="text-center" id="repo-clone-zip">
                                <a class="btn btn-green btn-radius" href="{{.RepoLink}}/archive/{{.BranchName}}.zip"><i class="octicon octicon-file-zip"></i>ZIP</a>
                                <a class="btn btn-green btn-radius" href="{{.RepoLink}}/archive/{{.BranchName}}.tar.gz"><i class="octicon octicon-file-zip"></i>TAR.GZ</a>
                            </div>
                        </div>
                    </div>
                </li>
                <li id="repo-header-watch">
                    <a id="repo-header-watch-btn" href="#">
                        <button class="btn btn-gray text-bold btn-radius">
                            <i class="octicon octicon-eye-watch"></i>{{if .IsWatchingRepo}}Unwatch{{else}}Watch{{end}}
                            <span class="num">{{.Repository.NumWatches}}</span>
                        </button>
                    </a>
                </li>
                <li id="repo-header-star">
                    <a id="repo-header-star-btn" href="#">
                        <button class="btn btn-gray text-bold btn-radius">
                            <i class="octicon octicon-star"></i>Star
                            <span class="num">{{.Repository.NumStars}}</span>
                        </button>
                    </a>
                </li>
                <li id="repo-header-fork">
                    <a id="repo-header-fork-btn" href="#">
                        <button class="btn btn-gray text-bold btn-radius">
                            <i class="octicon octicon-repo-forked"></i>Fork
                            <span class="num">{{.Repository.NumForks}}</span>
                        </button>
                    </a>
                </li>
            </ul>
        </div>
    </div>
    <div id="repo-content" class="clear container">
        <div id="repo-main" class="left grid-4-5">
            <p id="repo-desc">
                <span class="description">{{.Repository.DescriptionHtml}}</span>
                <a class="link" href="{{.Repository.Website}}">{{.Repository.Website}}</a>
            </p>
            <ul id="repo-file-nav" class="clear menu menu-line">
                <li>
                    <a href="#">
                        <button class="btn btn-green btn-small btn-radius" id="repo-compare-btn"><i class="octicon octicon-git-compare"></i></button>
                    </a>
                </li>
                <li id="repo-branch-switch" class="down drop">
                    <a href="#">
                        <button class="btn btn-gray btn-small btn-radius">
                            <i class="octicon octicon-git-branch"></i> Branch :
                            <strong id="repo-branch-current">{{if .IsViewBranch}}{{.BranchName}}{{else}}{{ShortSha .BranchName}}{{end}}</strong>
                        </button>
                    </a>
                    <div class="drop-down panel">
                        <p class="panel-header text-bold">Branches & Tags</p>
                        <input id="repo-branch-filter-ipt" class="ipt ipt-large" type="text" placeholder="find branches / tags"/>
                        <div id="repo-branch-tag">
                            <ul class="menu menu-line tab-nav clear" id="repo-branch-tab-nav">
                                <li class="js-tab-nav js-tab-nav-show left" data-tab-target="#repo-branch-list"><a href="#">Branches</a></li>
                                <li class="js-tab-nav left" data-tab-target="#repo-tag-list"><a href="#">Tags</a></li>
                            </ul>
                            <ul class="menu menu-vertical switching-list" id="repo-branch-list">
                                {{range .Branches}}
                                <li {{if eq . $.BranchName}}class="checked"{{end}}><a href="{{$.RepoLink}}/src/{{.}}"><i class="octicon octicon-check"></i>{{.}}</a></li>
                                {{end}}
                            </ul>
                            <ul class="menu menu-vertical switching-list" id="repo-tag-list">
                                <li><a href="#"><i class="octicon octicon-check"></i>0.3.3</a></li>
                                <li><a href="#"><i class="octicon octicon-check"></i>0.4.4</a></li>
                                <li class="checked"><a href="#"><i class="octicon octicon-check"></i>0.1</a></li>
                                <li><a href="#"><i class="octicon octicon-check"></i>0.1 beta</a></li>
                            </ul>
                        </div>
                    </div>
                </li>
                <li id="repo-bread" class="breads">
                    <a class="title bread" href="{{.RepoLink}}">{{.Repository.Name}}</a>
                    {{ $n := len .Treenames}}
                    {{ $l := Subtract $n 1}}
                    {{range $i, $v := .Treenames}}
                        {{if eq $i $l}}
                        <span class="bread">{{$v}}</span>
                        {{else}}
                        <span class="bread"><a href="{{$.BranchLink}}/{{index $.Paths $i}}">{{$v}}</a></span>
                        {{end}}
                    {{end}}
                </li>
                <li id="repo-commits-jump" class="repo-jump right">
                    <a href="#">
                        <button class="btn btn-small btn-gray btn-radius"><i class="octicon octicon-git-commit"></i></button>
                    </a>
                </li>
                <li id="repo-find-jump" class="repo-jump right">
                    <a href="#">
                        <button class="btn btn-small btn-gray btn-radius"><i class="octicon octicon-list-unordered"></i></button>
                    </a>
                </li>
            </ul>
            {{if .IsFile}}
                {{template "repo/view_file" .}}
            {{else}}
                {{template "repo/view_list" .}}
            {{end}}
        </div>
        <div id="repo-sidebar" class="right grid-1-5">
            <ul class="menu menu-vertical" id="repo-sidebar-nav">
                <li>
                    <a class="radius" href="{{.RepoLink}}/issues"><i class="octicon octicon-issue-opened"></i>Issues<span class="num right label label-blue label-radius">{{.Repository.NumOpenIssues}}</span></a>
                </li>
                <li>
                    <a class="radius" href="{{.RepoLink}}/pulls"><i class="octicon octicon-git-pull-request"></i>Pull Requests<span class="num right label label-blue label-radius">{{.Repository.NumOpenPulls}}</span></a>
                </li>
                <li class="border-bottom"></li>
                <li class="head">{{if .IsViewBranch}}{{.BranchName}}{{else}}{{ShortSha .BranchName}}{{end}}</li>
                <li>
                    <a class="radius" href="{{.RepoLink}}/commits/{{.BranchName}}"><i class="octicon octicon-history"></i>Commits <span class="num right label label-gray label-radius">{{.CommitsCount}}</span></a>
                </li>
                <li>
                    <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>
                </li>
                <li>
                    <a class="radius" href="{{.RepoLink}}/releases"><i class="octicon octicon-tag"></i>Releases <span class="num right label label-gray label-radius">{{.Repository.NumTags}}</span></a>
                </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>
                <li class="border-bottom"></li>
                <li>
                    <a class="radius" href="{{.RepoLink}}/settings"><i class="octicon octicon-tools"></i>settings</a>
                </li>
            </ul>
        </div>
    </div>
</div>
{{template "ng/base/footer" .}}