summaryrefslogtreecommitdiffstats
path: root/templates/repo/header.tmpl
blob: 5e9c3ea2db09863a84597902c335d79c60e514c0 (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
<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 if .Repository.IsMirror}}repo-clone{{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>
            {{if .Repository.IsMirror}}<span class="label label-gray">{{.i18n.Tr "mirror"}}</span>{{end}}
        </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 target="_blank" href="http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository">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>