diff --git a/app/views/shared/_posts.ejs b/app/views/shared/_posts.ejs index 928fa73..38a0e9e 100644 --- a/app/views/shared/_posts.ejs +++ b/app/views/shared/_posts.ejs @@ -1,21 +1,21 @@ <% posts.map(post => { %> <% if (!post.content.text) return %> -
-
- - - + <% let text = escapeMarkdown(post.content.text) %> + <% let limit = typeof dont_cut == "undefined" ? 140 : 10000 %> + <% let numPosts = Math.ceil(text.length / limit) %> + <% for (let i = numPosts; i > 0; i--) { %> +
+
+ + + +
+
+ + <%= post.authorProfile.name %> + + <%- htmlify(text.slice(limit * (i - 1), limit * i)) %> +
-
- - <%= post.authorProfile.name %> - - <% 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) %> -
-
+ <% } %> <% }) %> \ No newline at end of file