2021-02-19 23:33:19 +08:00
|
|
|
<%
|
2021-02-21 13:44:11 +08:00
|
|
|
page.robots = 'noindex,follow';
|
2021-02-21 03:13:21 +08:00
|
|
|
if (page.menu_id == undefined) {
|
|
|
|
page.menu_id = 'post';
|
2021-02-19 23:33:19 +08:00
|
|
|
}
|
|
|
|
%>
|
|
|
|
<% if (site.categories.length) { %>
|
|
|
|
<% page.title = __('btn.categories'); %>
|
|
|
|
<% page.layout = 'categories'; %>
|
2021-02-20 13:09:41 +08:00
|
|
|
<%- partial('_partial/main/navbar/list_post') %>
|
2021-02-19 23:33:19 +08:00
|
|
|
<div class='post-list'>
|
|
|
|
<div class='list-title'><%- __('page.categories', site.categories.length) %></div>
|
|
|
|
<article class='post-card reveal' id='cats'>
|
|
|
|
<% site.categories.sort('path').each(function(category){ %>
|
|
|
|
<div>
|
|
|
|
<a class="<%= category.parent ? 'cat child' : 'cat'%>" href="<%= url_for(category.path) %>">
|
|
|
|
<span class='name'><%- category.name %></span>
|
|
|
|
<span class='badge'>(<%- category.posts.length %>)</span>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<% }) %>
|
|
|
|
</article>
|
|
|
|
</div>
|
|
|
|
<% } %>
|