forked from TruthHun/BookStack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.html
More file actions
110 lines (106 loc) · 6.67 KB
/
header.html
File metadata and controls
110 lines (106 loc) · 6.67 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<header class="navbar navbar-static-top navbar-fixed-top manual-header" role="banner">
<div class="container">
<div class="navbar-header col-sm-12 col-md-7 col-lg-6">
<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">
<li>
<a href="{{urlfor "HomeController.Index"}}" class="visible-xs" title="首页"><i class="fa fa-home"></i> 首页</a>
</li>
<li>
<a href="{{urlfor "LabelController.List"}}" class="visible-xs" title="标签"><i class="fa fa-tags"></i> 标签</a>
</li>
<li><a href="https://github.com/TruthHun/BookStack" title="BookStack开源" target="_blank"><i class="fa fa-github"></i> 开源</a></li>
{{if gt .Member.MemberId 0}}
<li>
<a href="{{urlfor "SettingController.Index"}}" title="个人中心"><i class="fa fa-user-o" aria-hidden="true"></i> 个人中心</a>
</li>
<li>
<a href="{{urlfor "SettingController.Star"}}" title="我的收藏"><i class="fa fa-heart-o" aria-hidden="true"></i> 我的收藏</a>
</li>
<li>
<a href="{{urlfor "BookController.Index"}}" title="我的项目"><i class="fa fa-book" aria-hidden="true"></i> 我的项目</a>
</li>
<li>
<a href="{{urlfor "SettingController.Qrcode"}}" title="我的二维码"><i class="fa fa-qrcode" aria-hidden="true"></i> 我的二维码</a>
</li>
{{if eq .Member.Role 0 }}
<li>
<a href="{{urlfor "ManagerController.Index"}}" title="管理后台"><i class="fa fa-university" aria-hidden="true"></i> 管理后台</a>
</li>
{{end}}
<li>
<a href="{{urlfor "AccountController.Logout"}}" title="退出登录"><i class="fa fa-sign-out"></i> 退出登录</a>
</li>
{{else}}
<li><a href="{{urlfor "AccountController.Oauth" ":oauth" "email"}}" title="注册"><i class="fa fa-user-plus"></i> 注册</a></li>
<li><a href="{{urlfor "AccountController.Login"}}" title="登录"><i class="fa fa-sign-in"></i> 登录</a></li>
{{end}}
</ul>
</div>
<a href="/" class="navbar-brand" title="{{.SITE_NAME}}">
<img class="logo" src="/static/images/logo.png" alt="{{.SITE_NAME}}">
</a>
<nav class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li {{if .IsHome}}class="active"{{end}}>
<a href="{{urlfor "HomeController.Index" }}" title="首页">首页</a>
</li>
<li class="{{if .IsLabel}}active{{end}}">
<a href="{{urlfor "LabelController.List" }}" title="标签">标签</a>
</li>
<li><a href="https://github.com/TruthHun/BookStack" title="BookStack开源" target="_blank">开源</a></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">
<input class="form-control" name="keyword" type="search" style="width: 170px;" placeholder="请输入关键词..." value="{{.Keyword}}">
<button class="search-btn">
<i class="fa fa-search"></i>
</button>
</form>
</div>
</nav>
</div>
<nav class="navbar-collapse hidden-xs hidden-sm" role="navigation">
<ul class="nav navbar-nav navbar-right">
{{if gt .Member.MemberId 0}}
<li>
<div class="img user-info" data-toggle="dropdown">
<img onerror="this.src='/static/images/avatar.png'" src="{{showImg .Member.Avatar "avatar"}}" class="img-circle userbar-avatar border" alt="{{.Member.Nickname}}">
<div class="userbar-content">
<span>{{.Member.Nickname}}</span>
<div>{{.Member.RoleName}}</div>
</div>
<i class="fa fa-chevron-down" aria-hidden="true"></i>
</div>
<ul class="dropdown-menu user-info-dropdown" role="menu">
<li>
<a href="{{urlfor "SettingController.Index"}}" title="个人中心"><i class="fa fa-user-o" aria-hidden="true"></i> 个人中心</a>
</li>
<li>
<a href="{{urlfor "SettingController.Star"}}" title="我的收藏"><i class="fa fa-heart-o" aria-hidden="true"></i> 我的收藏</a>
</li>
<li>
<a href="{{urlfor "BookController.Index"}}" title="我的项目"><i class="fa fa-book" aria-hidden="true"></i> 我的项目</a>
</li>
<li>
<a href="{{urlfor "SettingController.Qrcode"}}" title="我的二维码"><i class="fa fa-qrcode" aria-hidden="true"></i> 我的二维码</a>
</li>
{{if eq .Member.Role 0 1}}
<li>
<a href="{{urlfor "ManagerController.Index"}}" title="管理后台"><i class="fa fa-university" aria-hidden="true"></i> 管理后台</a>
</li>
{{end}}
<li>
<a href="{{urlfor "AccountController.Logout"}}" title="退出登录"><i class="fa fa-sign-out"></i> 退出登录</a>
</li>
</ul>
</li>
{{else}}
<li><a href="{{urlfor "AccountController.Oauth" ":oauth" "email"}}" title="注册"><i class="fa fa-user-plus"></i> 注册</a></li>
<li><a href="{{urlfor "AccountController.Login"}}" title="登录"><i class="fa fa-sign-in"></i> 登录</a></li>
{{end}}
</ul>
</nav>
</div>
</header>