2014-07-26 09:54:27 +05:30
|
|
|
<header id="header">
|
|
|
|
<ul class="menu menu-line container" id="header-nav">
|
|
|
|
{{if not .PageIsHome}}
|
|
|
|
<li class="head" id="header-nav-logo">
|
2014-09-14 23:05:22 +05:30
|
|
|
<img src="{{AppRootSubUrl}}/img/favicon.png" alt="avatar" class="avatar-30"/>
|
2014-07-26 09:54:27 +05:30
|
|
|
</li>
|
|
|
|
<li {{if .PageIsDashboard}}class="current"{{end}}>
|
2014-09-14 23:05:22 +05:30
|
|
|
<a href="{{AppRootSubUrl}}/">{{if .IsSigned}}{{.i18n.Tr "dashboard"}}{{else}}{{.i18n.Tr "home"}}{{end}}</a>
|
2014-07-26 09:54:27 +05:30
|
|
|
</li>
|
2014-09-14 23:05:22 +05:30
|
|
|
<li><a href="{{AppRootSubUrl}}/explore">{{.i18n.Tr "explore"}}</a></li>
|
2014-07-26 09:54:27 +05:30
|
|
|
<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">
|
2014-09-14 23:05:22 +05:30
|
|
|
<a href="{{AppRootSubUrl}}/user/logout" title="{{.i18n.Tr "sign_out"}}"><i class="octicon octicon-sign-out"></i></a>
|
2014-07-26 09:54:27 +05:30
|
|
|
</li>
|
|
|
|
<li class="right {{if .PageIsUserSettings}}current{{end}}">
|
2014-09-14 23:05:22 +05:30
|
|
|
<a href="{{AppRootSubUrl}}/user/settings" title="{{.i18n.Tr "account_settings"}}"><i class="octicon octicon-settings"></i></a>
|
2014-07-26 09:54:27 +05:30
|
|
|
</li>
|
|
|
|
{{if .IsAdmin}}
|
2014-08-28 19:59:00 +05:30
|
|
|
<li class="right {{if .PageIsAdmin}}current{{end}}">
|
2014-09-14 23:05:22 +05:30
|
|
|
<a href="{{AppRootSubUrl}}/admin" title="{{.i18n.Tr "admin_panel"}}"><i class="octicon octicon-circuit-board"></i></a>
|
2014-07-26 09:54:27 +05:30
|
|
|
</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">
|
2014-09-14 23:05:22 +05:30
|
|
|
<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>
|
2014-07-26 09:54:27 +05:30
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
<li class="right" id="header-nav-user">
|
2014-09-14 23:05:22 +05:30
|
|
|
<a href="{{AppRootSubUrl}}/{{.SignedUser.Name}}" class="text-bold">
|
2014-07-26 09:54:27 +05:30
|
|
|
<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> {{.i18n.Tr "help"}}</a>
|
|
|
|
</li>
|
|
|
|
<li class="right" id="header-nav-explore">
|
2014-09-14 23:05:22 +05:30
|
|
|
<a href="{{AppRootSubUrl}}/explore"><i class="octicon octicon-globe"></i> {{.i18n.Tr "explore"}}</a>
|
2014-07-26 09:54:27 +05:30
|
|
|
</li>
|
|
|
|
{{else}}
|
|
|
|
<li class="right" id="header-nav-sign-in">
|
2014-09-14 23:05:22 +05:30
|
|
|
<a href="{{AppRootSubUrl}}/user/login" title="Sign In"><i class="octicon octicon-sign-in"></i> {{.i18n.Tr "sign_in"}}</a>
|
2014-07-26 09:54:27 +05:30
|
|
|
</li>
|
|
|
|
<li class="right">
|
2014-09-14 23:05:22 +05:30
|
|
|
<a href="{{AppRootSubUrl}}/user/sign_up" title="Account Settings"><i class="octicon octicon-person-add"></i> {{.i18n.Tr "register"}}</a>
|
2014-07-26 09:54:27 +05:30
|
|
|
</li>
|
|
|
|
{{end}}
|
|
|
|
{{end}}
|
|
|
|
</ul>
|
|
|
|
</header>
|