ejs stuff
This commit is contained in:
20
views/posts/user.ejs
Normal file
20
views/posts/user.ejs
Normal file
@@ -0,0 +1,20 @@
|
||||
<h3>
|
||||
<%= post.title %>
|
||||
</h3>
|
||||
<%= post.content %><br/>
|
||||
<a href="/post/<%- index %>">Permalink</a><br/>
|
||||
|
||||
<!-- 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 %>
|
||||
|
Reference in New Issue
Block a user