21 lines
672 B
Plaintext
21 lines
672 B
Plaintext
<div style="padding-top: 15px;">
|
|
<% posts.map(post => { %>
|
|
<div class="post">
|
|
<div>
|
|
<img src="<%= profileImageUrl(post.authorProfile) %>" class="post-profile-pic" />
|
|
</div>
|
|
<div class="post-content">
|
|
<div class="content-header">
|
|
<%= post.authorProfile.name %>
|
|
</div>
|
|
<div class="content-body">
|
|
<% let text = post.content.text.slice(0, 140) %>
|
|
<% if (post.content.text.length > 140) text += "..." %>
|
|
<% text.split("\n").map((line, index) => { %>
|
|
<%- index > 0 ? "<br />" : "" %><%= line %>
|
|
<% }) %>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<% }) %>
|
|
</div> |