hexo-theme-stellar/layout/categories.ejs

24 lines
770 B
Plaintext
Executable File

<%
page.robots = 'noindex,follow';
if (page.menu_id == undefined) {
page.menu_id = 'post';
}
%>
<% if (site.categories.length) { %>
<% page.title = __('btn.categories'); %>
<% page.layout = 'categories'; %>
<%- partial('_partial/main/navbar/nav_tabs_blog') %>
<div class='post-list'>
<article class='<%- scrollreveal("") %>' 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'><%- icon('default:category') %><%- category.name %></span>
<span class='badge'>(<%- category.posts.length %>)</span>
</a>
</div>
<% }) %>
</article>
</div>
<% } %>