summaryrefslogtreecommitdiff
path: root/views/comments
diff options
context:
space:
mode:
authorBakedSnake <gilferrandm@gmail.com>2021-03-17 12:58:53 +0100
committerBakedSnake <gilferrandm@gmail.com>2021-03-17 12:58:53 +0100
commit188527c6b55a2d64d5f76c5d3e094da45c69b0c9 (patch)
tree8c6c41a2ffe04af81483ec36f72d328c3c76780a /views/comments
Public versionHEADmaster
Diffstat (limited to 'views/comments')
-rw-r--r--views/comments/edit.ejs29
-rw-r--r--views/comments/new.ejs29
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