nicenote/themes/material/layout/_partial/Paradox-post_entry.ejs
2018-07-13 19:29:56 +08:00

76 lines
3.2 KiB
Plaintext
Executable File

<div class="post_entry-module mdl-card <% if(theme.card_elevation) { %><%= 'mdl-shadow--' + theme.card_elevation + 'dp' %><% } %> mdl-cell mdl-cell--12-col fade out">
<!-- Post Thumbnail -->
<% if(!post.thumbnail) { %>
<% if(!theme.thumbnail.purecolor) { %>
<!-- Random Thumbnail -->
<div class="post_thumbnail-random mdl-card__media mdl-color-text--grey-50">
<% } else { %>
<!-- Pure Thumbnail -->
<div class="post-thumbnail-pure mdl-card__media mdl-color-text--grey-50" style="background-color:<%= theme.thumbnail.purecolor %> !important">
<% } %>
<% } else { %>
<!-- Custom Thumbnail -->
<div class="post_thumbnail-custom mdl-card__media mdl-color-text--grey-50 lazy" data-original="<%= post.thumbnail %>">
<% } %>
<!-- Post Title -->
<p class="article-headline-p"><a href="<%= url_for(post.path) %>"><% if(pin) { %><span>[Top]</span><% } %><%= post.title %></a></p>
</div>
<!-- Post Excerpt -->
<div class="mdl-color-text--grey-600 mdl-card__supporting-text post_entry-content">
<%if(post.excerpt) {%>
<%- strip_html(post.excerpt) %>
<%}else{%>
<%- strip_html(truncate(post.content,{length: theme.reading.entry_excerpt })) %>
<%}%>
&nbsp;&nbsp;&nbsp;
<span>
<a href="<%= url_for(post.path) %>" target="_self"><%= __('post.continue') %></a>
</span>
</div>
<!-- Post_entry Info-->
<div id="post_entry-info">
<div id="post_entry-left-info" class="mdl-card__supporting-text meta mdl-color-text--grey-600 ">
<!-- Author Avatar -->
<div id="author-avatar">
<img src="<%= theme.img.avatar %>" width="44px" height="44px" alt="<%= config.author %>'s avatar">
</div>
<div>
<strong><%= config.author %></strong>
<span><%= date(post.date, 'MMM DD, YYYY') %></span>
</div>
</div>
<div id="post_entry-right-info">
<!-- Category -->
<span class="post_entry-category">
<%- list_categories(post.categories, {
show_count: false,
class: 'post_category',
style: 'none'
}) %>
</span>
<% if(theme.comment.use === 'duoshuo') { %>
<!-- Comment Number -->
&nbsp;|&nbsp;
<span class="post_entry-comment" >
<span class="ds-thread-count" data-thread-key="<%= theme.comment.duoshuo_thread_key_type === 'id' ? post.id : post.path %>" data-count-type="comments"></span>
</span>
<% } %>
<% if(theme.comment.use === 'changyan') { %>
<!-- Comment Number -->
&nbsp;|&nbsp;
<span class="post_entry-comment" >
<span id = "sourceId::<%= theme.comment.changyan_thread_key_type === 'id' ? post.id : post.path %>" class = "cy_cmt_count" ></span>条评论
</span>
<% } %>
<!-- Post Views -->
<span class="post_entry-views">
</span>
</div>
</div>
</div>