summaryrefslogtreecommitdiffstats
path: root/templates/repo/bare.tmpl
blob: 2a1409a6e8a5251fc126024bca2389621d554408 (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
{{template "ng/base/head" .}}
{{template "ng/base/header" .}}
<div id="repo-wrapper" class="repo-bare">
    <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="{{AppSubUrl}}/{{.Repository.Owner.Name}}">{{.Repository.Owner.Name}}</a>
                <span class="divider">/</span>
                <a class="repo text-bold" href="{{.RepoLink}}">{{.Repository.Name}}</a>
            </h1>
        </div>
    </div>
    <div id="repo-content" class="clear container">
        <div id="repo-bare">
            <div id="repo-bare-start" class="panel panel-radius">
                <div class="panel-header">
                    <a class="btn btn-small btn-black btn-header btn-radius right" href="{{.RepoLink}}/settings">{{.i18n.Tr "repo.settings"}}</a>
                    <strong>{{.i18n.Tr "repo.quick_guide"}}</strong>
                </div>
                <div class="panel-content">
                    <div id="repo-clone" class="clear text-center">
                        <h2>{{.i18n.Tr "repo.clone_this_repo"}}</h2>
                        <button class="btn btn-blue current left btn-left-radius" id="repo-clone-ssh" data-link="{{.CloneLink.SSH}}">SSH</button>
                        <button class="btn btn-gray left" id="repo-clone-https" data-link="{{.CloneLink.HTTPS}}">HTTPS</button>
                        <input id="repo-clone-url" type="text" class="ipt ipt-disabled left" value="{{.CloneLink.SSH}}" readonly />
                        <button class="btn btn-black left btn-right-radius" id="repo-clone-copy" data-copy-val="val" data-copy-from="#repo-clone-url">{{.i18n.Tr "repo.copy_link"}}</button>
                        <p class="text-center" id="repo-clone-help">{{.i18n.Tr "repo.clone_helper" | Str2html}}</p>
                        <hr/>
                    </div>
                    <div id="repo-bare-cmd" class="text-center">
                        <h2>{{.i18n.Tr "repo.create_new_repo_command"}}</h2>
                        <pre class="text-left radius"><code>touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin <span class="clone-url">{{.CloneLink.SSH}}</span>
git push -u origin master</code></pre>
                        <br/>
                        <hr/>
                    </div>
                    <div id="repo-bare-remote" class="text-center">
                        <h2>{{.i18n.Tr "repo.push_exist_repo"}}</h2>
                        <pre class="text-left radius"><code>git remote add origin <span class="clone-url">{{.CloneLink.SSH}}</span>
git push -u origin master</code></pre>
                        <br/>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{{template "ng/base/footer" .}}