hexo-theme-stellar/layout/categories.ejs

24 lines
770 B
Plaintext
Raw Permalink Normal View History

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) { %>
2022-11-21 21:44:18 +08:00
<% page.title = __('btn.categories'); %>
2021-02-19 23:33:19 +08:00
<% page.layout = 'categories'; %>
2024-01-14 16:42:20 +08:00
<%- partial('_partial/main/navbar/nav_tabs_blog') %>
2021-02-19 23:33:19 +08:00
<div class='post-list'>
2024-01-19 01:05:44 +08:00
<article class='<%- scrollreveal("") %>' id='cats'>
2021-02-19 23:33:19 +08:00
<% site.categories.sort('path').each(function(category){ %>
<div>
2021-07-09 23:02:13 +08:00
<a class="<%= category.parent ? 'cat child' : 'cat'%>" href="<%= url_for(category.path) %>">
2024-02-01 21:27:34 +08:00
<span class='name'><%- icon('default:category') %><%- category.name %></span>
2021-02-19 23:33:19 +08:00
<span class='badge'>(<%- category.posts.length %>)</span>
</a>
</div>
<% }) %>
</article>
</div>
<% } %>