hexo-theme-keep/layout/_partial/header.ejs

55 lines
2.1 KiB
Plaintext
Raw Normal View History

<header class="header-wrapper">
2020-12-25 17:50:22 +08:00
<div class="header-content<%- (theme.style.first_screen.enable === true && is_home() && !page.prev) ? ' has-first-screen' : '' %>">
<div class="left">
<a class="logo-title" href="/">
<%= theme.base_info.title || config.title || 'Keep theme' %>
</a>
</div>
2020-04-01 10:59:51 +08:00
<div class="right">
<div class="pc">
<ul class="menu-list">
<% for (let i in theme.menu) { %>
<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>
<% } %>
<% if (theme.local_search.enable === true) { %>
<li class="menu-item search search-popup-trigger">
<i class="fas fa-search"></i>
</li>
<% } %>
</ul>
</div>
<div class="mobile">
<% if (theme.local_search.enable === true) { %>
<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>
</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>
<% } %>
</ul>
</div>
<div class="window-mask"></div>
</header>