hexo-theme-jsimple/layout/_widget/common-article.ejs
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

54 lines
2.9 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div class="main-inner">
<article class="post" itemscope itemtype="https://schema.org/BlogPosting">
<div class="post-header">
<div class="post-author clearfix" itemscope itemtype="https://schema.org/Person">
<a class="avatar fleft" href="<%= theme.authorInfo.home %>" rel="author">
<img width="48" src="<%= post.avatar ? post.avatar : theme.authorInfo.avatar %>" alt="avatar" itemprop="image"/>
</a>
<p><span class="label"><%= __('author') %></span>
<a href="<%= post.author ? post.author : theme.authorInfo.home %>" itemprop="url"><span itemprop="name"><%= post.author ? post.author : theme.authorInfo.name %></span></a>
<span itemprop="datePublished" content="<%= full_date(post.date, 'yyyy-MM-DDTHH:mm:ss.SSSZ')%>"><%= __('last_edited') %>&nbsp;<%= date(post.date) %></span>
</p>
<p itemprop="description"><%= theme.authorInfo.desc %></p>
</div>
<h1 class="post-title">
<a target="_self" href="<%= post.permalink %>" itemprop="mainEntityOfPage"><span itemprop="headline"><%- post.title %></span></a>
</h1>
<div class="post-meta" itemprop="wordCount">
<%= __('post_words_count', strip_html(post.content).length) %> |
<span id="busuanzi_container_page_pv">
<%= __('post_view_count_prefix') %>&nbsp;<span id="busuanzi_value_page_pv"><i class="fa fa-spinner fa-spin"></i></span><%= __('post_view_count_subfix') %>
</span>
</div>
</div>
<div class="post-content markdown-body articleBody" itemprop="articleBody">
<%- post.content %>
<% if(post.layout && post.layout === 'post') { %>
<%- partial('_widget/ads/adSense', null, { cache: false }) %>
<% } %>
</div>
<% if (theme.donateLink){ %>
<div class="post-tool">
<a class="btn-thumbs-up" title="buy me a coffee" href="<%= theme.donateLink %>" aria-label="donate link" rel="external nofollow">
<i class="fa fa-thumbs-up" aria-hidden="true"></i> <%= __('donate') %>
</a>
</div>
<% } %>
<% if (post.tags){ %>
<div class="post-tags"><%= __('tags') %>
<% post.tags.each(function(tag){ %>
<a href="<%- url_for(tag.path) %>"><%= tag.name %></a>
<% }) %>
</div>
<% } %>
</article>
<% if(post.layout && post.layout === 'post' && theme.post_declare) { %>
<p style="text-align: center"><%= __('post_declare') %>: <%= theme.post_declare.desc %></p>
<% } %>
<% if(post.layout && post.layout !== 'post') { %>
<%- partial('_widget/ads/adSense', null, { cache: false }) %>
<% } %>
<%- partial('_partial/comments', null, { cache: false }) %>
</div>