Files
blogger-nodejs/views/pages/timeline.ejs
2025-08-09 13:18:44 +01:00

29 lines
1.0 KiB
Plaintext

<!DOCTYPE html>
<html lang="en">
<head>
<%- include('../partials/head'); %>
</head>
<body>
<div id="header">
<%- include("../headers/site_wide") %>
<%- include('../headers/timeline'); %>
</div>
<form method="POST" action="/submit_nothing" style="display:none">
<input type="hidden" name="post_index" value="0">
<input placeholder="username" name="name"><br/>
<textarea placeholder="comment" name="content"></textarea><br/>
<button type="submit">Submit</button>
</form>
<div id="posts">
<% for (let index = posts.length - 1; index >= 0; index--) { %>
<% if (posts[index]["deleted"] != true) { %>
<%- include('../posts/timeline', {post: posts[index], index: index, user: users[posts[index].userID]}); %>
<% } %>
<% } %>
</div>
<footer>
<%- include('../partials/footer'); %>
</footer>
</body>
</html>