2020-09-27 21:11:34 +02:00
|
|
|
<% if (ctx.postFlow) { %><div class='post-list post-flow'><% } else { %><div class='post-list'><% } %>
|
2017-02-09 00:48:06 +01:00
|
|
|
<% if (ctx.response.results.length) { %>
|
2016-06-02 00:07:51 +02:00
|
|
|
<ul>
|
2017-02-09 00:48:06 +01:00
|
|
|
<% for (let post of ctx.response.results) { %>
|
2017-02-11 21:58:18 +01:00
|
|
|
<li data-post-id='<%= post.id %>'>
|
2016-09-10 11:34:11 +02:00
|
|
|
<a class='thumbnail-wrapper <%= post.tags.length > 0 ? "tags" : "no-tags" %>'
|
2017-10-01 21:46:53 +02:00
|
|
|
title='@<%- post.id %> (<%- post.type %>) Tags: <%- post.tags.map(tag => '#' + tag.names[0]).join(' ') || 'none' %>'
|
2017-01-20 21:51:04 +01:00
|
|
|
href='<%= ctx.canViewPosts ? ctx.getPostUrl(post.id, ctx.parameters) : '' %>'>
|
2016-06-02 00:07:51 +02:00
|
|
|
<%= ctx.makeThumbnail(post.thumbnailUrl) %>
|
2016-06-23 11:41:52 +02:00
|
|
|
<span class='type' data-type='<%- post.type %>'>
|
2019-02-05 06:32:04 +01:00
|
|
|
<% if (post.type == 'video' || post.type == 'flash' || post.type == 'animation') { %>
|
|
|
|
<span class='icon'><i class='fa fa-film'></i></span>
|
|
|
|
<% } else { %>
|
|
|
|
<%- post.type %>
|
|
|
|
<% } %>
|
2016-06-02 00:07:51 +02:00
|
|
|
</span>
|
|
|
|
<% if (post.score || post.favoriteCount || post.commentCount) { %>
|
|
|
|
<span class='stats'>
|
|
|
|
<% if (post.score) { %>
|
|
|
|
<span class='icon'>
|
2016-08-27 16:15:04 +02:00
|
|
|
<i class='fa fa-thumbs-up'></i>
|
2016-06-23 11:41:52 +02:00
|
|
|
<%- post.score %>
|
2016-06-02 00:07:51 +02:00
|
|
|
</span>
|
|
|
|
<% } %>
|
|
|
|
<% if (post.favoriteCount) { %>
|
|
|
|
<span class='icon'>
|
|
|
|
<i class='fa fa-heart'></i>
|
2016-06-23 11:41:52 +02:00
|
|
|
<%- post.favoriteCount %>
|
2016-06-02 00:07:51 +02:00
|
|
|
</span>
|
|
|
|
<% } %>
|
|
|
|
<% if (post.commentCount) { %>
|
|
|
|
<span class='icon'>
|
|
|
|
<i class='fa fa-commenting'></i>
|
2016-06-23 11:41:52 +02:00
|
|
|
<%- post.commentCount %>
|
2016-06-02 00:07:51 +02:00
|
|
|
</span>
|
|
|
|
<% } %>
|
|
|
|
</span>
|
|
|
|
<% } %>
|
|
|
|
</a>
|
2017-02-11 20:12:44 +01:00
|
|
|
<span class='edit-overlay'>
|
|
|
|
<% if (ctx.canBulkEditTags && ctx.parameters && ctx.parameters.tag) { %>
|
2017-02-11 21:58:18 +01:00
|
|
|
<a href class='tag-flipper'>
|
2017-02-11 20:12:44 +01:00
|
|
|
</a>
|
|
|
|
<% } %>
|
2017-02-11 21:58:18 +01:00
|
|
|
<% if (ctx.canBulkEditSafety && ctx.parameters && ctx.parameters.safety) { %>
|
|
|
|
<span class='safety-flipper'>
|
|
|
|
<% for (let safety of ['safe', 'sketchy', 'unsafe']) { %>
|
|
|
|
<a href data-safety='<%- safety %>' class='safety-<%- safety %><%- post.safety === safety ? ' active' : '' %>'>
|
|
|
|
</a>
|
|
|
|
<% } %>
|
|
|
|
</span>
|
|
|
|
<% } %>
|
2023-01-19 18:44:31 +01:00
|
|
|
<% if (ctx.canBulkDelete && ctx.parameters && ctx.parameters.delete) { %>
|
|
|
|
<a href class='delete-flipper'>
|
|
|
|
</a>
|
|
|
|
<% } %>
|
2017-02-11 20:12:44 +01:00
|
|
|
</span>
|
2016-06-02 00:07:51 +02:00
|
|
|
</li>
|
2016-06-11 09:59:06 +02:00
|
|
|
<% } %>
|
2016-06-02 00:07:51 +02:00
|
|
|
<%= ctx.makeFlexboxAlign() %>
|
|
|
|
</ul>
|
|
|
|
<% } %>
|
|
|
|
</div>
|