From 8170d5bc0544fbc02155b8b57751cd1dec33dd69 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 6 Apr 2021 10:57:50 +0000 Subject: initial public commit --- views/search.ejs | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 views/search.ejs (limited to 'views/search.ejs') diff --git a/views/search.ejs b/views/search.ejs new file mode 100644 index 0000000..3bf35be --- /dev/null +++ b/views/search.ejs @@ -0,0 +1,38 @@ +<%- include('partials/header') %> +<%- include('partials/nav') %> +<%- include('partials/search') %> + +
+ <%- include('partials/categories') %> +
+
+ <% recipes.filter(r => { %> + <% if(r.title.toLowerCase().includes(query.toLowerCase())) { %> +
+ recipe + <%= r.title %> + <% if(usr) {%> + <% if(usr._id.equals(r.author.id)) { %> +
+
+ +
+
+ +
+
+ <% } %> + <% } %> +
+ <% } else { %> + + <% } %> + <% }) %> +
+
+ <%- include('partials/popular') %> +
+ +<%- include('partials/magicCats') %> +<%- include('partials/magicPops') %> +<%- include('partials/footer') %> -- cgit v1.2.3