2017-04-20 18:19:32 +08:00
|
|
|
<header class="navbar navbar-static-top navbar-fixed-top manual-header" role="banner">
|
|
|
|
<div class="container">
|
2018-01-27 10:56:23 +08:00
|
|
|
<div class="navbar-header col-sm-12 col-md-9 col-lg-8">
|
2018-03-13 14:14:56 +08:00
|
|
|
<a href="{{.BaseUrl}}/" class="navbar-brand" title="{{.SITE_NAME}}">
|
2017-04-30 22:13:12 +08:00
|
|
|
{{if .SITE_TITLE}}
|
|
|
|
{{.SITE_TITLE}}
|
|
|
|
{{else}}
|
|
|
|
{{.SITE_NAME}}
|
|
|
|
{{end}}
|
|
|
|
</a>
|
2018-01-27 10:56:23 +08:00
|
|
|
<nav class="collapse navbar-collapse col-sm-10">
|
2017-07-10 14:54:59 +08:00
|
|
|
<ul class="nav navbar-nav">
|
2018-02-28 16:43:19 +08:00
|
|
|
<li {{if eq .ControllerName "HomeController"}}class="active"{{end}}>
|
2021-03-29 18:02:57 +08:00
|
|
|
<a href="{{urlfor "HomeController.Index" }}" title={{i18n .Lang "common.home"}}>{{i18n .Lang "common.home"}}</a>
|
2017-07-10 14:54:59 +08:00
|
|
|
</li>
|
2018-07-18 17:10:24 +08:00
|
|
|
<li {{if eq .ControllerName "BlogController"}}{{if eq .ActionName "List" "Index"}}class="active"{{end}}{{end}}>
|
2021-03-29 18:02:57 +08:00
|
|
|
<a href="{{urlfor "BlogController.List" }}" title={{i18n .Lang "common.blog"}}>{{i18n .Lang "common.blog"}}</a>
|
2018-07-13 19:04:51 +08:00
|
|
|
</li>
|
2018-11-20 20:36:14 +08:00
|
|
|
<li {{if eq .ControllerName "ItemsetsController"}}class="active"{{end}}>
|
2021-03-29 18:02:57 +08:00
|
|
|
<a href="{{urlfor "ItemsetsController.Index" }}" title={{i18n .Lang "common.project_space"}}>{{i18n .Lang "common.project_space"}}</a>
|
2017-07-10 14:54:59 +08:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<div class="searchbar pull-left visible-lg-inline-block visible-md-inline-block">
|
|
|
|
<form class="form-inline" action="{{urlfor "SearchController.Index"}}" method="get">
|
2021-03-29 18:02:57 +08:00
|
|
|
<input class="form-control" name="keyword" type="search" style="width: 230px;" placeholder="{{i18n .Lang "message.keyword_placeholder"}}" value="{{.Keyword}}">
|
2017-07-10 14:54:59 +08:00
|
|
|
<button class="search-btn">
|
|
|
|
<i class="fa fa-search"></i>
|
|
|
|
</button>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</nav>
|
2021-03-18 15:02:19 +08:00
|
|
|
<div style="display: inline-block;" class="navbar-mobile">
|
2021-03-29 18:02:57 +08:00
|
|
|
<a href="{{urlfor "HomeController.Index" }}" title={{i18n .Lang "common.home"}}>{{i18n .Lang "common.home"}}</a>
|
|
|
|
<a href="{{urlfor "BlogController.List" }}" title={{i18n .Lang "common.blog"}}>{{i18n .Lang "common.blog"}}</a>
|
2021-03-18 15:02:19 +08:00
|
|
|
</div>
|
2017-07-10 14:54:59 +08:00
|
|
|
|
2017-04-20 18:19:32 +08:00
|
|
|
<div class="btn-group dropdown-menu-right pull-right slidebar visible-xs-inline-block visible-sm-inline-block">
|
|
|
|
<button class="btn btn-default dropdown-toggle hidden-lg" type="button" data-toggle="dropdown"><i class="fa fa-align-justify"></i></button>
|
|
|
|
<ul class="dropdown-menu" role="menu">
|
2017-05-12 19:14:29 +08:00
|
|
|
{{if gt .Member.MemberId 0}}
|
|
|
|
<li>
|
2021-03-29 18:02:57 +08:00
|
|
|
<a href="{{urlfor "SettingController.Index"}}" title={{i18n .Lang "common.person_center"}}><i class="fa fa-user" aria-hidden="true"></i> {{i18n .Lang "common.person_center"}}</a>
|
2017-05-12 19:14:29 +08:00
|
|
|
</li>
|
|
|
|
<li>
|
2021-03-29 18:02:57 +08:00
|
|
|
<a href="{{urlfor "BookController.Index"}}" title={{i18n .Lang "common.my_project"}}><i class="fa fa-book" aria-hidden="true"></i> {{i18n .Lang "common.my_project"}}</a>
|
2017-05-12 19:14:29 +08:00
|
|
|
</li>
|
2018-07-13 19:04:51 +08:00
|
|
|
<li>
|
2021-03-29 18:02:57 +08:00
|
|
|
<a href="{{urlfor "BlogController.ManageList"}}" title={{i18n .Lang "common.my_blog"}}><i class="fa fa-file" aria-hidden="true"></i> {{i18n .Lang "common.my_blog"}}</a>
|
2018-07-13 19:04:51 +08:00
|
|
|
</li>
|
2017-05-12 19:14:29 +08:00
|
|
|
{{if eq .Member.Role 0 }}
|
|
|
|
<li>
|
2021-03-29 18:02:57 +08:00
|
|
|
<a href="{{urlfor "ManagerController.Index"}}" title={{i18n .Lang "common.manage"}}><i class="fa fa-university" aria-hidden="true"></i> {{i18n .Lang "common.manage"}}</a>
|
2017-05-12 19:14:29 +08:00
|
|
|
</li>
|
|
|
|
{{end}}
|
|
|
|
<li>
|
2021-03-29 18:02:57 +08:00
|
|
|
<a href="{{urlfor "AccountController.Logout"}}" title={{i18n .Lang "common.logout"}}><i class="fa fa-sign-out"></i> {{i18n .Lang "common.logout"}}</a>
|
2017-05-12 19:14:29 +08:00
|
|
|
</li>
|
2017-05-20 09:52:18 +08:00
|
|
|
|
2017-05-12 19:14:29 +08:00
|
|
|
{{else}}
|
2021-03-29 18:02:57 +08:00
|
|
|
<li><a href="{{urlfor "AccountController.Login"}}" title={{i18n .Lang "common.login"}}>{{i18n .Lang "common.login"}}</a></li>
|
2017-05-12 14:21:29 +08:00
|
|
|
{{end}}
|
2017-04-20 18:19:32 +08:00
|
|
|
</ul>
|
|
|
|
</div>
|
2017-05-12 14:21:29 +08:00
|
|
|
|
2017-04-20 18:19:32 +08:00
|
|
|
</div>
|
|
|
|
<nav class="navbar-collapse hidden-xs hidden-sm" role="navigation">
|
|
|
|
<ul class="nav navbar-nav navbar-right">
|
2017-04-30 22:13:12 +08:00
|
|
|
{{if gt .Member.MemberId 0}}
|
2017-04-20 18:19:32 +08:00
|
|
|
<li>
|
|
|
|
<div class="img user-info" data-toggle="dropdown">
|
2018-01-26 18:07:55 +08:00
|
|
|
<img src="{{cdnimg .Member.Avatar}}" onerror="this.src='{{cdnimg "/static/images/headimgurl.jpg"}}';" class="img-circle userbar-avatar" alt="{{.Member.Account}}">
|
2017-04-20 18:19:32 +08:00
|
|
|
<div class="userbar-content">
|
2017-04-24 18:25:17 +08:00
|
|
|
<span>{{.Member.Account}}</span>
|
2023-01-29 14:22:36 +08:00
|
|
|
<div>{{i18n .Lang .Member.RoleName}}</div>
|
2017-04-20 18:19:32 +08:00
|
|
|
</div>
|
|
|
|
<i class="fa fa-chevron-down" aria-hidden="true"></i>
|
|
|
|
</div>
|
|
|
|
<ul class="dropdown-menu user-info-dropdown" role="menu">
|
|
|
|
<li>
|
2021-03-29 18:02:57 +08:00
|
|
|
<a href="{{urlfor "SettingController.Index"}}" title={{i18n .Lang "common.person_center"}}><i class="fa fa-user" aria-hidden="true"></i> {{i18n .Lang "common.person_center"}}</a>
|
2017-04-20 18:19:32 +08:00
|
|
|
</li>
|
|
|
|
<li>
|
2021-03-29 18:02:57 +08:00
|
|
|
<a href="{{urlfor "BookController.Index"}}" title={{i18n .Lang "common.my_project"}}><i class="fa fa-book" aria-hidden="true"></i> {{i18n .Lang "common.my_project"}}</a>
|
2017-04-20 18:19:32 +08:00
|
|
|
</li>
|
2018-07-13 19:04:51 +08:00
|
|
|
<li>
|
2021-03-29 18:02:57 +08:00
|
|
|
<a href="{{urlfor "BlogController.ManageList"}}" title={{i18n .Lang "common.my_blog"}}><i class="fa fa-file" aria-hidden="true"></i> {{i18n .Lang "common.my_blog"}}</a>
|
2018-07-13 19:04:51 +08:00
|
|
|
</li>
|
2017-05-25 18:18:43 +08:00
|
|
|
{{if eq .Member.Role 0 1}}
|
2017-04-20 18:19:32 +08:00
|
|
|
<li>
|
2021-03-29 18:02:57 +08:00
|
|
|
<a href="{{urlfor "ManagerController.Index"}}" title={{i18n .Lang "common.manage"}}><i class="fa fa-university" aria-hidden="true"></i> {{i18n .Lang "common.manage"}}</a>
|
2017-04-20 18:19:32 +08:00
|
|
|
</li>
|
2017-04-24 18:25:17 +08:00
|
|
|
{{end}}
|
2017-04-20 18:19:32 +08:00
|
|
|
<li>
|
2021-03-29 18:02:57 +08:00
|
|
|
<a href="{{urlfor "AccountController.Logout"}}" title={{i18n .Lang "common.logout"}}><i class="fa fa-sign-out"></i> {{i18n .Lang "common.logout"}}</a>
|
2017-04-20 18:19:32 +08:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
2017-04-30 22:13:12 +08:00
|
|
|
{{else}}
|
2021-03-29 18:02:57 +08:00
|
|
|
<li><a href="{{urlfor "AccountController.Login"}}" title={{i18n .Lang "common.login"}}>{{i18n .Lang "common.login"}}</a></li>
|
2017-04-30 22:13:12 +08:00
|
|
|
{{end}}
|
2017-04-20 18:19:32 +08:00
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
</div>
|
2021-03-29 18:02:57 +08:00
|
|
|
</header>
|