feedless/app/views/_posts.ejs

21 lines
694 B
Plaintext

<% posts.map(post => { %>
<% if (!post.content.text) return %>
<div class="post">
<div>
<a href="<%= profileUrl(post.author) %>">
<img src="<%= profileImageUrl(post.authorProfile) %>" class="post-profile-pic" />
</a>
</div>
<div class="post-content">
<a href="<%= profileUrl(post.author) %>" class="no-link-style">
<b><%= post.authorProfile.name %></b>
</a>
<% let text = escapeMarkdown(post.content.text) %>
<% if (typeof dont_cut == "undefined") { %>
<% text = text.slice(0, 140) %>
<% if (post.content.text.length > 140) text += "..." %>
<% } %>
<%- htmlify(text) %>
</div>
</div>
<% }) %>