2022-09-27 17:52:45 +08:00
|
|
|
<%
|
|
|
|
const { title: bi_title, logo_img: bi_logo_img } = theme.base_info
|
|
|
|
const { logo: s_logo, first_screen: s_first_screen } = theme.style
|
|
|
|
const { enable: s_fs_enable, header_transparent: s_fs_header_transparent } = s_first_screen
|
|
|
|
const { title: config_title } = config
|
2022-10-27 15:06:16 +08:00
|
|
|
const { enable: local_search_enable } = theme.local_search
|
2022-09-27 17:52:45 +08:00
|
|
|
%>
|
2022-10-11 16:32:11 +08:00
|
|
|
<header class="header-wrapper<%= s_fs_enable === true && is_home() && s_fs_header_transparent ? ' transparent-1' : '' %>">
|
2022-09-23 14:51:16 +08:00
|
|
|
|
2022-09-27 17:52:45 +08:00
|
|
|
<div class="header-content<%- (s_fs_enable === true && is_home() && !page.prev) ? ' has-first-screen' : '' %>">
|
2020-12-24 21:16:31 +08:00
|
|
|
<div class="left">
|
2022-09-26 14:19:12 +08:00
|
|
|
<% if (s_logo || bi_logo_img) { %>
|
2021-04-29 11:41:20 +08:00
|
|
|
<a class="logo-image" href="/">
|
2022-09-26 14:19:12 +08:00
|
|
|
<%- image_tag(s_logo || bi_logo_img) %>
|
2021-04-29 11:41:20 +08:00
|
|
|
</a>
|
|
|
|
<% } %>
|
2020-12-24 21:16:31 +08:00
|
|
|
<a class="logo-title" href="/">
|
2022-09-26 14:19:12 +08:00
|
|
|
<%= bi_title || config_title || 'Keep Theme' %>
|
2020-12-24 21:16:31 +08:00
|
|
|
</a>
|
|
|
|
</div>
|
2020-04-01 10:59:51 +08:00
|
|
|
|
2020-12-24 21:16:31 +08:00
|
|
|
<div class="right">
|
|
|
|
<div class="pc">
|
|
|
|
<ul class="menu-list">
|
2022-10-27 15:06:16 +08:00
|
|
|
<% for (const i in theme.menu) { %>
|
2020-12-24 21:16:31 +08:00
|
|
|
<li class="menu-item">
|
|
|
|
<a class="<%- isInHomePaging(page.path, theme.menu[i]) ? 'active' : is_current(theme.menu[i]) ? 'active' : '' %>"
|
|
|
|
href="<%- url_for(theme.menu[i]) %>"
|
|
|
|
>
|
|
|
|
<%= __(i.toLowerCase()).toUpperCase() %>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<% } %>
|
2022-10-27 15:06:16 +08:00
|
|
|
<% if (local_search_enable === true) { %>
|
2020-12-24 21:16:31 +08:00
|
|
|
<li class="menu-item search search-popup-trigger">
|
|
|
|
<i class="fas fa-search"></i>
|
|
|
|
</li>
|
|
|
|
<% } %>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<div class="mobile">
|
2022-10-27 15:06:16 +08:00
|
|
|
<% if (local_search_enable === true) { %>
|
2020-12-24 21:16:31 +08:00
|
|
|
<div class="icon-item search search-popup-trigger"><i class="fas fa-search"></i></div>
|
|
|
|
<% } %>
|
|
|
|
<div class="icon-item menu-bar">
|
|
|
|
<div class="menu-bar-middle"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-04-01 10:14:18 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="header-drawer">
|
|
|
|
<ul class="drawer-menu-list">
|
2020-04-01 10:59:51 +08:00
|
|
|
<% for (let i in theme.menu) { %>
|
2020-12-01 16:51:38 +08:00
|
|
|
<li class="drawer-menu-item flex-center">
|
2020-04-01 22:42:24 +08:00
|
|
|
<a class="<%- isInHomePaging(page.path, theme.menu[i]) ? 'active' : is_current(theme.menu[i]) ? 'active' : '' %>"
|
|
|
|
href="<%- url_for(theme.menu[i]) %>"><%= __(i.toLowerCase()).toUpperCase() %></a>
|
2020-04-01 10:59:51 +08:00
|
|
|
</li>
|
|
|
|
<% } %>
|
2020-04-01 10:14:18 +08:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="window-mask"></div>
|
|
|
|
|
|
|
|
</header>
|
|
|
|
|