{{define "header"}}<!DOCTYPE html>
<html lang="zh-CN">
 <head>
{{template "head" .}}
</head>
  <body id="{{.PageId}}" class="{{if .OnlyCover}}wenku-onlycover{{end}}">



  	<div class="container-fluid wenku-header">
  		<div class="container">
			<div class="col-xs-6">
				<a href="/" title="{{.Sys.Site}}">
					<img alt="{{.Sys.Site}}" class="wenku-logo" src="{{.TplStatic}}/img/logo.png"/>
				</a>
			</div>
			<div class="col-xs-6">
				<form class="pull-right" action="/search" target="_blank" method="get" role="search">
					<div class="input-group input-group-lg">
						<input type="text" required="required" name="wd" placeholder="请输入搜索关键字" class="form-control">
						<span class="input-group-btn"><button type="submit" class="btn btn-default">文库搜索</button></span>
					</div>
				</form>
			</div>
	  	</div>
  	</div>


    <nav class="navbar navbar-default navbar-inverse visible-mobile" role="navigation">
        <div class="container-fluid">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse"
                        data-target="#example-navbar-collapse">
                    <span class="sr-only">切换导航</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                {{/*<a class="navbar-brand" href="#"></a>*/}}
            </div>
            <div class="collapse navbar-collapse" id="example-navbar-collapse">
                <ul class="nav navbar-nav">
                    <li {{if .IsHome}}class="active"{{end}}><a href="/">首页</a></li>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            频道 <b class="caret"></b>
                        </a>
                        <ul class="dropdown-menu">
                            {{range .Chanels}}
                                <li {{if Equal $.Chanel .Alias}}class="active"{{end}}><a href="/list/{{.Alias}}">{{.Title}}</a></li>
                            {{end}}
                        </ul>
                    </li>
                </ul>
                <ul class="nav navbar-nav navbar-right">
                    {{/*<li {{if .IsUpload}}class="active"{{end}}><a href="/upload"><span class="fa fa-upload"></span> 上传文档</a></li>*/}}
                    <li {{if .IsUser}}class="active"{{end}}><a href="/user"><span class="fa fa-user"></span> 会员中心</a></li>
                </ul>
            </div>
        </div>
    </nav>

	<nav class="container-fluid navbar-inverse navbar navbar-default hidden-mobile" role="navigation">
		<div class="container">
			<ul class="nav navbar-nav">
				<li {{if .IsHome}}class="active"{{end}}><a href="/">首页</a></li>
				{{range .Chanels}}
				<li {{if Equal $.Chanel .Alias}}class="active"{{end}}><a href="/list/{{.Alias}}">{{.Title}}</a></li>
				{{end}}
			</ul>
			 <ul class="nav navbar-nav navbar-right">
		      <li {{if .IsUpload}}class="active"{{end}}><a href="/upload"><span class="fa fa-upload"></span> 上传文档</a></li>
		      <li {{if .IsUser}}class="active"{{end}}><a href="/user"><span class="fa fa-user"></span> 会员中心</a></li>
		    </ul>
		</div>
	</nav>
{{end}}
