2020-03-22 20:31:13 +08:00
|
|
|
<script>
|
|
|
|
/**
|
|
|
|
* 折叠左侧栏
|
|
|
|
*/
|
|
|
|
let isOpenLeftSide = true;
|
|
|
|
const foldLeftSide = () => {
|
|
|
|
document.querySelector('.page-left').style.display = isOpenLeftSide ? 'none' : 'block';
|
|
|
|
document.querySelector('.page-right').style.width = isOpenLeftSide ? '100%' : '<%= theme.page.right_side_width + '%' %>';
|
|
|
|
isOpenLeftSide = !isOpenLeftSide;
|
|
|
|
};
|
|
|
|
</script>
|
2020-03-21 23:04:01 +08:00
|
|
|
<nav class="nav">
|
2020-03-22 20:31:13 +08:00
|
|
|
<button class="fold-left-side-btn"
|
|
|
|
onclick="foldLeftSide()"
|
|
|
|
>
|
2020-03-21 23:04:01 +08:00
|
|
|
<i class="fa fa-bars"></i>
|
2020-03-22 20:31:13 +08:00
|
|
|
</button>
|
2020-03-14 16:17:04 +08:00
|
|
|
<ul class="menu-list">
|
|
|
|
<% for (let i in theme.menu) { %>
|
|
|
|
<li class="menu-item">
|
2020-03-25 12:27:44 +08:00
|
|
|
<a class="<%- isInHomePaging(page.path, theme.menu[i]) ? 'current' : is_current(theme.menu[i]) ? 'current' : '' %>"
|
2020-03-21 23:04:01 +08:00
|
|
|
href="<%- url_for(theme.menu[i]) %>"><%= __(i.toLowerCase()) %></a>
|
2020-03-14 16:17:04 +08:00
|
|
|
</li>
|
|
|
|
<% } %>
|
|
|
|
</ul>
|
|
|
|
</nav>
|