2016-06-02 00:07:51 +02:00
|
|
|
<div class='post-list'>
|
|
|
|
<% if (ctx.results.length) { %>
|
|
|
|
<ul>
|
2016-06-11 09:59:06 +02:00
|
|
|
<% for (let post of ctx.results) { %>
|
2016-06-02 00:07:51 +02:00
|
|
|
<li>
|
2016-06-11 09:59:29 +02:00
|
|
|
<% if (ctx.canViewPosts) { %>
|
|
|
|
<a href='/post/<%= post.id %>' title='@<%= post.id %> (<%= post.type %>) Tags: <%= post.tags.map(tag => '#' + tag).join(' ') %>'>
|
|
|
|
<% } else { %>
|
|
|
|
<a>
|
|
|
|
<% } %>
|
2016-06-02 00:07:51 +02:00
|
|
|
<%= ctx.makeThumbnail(post.thumbnailUrl) %>
|
|
|
|
<span class='type' data-type='<%= post.type %>'>
|
|
|
|
<%= post.type %>
|
|
|
|
</span>
|
|
|
|
<% if (post.score || post.favoriteCount || post.commentCount) { %>
|
|
|
|
<span class='stats'>
|
|
|
|
<% if (post.score) { %>
|
|
|
|
<span class='icon'>
|
|
|
|
<i class='fa fa-star'></i>
|
|
|
|
<%= post.score %>
|
|
|
|
</span>
|
|
|
|
<% } %>
|
|
|
|
<% if (post.favoriteCount) { %>
|
|
|
|
<span class='icon'>
|
|
|
|
<i class='fa fa-heart'></i>
|
|
|
|
<%= post.favoriteCount %>
|
|
|
|
</span>
|
|
|
|
<% } %>
|
|
|
|
<% if (post.commentCount) { %>
|
|
|
|
<span class='icon'>
|
|
|
|
<i class='fa fa-commenting'></i>
|
|
|
|
<%= post.commentCount %>
|
|
|
|
</span>
|
|
|
|
<% } %>
|
|
|
|
</span>
|
|
|
|
<% } %>
|
|
|
|
</a>
|
|
|
|
</li>
|
2016-06-11 09:59:06 +02:00
|
|
|
<% } %>
|
2016-06-02 00:07:51 +02:00
|
|
|
<%= ctx.makeFlexboxAlign() %>
|
|
|
|
</ul>
|
|
|
|
<% } %>
|
|
|
|
</div>
|