<!DOCTYPE html>
<html lang="<%= config.language %>">

<%
var subtitle = page.subtitle || page.title
var banner_img = page.banner_img || theme.index.banner_img
var banner_img_height = page.banner_img_height || theme.index.banner_img_height
var banner_mask_alpha = page.banner_mask_alpha || theme.index.banner_mask_alpha
%>

<%- partial('_partial/head') %>

<body>
  <header style="height: <%- banner_img_height %>vh;">

  <!-- 顶部提示 -->
  <div class="alert alert-warning" role="alert"
    style="margin-top: 70px; background-color: black;color: rgb(156, 255, 25);text-align: center;padding: 0 0 0 0;">
    <strong>提示：本站一些文章的超时空时间是乱写的，主要是为了排序，并不是真实写作时间。</strong>
  </div>

    <%- partial('_partial/nav') %>
    <div class="view intro-2" id="background" <%- theme.banner_parallax && 'parallax=true' %>
         style="background: url('<%- url_for(banner_img) %>') no-repeat center center;
           background-size: cover;">
      <div class="full-bg-img">
        <div class="mask flex-center" style="background-color: rgba(0, 0, 0, <%= parseFloat(banner_mask_alpha) %>)">
          <div class="container text-center white-text fadeInUp">
            <span class="h2" id="subtitle">
              <% if(theme.fun_features.typing.enable == false) { %>
                <%- subtitle %>
              <% } %>
            </span>

            <% if(is_post()) { %>
              <%- partial('_partial/post-meta') %>
            <% } %>
          </div>

          <% if (theme.scroll_down_arrow.enable && theme.scroll_down_arrow.banner_height_limit <= banner_img_height) { %>
            <div class="scroll-down-bar">
              <i class="iconfont icon-arrowdown"></i>
            </div>
          <% } %>
        </div>
      </div>
    </div>
  </header>

  <main>
    <% if(is_post() || page.layout == '404') { %>
      <%- body %>
    <% } else { %>

      <div class="container nopadding-md">
        <div class="py-5" style="border: 0px;outline: 1px solid rgb(204,204,204);" id="board"
          <%- banner_img_height >= 100 && theme.banner_parallax ? 'style=margin-top:0' : '' %>>
          <!-- <% if(page.layout == 'about') { %>
            <div class="about-avatar">
              <img src="<%- url_for(theme.about.avatar) %>"
                   class="img-fluid" alt="avatar">
            </div>
          <% } %> -->
          <div class="container">
            <div class="row">
              <div class="col-12 col-md-10 m-auto">
                <%- body %>
              </div>
            </div>
          </div>
        </div>
      </div>
    <% } %>
  </main>

  <% if (theme.scroll_top_arrow.enable) { %>
    <a id="scroll-top-button" href="#" role="button">
      <i class="iconfont icon-arrowup" aria-hidden="true"></i>
    </a>
  <% } %>

  <% if (theme.search.enable) { %>
    <%- partial('_partial/search') %>
  <% } %>

  <% if (theme.aplayer && theme.aplayer.enable && theme.aplayer.songs) { %>
    <!-- APlayer 音乐播放器 -->
    <div id="aplayer"></div>
    <%- partial('_partial/plugins/aplayer.ejs') %>
  <% } %>

  <% if (theme.custom_html) { %>
    <div class="col-lg-7 mx-auto nopadding-md">
      <div class="container custom mx-auto">
        <%- theme.custom_html %>
      </div>
    </div>
  <% } %>

  <%- partial('_partial/footer', { data: { 'subtitle': subtitle } }) %>

</body>
</html>