summaryrefslogtreecommitdiff
path: root/views/blog/blog.ejs
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/blog/blog.ejs
Public versionHEADmaster
Diffstat (limited to 'views/blog/blog.ejs')
-rw-r--r--views/blog/blog.ejs35
1 files changed, 35 insertions, 0 deletions
diff --git a/views/blog/blog.ejs b/views/blog/blog.ejs
new file mode 100644
index 0000000..2afe769
--- /dev/null
+++ b/views/blog/blog.ejs
@@ -0,0 +1,35 @@
+<%- include('../partials/header') %>
+
+<div class='content'>
+ <div class='leftie'>
+ <ul>
+ <% if(!currentUser) { %>
+ <li><a href='/search/all'>Search for blog posts</a></li>
+ <li><a href='/'>About</a></li>
+ <li><a href='/browsers'>Minimal browsers</a></li>
+ <% } else { %>
+ <% if(currentUser.username === account.username) { %>
+ <li><a href='/blog/<%= currentUser.username %>'><strong>My Blog</strong></a></li>
+ <% } else { %>
+ <li><a href='/blog/<%= currentUser.username %>'>My Blog</a></li>
+ <% } %>
+ <li><a href='/blog/<%= currentUser.username %>/new'>Create a blog post</a></li>
+ <li><a href='/search/all'>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' id='rev'>
+ <% posts.map((post) => { %>
+ <div class='bpost'>
+ <h4><a href="/blog/<%= account.username %>/<%= post._id %>"><%= post.title %></a></h4>
+ <img src="<%= post.image %>" alt="...">
+ <p><%- post.body.substring(0, 300) %>...</p>
+ </div>
+ <% }) %>
+ <h3><a id='bname' href="/blog/<%= account.username %>"><%= account.username.toUpperCase() %></a></h3>
+ </div>
+</div>
+
+<%- include('../partials/footer') %> \ No newline at end of file