<%#
  @param author 作者
  @param keywords 关键字
  @param description 描述
  @param title 网站标题
  @param loadPostCss 是否加载 markdown preview 样式
  @param hideHeader 是否隐藏 header
%>
<!doctype html>
<html lang="en">
<head>
  <%
    locals.metas.map(item => {
      %><meta name="<%=item.name %>" content="<%=item.content %>" /><%
    })
  %>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <%#动态 keywords、description、author %>
  <meta name="author" content="<%=locals.author %>">
  <meta name="keywords" content="<%=locals.keywords %>" >
  <meta name="description" content="<%=locals.description %>">
  <%#动态标题 %>
  <title><%=locals.title %></title>
  <% if(locals.loadPostCss) { %>
  <link rel="stylesheet" href="/static/editor.md/css/editormd.preview.min.css">
  <link rel="stylesheet" href="/static/editor.md/css/google_code_prettify_themes/atelier-dune-light.min.css">
  <% } %>
  <link rel="stylesheet" href="/css/iconfont.min.css">
  <link rel="stylesheet" href="/css/main.min.css">
  <!--[if lt IE 9]>
  <script src="http://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
  <style>
    article,aside,dialog,footer,header,section,footer,nav,figure,menu{display:block}
  </style>
  <![endif]-->
</head>
<body>
<%-include('./aside') %>
<% if(!locals.hideHeader) { %>
<header class="header">
  <div class="content-wrapper">
    <a href="/" class="logo">
      <%#根据时间分钟显示 logo %>
      <img src="/img/logo_<%=new Date().getMinutes() % 11 + 1 %>.png" alt="<%=locals.title %>">
    </a>
    <h1 class="title"><%=locals.siteName %></h1>
    <nav class="nav">
      <i class="switch iconfont icon-switch"></i>
      <ul class="menu">
        <li class="menu-item"><a href="/"><i class="iconfont icon-homepage_fill"></i>首页</a></li>
        <li class="menu-item"><a href="/search"><i class="iconfont icon-searchfill"></i>搜索</a></li>
        <li class="menu-item"><a href="/category"><i class="iconfont icon-manage_fill"></i>分类</a></li>
        <li class="menu-item"><a href="<%=locals.aboutPageUrl %>"><i class="iconfont icon-people_fill"></i>关于</a></li>
      </ul>
    </nav>
  </div>
</header>
<% } %>