You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.6 KiB
Plaintext
47 lines
1.6 KiB
Plaintext
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<%- include('./_blocks/head', { isHome: false,siteTitle: `文章归档 | ${themeConfig.siteName}` }) %>
|
|
<meta name="description" content="<%= themeConfig.siteDescription %>">
|
|
</head>
|
|
<body>
|
|
<script type="text/javascript">
|
|
if (/mobile/i.test(navigator.userAgent) || /android/i.test(navigator.userAgent)) {
|
|
document.body.classList.add('mobile')
|
|
}
|
|
</script>
|
|
<div>
|
|
<div class="inner">
|
|
<h2>文章归档</h2>
|
|
<% let years = []; posts.forEach((item) => {
|
|
const year = item.date.substring(0, 4);
|
|
if (!years.includes(year)) {
|
|
years.push(year);
|
|
}
|
|
}); %>
|
|
|
|
<% years.forEach(function(year) { %>
|
|
<h3><%- year %></h3>
|
|
<% posts.forEach(function(post) { %>
|
|
<% if (post.date.indexOf(year) !== -1) { %>
|
|
<ul class="list-group">
|
|
<li class="list-group-item title">
|
|
<a href="<%= post.link %>" target="_self"><%= post.title %></a>
|
|
<div class="word-count2"><%= post.stats.words %>字</div>
|
|
<div class="date" style="color:darkgray;font-size:80%"><%= post.dateFormat %></div>
|
|
</li>
|
|
</ul>
|
|
<% } %>
|
|
<% }); %>
|
|
<% }); %>
|
|
<h3> </h3>
|
|
<%- include('./_blocks/pagination') %>
|
|
<div style="text-align: right;">
|
|
↶ <a href="/">返回首页</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<%- include('./_blocks/scripts') %>
|
|
</body>
|
|
</html>
|