parent
f2b9250993
commit
1b8bdff154
5 changed files with 83 additions and 74 deletions
@ -1,32 +1,37 @@ |
||||
<div class='l_main'> |
||||
<% if (site.posts && site.posts.length > 0) { %> |
||||
<section class="post-list"> |
||||
<div class='post-wrapper'> |
||||
<article id="archive-page" class="post article white-box"> |
||||
<section class="archive"> |
||||
<div class="archive-item archive-year mark"> |
||||
<h2><%- page.title %></h2> |
||||
<hr> |
||||
</div> |
||||
<div class="archive-item archive-post mark"> |
||||
<% if (site.categories.length){ %> |
||||
<% site.categories.sort('path').each(function(category){ %> |
||||
<a class="<%= category.parent ? ' child' : ''%>" href="<%= url_for(category.path) %>"> |
||||
<time><i class='fas fa-folder-open fa-fw' aria-hidden="true"></i> <%= category.name %></time> |
||||
<span class="title"> |
||||
(<%- category.posts.length %>) |
||||
</span> |
||||
</a> |
||||
<% }) %> |
||||
<% } %> |
||||
</div> |
||||
<br> |
||||
<%- page.content %> |
||||
</section> |
||||
</article> |
||||
</div> |
||||
</section> |
||||
<% if (page.index) { %> |
||||
<section class="post-list"> |
||||
<div class='post-wrapper'> |
||||
<article id="archive-page" class="post article white-box"> |
||||
<section class="archive"> |
||||
<div class="archive-item archive-year mark"> |
||||
<h2><%- page.title %></h2> |
||||
<hr> |
||||
</div> |
||||
<div class="archive-item archive-post mark"> |
||||
<% if (site.categories.length){ %> |
||||
<% site.categories.sort('path').each(function(category){ %> |
||||
<a class="<%= category.parent ? ' child' : ''%>" href="<%= url_for(category.path) %>"> |
||||
<time><i class='fas fa-folder-open fa-fw' aria-hidden="true"></i> <%= category.name %></time> |
||||
<span class="title"> |
||||
(<%- category.posts.length %>) |
||||
</span> |
||||
</a> |
||||
<% }) %> |
||||
<% } %> |
||||
</div> |
||||
<br> |
||||
<%- page.content %> |
||||
</section> |
||||
</article> |
||||
</div> |
||||
</section> |
||||
<% } else { %> |
||||
<%- partial('_partial/archive') %> |
||||
<% } %> |
||||
<% } %> |
||||
|
||||
</div> |
||||
<%- partial('_partial/side') %> |
||||
<%- partial('_partial/footer', null, {cache: !config.relative_link}) %> |
||||
|
Loading…
Reference in new issue