Files
blogger-nodejs/views/posts/timeline.ejs
2025-07-22 00:17:00 +01:00

24 lines
643 B
Plaintext

<h3>
<%= post.title %>
</h3>
<%= post.content %><br/>
<a href="/post/<%- index %>">Permalink</a><br/>
<i>
By <a href="/user/<%= user.username %>"><%= user.username %></a><br/>
</i>
<!-- Comment form -->
<form method="POST" action="/submit_comment">
<input type="hidden" name="post_index" value="<%= index %>">
<input placeholder="username" name="name"><br/>
<textarea placeholder="comment" name="content"></textarea><br/>
<button type="submit">Submit</button>
</form>
<% comments[index].forEach((comment, index) => { %>
<%- include('../partials/comment', {comment: comment}) %>
<% }) %>
<%- config.seperator %>