第三次作业题目和答案(未公布)
This commit is contained in:
commit
b01ba87404
102 changed files with 8693 additions and 0 deletions
34
themes/landscape/layout/_partial/archive.ejs
Normal file
34
themes/landscape/layout/_partial/archive.ejs
Normal file
|
@ -0,0 +1,34 @@
|
|||
<% if (pagination == 2){ %>
|
||||
<% page.posts.each(function(post){ %>
|
||||
<%- partial('article', {post: post, index: true}) %>
|
||||
<% }) %>
|
||||
<% } else { %>
|
||||
<% var last; %>
|
||||
<% page.posts.each(function(post, i){ %>
|
||||
<% var year = post.date.year(); %>
|
||||
<% if (last != year){ %>
|
||||
<% if (last != null){ %>
|
||||
</div></section>
|
||||
<% } %>
|
||||
<% last = year; %>
|
||||
<section class="archives-wrap">
|
||||
<div class="archive-year-wrap">
|
||||
<a href="<%- url_for(config.archive_dir + '/' + year) %>" class="archive-year"><%= year %></a>
|
||||
</div>
|
||||
<div class="archives">
|
||||
<% } %>
|
||||
<%- partial('archive-post', {post: post, even: i % 2 == 0}) %>
|
||||
<% }) %>
|
||||
<% if (page.posts.length){ %>
|
||||
</div></section>
|
||||
<% } %>
|
||||
<% } %>
|
||||
<% if (page.total > 1){ %>
|
||||
<nav id="page-nav">
|
||||
<% var prev_text = "« " + __('prev');var next_text = __('next') + " »"%>
|
||||
<%- paginator({
|
||||
prev_text: prev_text,
|
||||
next_text: next_text
|
||||
}) %>
|
||||
</nav>
|
||||
<% } %>
|
Loading…
Add table
Add a link
Reference in a new issue