From c6f7abf5a671b99d502e7e74e9c30d53364b1a05 Mon Sep 17 00:00:00 2001 From: ditttu Date: Fri, 22 Mar 2019 04:24:16 +0530 Subject: [PATCH 1/2] Added advanced search --- .gitignore | 2 ++ _config.yml | 2 ++ _includes/head.html | 1 + search.html | 21 +++++++++++++++++++++ 4 files changed, 26 insertions(+) create mode 100644 search.html diff --git a/.gitignore b/.gitignore index 4a119f42..37d8e82a 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ vendor .bundle .sass-cache .jekyll-metadata +.DS_Store +.idea \ No newline at end of file diff --git a/_config.yml b/_config.yml index 01434304..c1306fd1 100644 --- a/_config.yml +++ b/_config.yml @@ -107,3 +107,5 @@ jekyll-archives: kramdown: input: GFM hard_wrap: false + +cloudsh_token: "eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiMWVhZGI4NWItMDgwNS00MDRkLWJhYmMtOGQ5Mjc5OGYzNDliIiwiaW5kZXhfaWQiOiIyMzk3Yjk4Yy1lMTk3LTRjMGQtOTlkYS04NGIxOWEzMjk1ZjEiLCJpbmRleF91cmwiOiJodHRwOi8vcGNsdWIuaW4ifQ.49yI9ac98bXkeoIzXxW_LRA_tTJgHeAErr_aVgu1MQg" diff --git a/_includes/head.html b/_includes/head.html index e4ff5147..2b995078 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -33,4 +33,5 @@ + diff --git a/search.html b/search.html new file mode 100644 index 00000000..8c666e42 --- /dev/null +++ b/search.html @@ -0,0 +1,21 @@ +--- +layout: default +title: Search +--- +

+
+ + +
+
+

Results

+
+ + + \ No newline at end of file From d969a988780a32e2519331a1d882bbe8c020214b Mon Sep 17 00:00:00 2001 From: ditttu Date: Fri, 22 Mar 2019 05:01:26 +0530 Subject: [PATCH 2/2] Added search by author --- _includes/footer.html | 18 ++++++++++++++++++ _includes/widgets.html | 6 ++++++ gblk2.json | 7 +++++++ 3 files changed, 31 insertions(+) create mode 100644 gblk2.json diff --git a/_includes/footer.html b/_includes/footer.html index caa4a26b..e2507ba0 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -88,6 +88,24 @@ theme: "square" }; $("#countries").easyAutocomplete(options); +var options2 = { + url: "/gblk2.json", + getValue: "author", + list: { + match: { + enabled: !0, + maxNumberOfElements: 5 + } + }, + template: { + type: "custom", + method: function(value, item) { + return ""+ (item.title) +""; + } + }, + theme: "square" +}; +$("#countries2").easyAutocomplete(options2); var waterfall = new Waterfall({ containerSelector: ".wf-container", boxSelector: ".wf-box", diff --git a/_includes/widgets.html b/_includes/widgets.html index 51352eba..6c8c9e67 100644 --- a/_includes/widgets.html +++ b/_includes/widgets.html @@ -5,6 +5,12 @@

Search

+
+

Search by Author

+
+ +
+

Tags

diff --git a/gblk2.json b/gblk2.json new file mode 100644 index 00000000..f361055b --- /dev/null +++ b/gblk2.json @@ -0,0 +1,7 @@ +--- + layout: null +--- +[ + {% for post in site.posts %}{"title":"{{ post.title }}", "url":"{{ post.url }}", "author":"{{ post.author }}"}{% if forloop.last %}{% else %}, + {% endif %}{% endfor %} +] \ No newline at end of file