From 188527c6b55a2d64d5f76c5d3e094da45c69b0c9 Mon Sep 17 00:00:00 2001 From: BakedSnake Date: Wed, 17 Mar 2021 12:58:53 +0100 Subject: Public version --- views/blog/blog.ejs | 35 ++++++++++++++++++++++ views/blog/edit.ejs | 42 +++++++++++++++++++++++++++ views/blog/new.ejs | 42 +++++++++++++++++++++++++++ views/blog/show.ejs | 53 +++++++++++++++++++++++++++++++++ views/comments/edit.ejs | 29 +++++++++++++++++++ views/comments/new.ejs | 29 +++++++++++++++++++ views/index.ejs | 34 ++++++++++++++++++++++ views/login.ejs | 31 ++++++++++++++++++++ views/mbrowsers.ejs | 26 +++++++++++++++++ views/partials/footer.ejs | 2 ++ views/partials/header.ejs | 22 ++++++++++++++ views/register.ejs | 33 +++++++++++++++++++++ views/search/all.ejs | 41 ++++++++++++++++++++++++++ views/search/byTag.ejs | 74 +++++++++++++++++++++++++++++++++++++++++++++++ views/search/title.ejs | 39 +++++++++++++++++++++++++ 15 files changed, 532 insertions(+) create mode 100644 views/blog/blog.ejs create mode 100644 views/blog/edit.ejs create mode 100644 views/blog/new.ejs create mode 100644 views/blog/show.ejs create mode 100644 views/comments/edit.ejs create mode 100644 views/comments/new.ejs create mode 100644 views/index.ejs create mode 100644 views/login.ejs create mode 100644 views/mbrowsers.ejs create mode 100644 views/partials/footer.ejs create mode 100644 views/partials/header.ejs create mode 100644 views/register.ejs create mode 100644 views/search/all.ejs create mode 100644 views/search/byTag.ejs create mode 100644 views/search/title.ejs (limited to 'views') 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') %> + +
+
+ +
+
+ <% posts.map((post) => { %> +
+

<%= post.title %>

+ ... +

<%- post.body.substring(0, 300) %>...

+
+ <% }) %> +

<%= account.username.toUpperCase() %>

+
+
+ +<%- include('../partials/footer') %> \ No newline at end of file diff --git a/views/blog/edit.ejs b/views/blog/edit.ejs new file mode 100644 index 0000000..00d9b57 --- /dev/null +++ b/views/blog/edit.ejs @@ -0,0 +1,42 @@ +<%- include('../partials/header') %> + +
+
+ +
+
+

<%= currentUser.username.toUpperCase() %>

+

New blog post.

+
+ + + + + + + + + +
+
+
+ +<%- include('../partials/footer') %> \ No newline at end of file diff --git a/views/blog/new.ejs b/views/blog/new.ejs new file mode 100644 index 0000000..2800c6f --- /dev/null +++ b/views/blog/new.ejs @@ -0,0 +1,42 @@ +<%- include('../partials/header') %> + +
+
+ +
+
+

<%= currentUser.username.toUpperCase() %>

+

New blog post.

+
+ + + + + + + + + +
+
+
+ +<%- include('../partials/footer') %> \ No newline at end of file diff --git a/views/blog/show.ejs b/views/blog/show.ejs new file mode 100644 index 0000000..0133499 --- /dev/null +++ b/views/blog/show.ejs @@ -0,0 +1,53 @@ +<%- include('../partials/header') %> + +
+
+ +
+
+

<%= account.toUpperCase() %>

+
+

<%= post.title %>

+ ... + +

<%- post.body %>

+ <% if(currentUser && post.author.id.equals(currentUser._id)) { %> + Edit +
+ +
+ <% } %> + <% post.comments.map((comment) => { %> +
+
<%= comment.author.username.toUpperCase() %>:
+

<%- comment.text %>

+ <% if(currentUser && comment.author.id.equals(currentUser._id)) { %> +
+ + Edit + +
+ +
+
+ <% } %> +
+ <% }) %> + Add a comment +
+
+
+ +<%- include('../partials/footer') %> 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') %> + +
+
+ +
+
+

Edit comment.

+
+ + + +
+
+
+ +<%- 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') %> + +
+
+ +
+
+

New comment.

+
+ + + +
+
+
+ +<%- include('../partials/footer') %> \ No newline at end of file diff --git a/views/index.ejs b/views/index.ejs new file mode 100644 index 0000000..c0496ba --- /dev/null +++ b/views/index.ejs @@ -0,0 +1,34 @@ +<%- include('partials/header') %> + +
+
+ +
+
+

Tired of how bloated the web is, so I made this.

+
+

News

+

Find out more.

+

2020-02-08

+

Sblog app is now live. Some updates will be added later.

+

ToDo's

+
    +
  • user warning and success cards
  • +
  • search by tag
  • +
+
+
+ +<%- include('partials/footer') %> diff --git a/views/login.ejs b/views/login.ejs new file mode 100644 index 0000000..3bd5cd1 --- /dev/null +++ b/views/login.ejs @@ -0,0 +1,31 @@ +<%- include('partials/header') %> + +
+
+ +
+
+

Log In

+
+ + + + + +
+
+
+ +<%- include('partials/footer') %> \ No newline at end of file diff --git a/views/mbrowsers.ejs b/views/mbrowsers.ejs new file mode 100644 index 0000000..f7b11ab --- /dev/null +++ b/views/mbrowsers.ejs @@ -0,0 +1,26 @@ +<%- include('partials/header') %> + +
+
+ +
+
+

Sblog and minimal browsers

+

This app was made with the intention of being used in minimal browsers.

+

Luakit and surf are my personal favorites. Give it a try for the ultimum minimal experience.

+
+
+ +<%- include('partials/footer') %> \ No newline at end of file diff --git a/views/partials/footer.ejs b/views/partials/footer.ejs new file mode 100644 index 0000000..2ab5c0d --- /dev/null +++ b/views/partials/footer.ejs @@ -0,0 +1,2 @@ + + diff --git a/views/partials/header.ejs b/views/partials/header.ejs new file mode 100644 index 0000000..f6db580 --- /dev/null +++ b/views/partials/header.ejs @@ -0,0 +1,22 @@ + + + + Suckless Blog + + + + + + + diff --git a/views/register.ejs b/views/register.ejs new file mode 100644 index 0000000..4623fcc --- /dev/null +++ b/views/register.ejs @@ -0,0 +1,33 @@ +<%- include('partials/header') %> + +
+
+ +
+
+

Register

+
+ + + + + + + +
+
+
+ +<%- include('partials/footer') %> \ No newline at end of file diff --git a/views/search/all.ejs b/views/search/all.ejs new file mode 100644 index 0000000..0fca029 --- /dev/null +++ b/views/search/all.ejs @@ -0,0 +1,41 @@ +<%- include('../partials/header') %> + +
+
+ +
+
+ <% posts.map((post) => { %> +
+

<%= post.title %>

+ ... +

<%- post.body.substring(0, 300) %>...

+
+ <% }) %> +

All Posts

+
+
+ +<%- include('../partials/footer') %> \ No newline at end of file diff --git a/views/search/byTag.ejs b/views/search/byTag.ejs new file mode 100644 index 0000000..1566bc6 --- /dev/null +++ b/views/search/byTag.ejs @@ -0,0 +1,74 @@ +<%- include('../partials/header') %> + +
+ +
+ <% let type = ''; %> +
+ <% posts.map((post) => { %> + <% if(post.tag === type) { %> +
+

<%= post.title %>

+ ... +

<%- post.body.substring(0, 300) %>...

+
+ <% } else { %> +
+ <% } %> + <% }) %> +
+ +
+ + +
+

Posts by tag

+
+
+ + + + + +<%- include('../partials/footer') %> \ No newline at end of file diff --git a/views/search/title.ejs b/views/search/title.ejs new file mode 100644 index 0000000..a417352 --- /dev/null +++ b/views/search/title.ejs @@ -0,0 +1,39 @@ +<%- include('../partials/header') %> + +
+ +
+
+ + + +
+

Search for posts by title

+
+
+ +<%- include('../partials/footer') %> \ No newline at end of file -- cgit v1.2.3