From 188527c6b55a2d64d5f76c5d3e094da45c69b0c9 Mon Sep 17 00:00:00 2001 From: BakedSnake Date: Wed, 17 Mar 2021 12:58:53 +0100 Subject: Public version --- views/search/all.ejs | 41 ++++++++++++++++++++++++++++ views/search/byTag.ejs | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++ views/search/title.ejs | 39 ++++++++++++++++++++++++++ 3 files changed, 154 insertions(+) create mode 100644 views/search/all.ejs create mode 100644 views/search/byTag.ejs create mode 100644 views/search/title.ejs (limited to 'views/search') 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