Thomas Tang f532f491da Simplify configuration to optimize user experience and performance
Signed-off-by: Thomas Tang <hello@tangkunyin.com>
2024-08-09 13:16:27 +08:00

43 lines
2.3 KiB
Plaintext

<div class="page-title">
<ul>
<li><a href="/" data-name="<%= __('home') %>" title="Back Home"><%= __('home') %></a></li>
<li><a href="/tags" data-name="<%= __('tagcloud') %>" title="<%= __('tagcloud') %>"><%= __('tags') %></a></li>
<%- partial('_widget/search-bar') %>
</ul>
</div>
<div class="main-inner">
<article class="post" itemscope itemtype="https://schema.org/BlogPosting">
<div class="post-header">
<h2 class="post-title"><%= __('post_total_count', site.posts.length) %></h2>
</div>
<%- partial('_widget/ads/adSense') %>
<div class="post-content markdown-body">
<div class="archives">
<% var lastDate; %>
<% site.posts.sort('date', theme.home_page_sort).each(function(post, i){ %>
<% var currentDate = parseInt(date(post.date, 'YYYYMM')); %>
<% if (lastDate != currentDate){ %>
<% lastDate = currentDate; %>
<div class="archives-item">
<h3><%= date(post.date, 'YYYY') %>年<%= date(post.date, 'MM') %>月</h3>
<ul class="archives_list">
<% } %>
<li><h4 class="archives-title">
<span itemprop="datePublished" content="<%= full_date(post.date, 'yyyy-MM-DDTHH:mm:ss.SSSZ')%>"><%= date(post.date, 'DD') %>日,<%= time(post.date) %></span>
<a href="<%- url_for(post.path) %>" rel="noopener" target="_blank"><span itemprop="headline"><%= post.title %></span></a>
<% if(post.author && theme.authorInfo.name && post.author != theme.authorInfo.name) { %>
,作者<a href="<%= theme.authorInfo.home %>"
target="_blank"
rel="author"><%= post.author ? post.author : theme.authorInfo.name %></a>
<% } %>
</h4></li>
<% if (!site.posts.sort('date', theme.home_page_sort).eq(i + 1) || currentDate != parseInt(date(site.posts.sort('date', theme.home_page_sort).eq(i + 1).date, 'YYYYMM'))){ %>
</ul>
</div>
<% } %>
<% }) %>
</div>
</div>
</article>
</div>