docs and also I improved the readability/user friendliness of the EJS
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
<% if ( posts[index].deleted != true) { %>
|
||||
<% posts[index].tags.forEach((current_tag, tag_index) => { %>
|
||||
<% if (current_tag == tag) { %>
|
||||
<%- include('../posts/tag', {post: posts[index], postID: index}); %>
|
||||
<%- include('../posts/tag', {post: posts[index], user: users[posts[index].userID], comments: comments[index]}); %>
|
||||
<% } %>
|
||||
<% }) %>
|
||||
<% } %>
|
||||
|
@@ -18,7 +18,7 @@
|
||||
<div id="posts">
|
||||
<% for (let index = posts.length - 1; index >= 0; index--) { %>
|
||||
<% if (posts[index]["deleted"] != true) { %>
|
||||
<%- include('../posts/timeline', {post: posts[index], postID: index, user: users[posts[index].userID]}); %>
|
||||
<%- include('../posts/timeline', {post: posts[index], postID: index, user: users[posts[index].userID], comments: comments[index]}); %>
|
||||
<% } %>
|
||||
<% } %>
|
||||
</div>
|
||||
|
@@ -11,7 +11,7 @@
|
||||
<div id="posts">
|
||||
<% for (let index = posts.length - 1; index >= 0; index--) { %>
|
||||
<% if (posts[index].userID == userID) { %>
|
||||
<%- include('../posts/user', {post: posts[index], postID: index, user: user}); %>
|
||||
<%- include('../posts/user', {post: posts[index], postID: index, user: user, comments: comments[index]}); %>
|
||||
<% } %>
|
||||
<% } %>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user