docs and also I improved the readability/user friendliness of the EJS

This commit is contained in:
2025-09-03 22:28:50 +01:00
parent 99e07389d0
commit c8af978259
15 changed files with 211 additions and 95 deletions

View File

@@ -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]}); %>
<% } %>
<% }) %>
<% } %>

View File

@@ -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>

View File

@@ -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>