diff options
Diffstat (limited to 'views/comments')
-rw-r--r-- | views/comments/edit.ejs | 29 | ||||
-rw-r--r-- | views/comments/new.ejs | 29 |
2 files changed, 58 insertions, 0 deletions
diff --git a/views/comments/edit.ejs b/views/comments/edit.ejs new file mode 100644 index 0000000..2e3f2c5 --- /dev/null +++ b/views/comments/edit.ejs @@ -0,0 +1,29 @@ +<%- include('../partials/header') %> + +<div class='content'> + <div class='leftie'> + <ul> + <% if(!currentUser) { %> + <li><a href='#'>Search for blog posts</a></li> + <li><a href='/'>About</a></li> + <li><a href='/browsers'>Minimal browsers</a></li> + <% } else { %> + <li><a href='/blog/<%= currentUser.username %>'>My Blog</a></li> + <li><a href='/blog/<%= currentUser %>/new'>Create a blog post</a></li> + <li><a href='#'>Search for blog posts</a></li> + <li><a href='/'>About</a></li> + <li><a href='/browsers'>Minimal browsers</a></li> + <% } %> + </ul> + </div> + <div class='rightie'> + <p>Edit comment.</p> + <form action="/blog/<%= account %>/<%= post_id %>/comments/<%= comment._id %>?_method=PUT" method='POST' id='newb'> + <label>Comment</label> + <textarea name="cmmnt[text]" id="bod"><%= comment.text %></textarea> + <button class='formBtn' type='submit'>Update</button> + </form> + </div> +</div> + +<%- include('../partials/footer') %>
\ No newline at end of file diff --git a/views/comments/new.ejs b/views/comments/new.ejs new file mode 100644 index 0000000..44dc054 --- /dev/null +++ b/views/comments/new.ejs @@ -0,0 +1,29 @@ +<%- include('../partials/header') %> + +<div class='content'> + <div class='leftie'> + <ul> + <% if(!currentUser) { %> + <li><a href='#'>Search for blog posts</a></li> + <li><a href='/'>About</a></li> + <li><a href='/browsers'>Minimal browsers</a></li> + <% } else { %> + <li><a href='/blog/<%= currentUser.username %>'>My Blog</a></li> + <li><a href='/blog/<%= currentUser %>/new'>Create a blog post</a></li> + <li><a href='#'>Search for blog posts</a></li> + <li><a href='/'>About</a></li> + <li><a href='/browsers'>Minimal browsers</a></li> + <% } %> + </ul> + </div> + <div class='rightie'> + <p>New comment.</p> + <form action="/blog/<%= post.author.username %>/<%= post._id %>/comments/" method='POST' id='newb'> + <label>Comment</label> + <textarea name="cmmnt[text]" id="bod"></textarea> + <button class='formBtn' type='submit'>Post</button> + </form> + </div> +</div> + +<%- include('../partials/footer') %>
\ No newline at end of file |