aboutsummaryrefslogtreecommitdiffstats
path: root/templates/ng/base/header.tmpl
blob: af3bc02f9331572f40891946dfba0640835a9bfb (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
<header id="header">
    <ul class="menu menu-line container" id="header-nav">
        {{if not .PageIsHome}}
        <li class="head" id="header-nav-logo">
            <img src="{{AppRootSubUrl}}/img/favicon.png" alt="avatar" class="avatar-30"/>
        </li>
        <li {{if .PageIsDashboard}}class="current"{{end}}>
            <a href="{{AppRootSubUrl}}/">{{if .IsSigned}}{{.i18n.Tr "dashboard"}}{{else}}{{.i18n.Tr "home"}}{{end}}</a>
        </li>
        <li><a href="{{AppRootSubUrl}}/explore">{{.i18n.Tr "explore"}}</a></li>
        <li><a target="_blank" href="http://gogs.io/docs">{{.i18n.Tr "help"}}</a></li>
        {{end}}

        {{if .IsSigned}}
        <li class="right" id="header-nav-sign-out">
            <a href="{{AppRootSubUrl}}/user/logout" title="{{.i18n.Tr "sign_out"}}"><i class="octicon octicon-sign-out"></i></a>
        </li>
        <li class="right {{if .PageIsUserSettings}}current{{end}}">
            <a href="{{AppRootSubUrl}}/user/settings" title="{{.i18n.Tr "account_settings"}}"><i class="octicon octicon-settings"></i></a>
        </li>
            {{if .IsAdmin}}
            <li class="right {{if .PageIsAdmin}}current{{end}}">
                <a href="{{AppRootSubUrl}}/admin" title="{{.i18n.Tr "admin_panel"}}"><i class="octicon octicon-circuit-board"></i></a>
            </li>
            {{end}}
        <li class="right down">
            <a href="#"><i class="octicon octicon-plus"></i></a>
            <ul class="menu menu-down" id="header-new-repo-menu">
                <li><a href="{{AppRootSubUrl}}/repo/create"><i class="octicon octicon-repo-create"></i>{{.i18n.Tr "new_repo"}}</a></li>
                <li><a href="{{AppRootSubUrl}}/repo/migrate"><i class="octicon octicon-repo-clone"></i>{{.i18n.Tr "new_migrate"}}</a></li>
                <li><a href="{{AppRootSubUrl}}/org/create"><i class="octicon octicon-organization"></i>{{.i18n.Tr "new_org"}}</a></li>
            </ul>
        </li>
        <li class="right" id="header-nav-user">
            <a href="{{AppRootSubUrl}}/{{.SignedUser.Name}}" class="text-bold">
                <img src="{{.SignedUser.AvatarLink}}" alt="user-avatar" class="avatar-30"/>
                {{.SignedUser.Name}}
            </a>
        </li>
        {{else}}
            {{if .PageIsHome}}
            <li class="right" id="header-nav-help">
                <a target="_blank" href="http://gogs.io/docs"><i class="octicon octicon-info"></i>&nbsp;&nbsp;{{.i18n.Tr "help"}}</a>
            </li>
            <li class="right" id="header-nav-explore">
                <a href="{{AppRootSubUrl}}/explore"><i class="octicon octicon-globe"></i>&nbsp;&nbsp;{{.i18n.Tr "explore"}}</a>
            </li>
            {{else}}
            <li class="right" id="header-nav-sign-in">
                <a href="{{AppRootSubUrl}}/user/login" title="Sign In"><i class="octicon octicon-sign-in"></i> {{.i18n.Tr "sign_in"}}</a>
            </li>
            <li class="right">
                <a href="{{AppRootSubUrl}}/user/sign_up" title="Account Settings"><i class="octicon octicon-person-add"></i> {{.i18n.Tr "register"}}</a>
            </li>
            {{end}}
        {{end}}
    </ul>
</header>