hexo/themes/volantis/layout/category.ejs

36 lines
1.3 KiB
Plaintext
Raw Permalink Normal View History

2025-02-08 03:18:24 +00:00
<%- partial('_pre') %>
<%
page.comments = false;
if (!page.robots) {
page.robots = 'noindex,follow';
}
%>
<div id="l_main" class='<%- page.sidebar == false ? ' no_sidebar' : '' %>'>
<% if (site.posts && site.posts.length > 0) { %>
<% if ((page.layout == 'category')||(page.layout == 'categories') ) { %>
<div class='post-wrapper'>
<article id="cat" class="post article white-box reveal <%- theme.custom_css.body.effect.join(' ') %>">
<h2><%- page.title %></h2>
<div class="all-cats">
<% if (site.categories.length){ %>
<% site.categories.sort('path').each(function(category){ %>
<a class="<%= category.parent ? ' child' : ''%>" href="<%= url_for(category.path) %>">
<span><i class='fa-solid fa-folder-open fa-fw' aria-hidden="true"></i>&nbsp;&nbsp;<%= category.name %></span>
<span class="title">
(<%- category.posts.length %>)
</span>
</a>
<% }) %>
<% } %>
</div>
<br>
<%- page.content %>
</article>
</div>
<% } else { %>
<%- partial('_partial/archive') %>
<% } %>
<% } %>
</div>
<%- partial('_partial/side') %>