From 5595d3dc180036bec72334904080125c461ec3cd Mon Sep 17 00:00:00 2001 From: shubhsherl Date: Fri, 12 Jul 2019 06:39:05 +0530 Subject: [PATCH] add author and discussion_room --- custom-archive-authors.hbs | 32 +++++++++++++++++ custom-archive-tags.hbs | 2 +- partials/article/article-body.hbs | 13 +++---- partials/article/article-comments.hbs | 46 ++++++------------------- partials/article/article-share.hbs | 8 +++-- partials/helper/helper-author-image.hbs | 11 ++++++ partials/search.hbs | 4 +-- 7 files changed, 66 insertions(+), 50 deletions(-) create mode 100644 custom-archive-authors.hbs create mode 100644 partials/helper/helper-author-image.hbs diff --git a/custom-archive-authors.hbs b/custom-archive-authors.hbs new file mode 100644 index 00000000..42833bc0 --- /dev/null +++ b/custom-archive-authors.hbs @@ -0,0 +1,32 @@ +{{!-- Layout --}} +{{!< default}} + +
+ +{{#get "authors" limit="all" include="count.posts" order="count.posts desc"}} + +
+ + {{#foreach authors}} + +
+
+ {{!-- Image - partials/helper/helper-author-image.hbs --}} + {{> "helper/helper-author-image"}} + +
+

+ {{name}} ({{count.posts}}) +

+ {{!-- Link --}} + +
+
+ + {{/foreach}} + +
+ +{{/get}} + +
diff --git a/custom-archive-tags.hbs b/custom-archive-tags.hbs index 4adc5f63..270879d2 100644 --- a/custom-archive-tags.hbs +++ b/custom-archive-tags.hbs @@ -3,7 +3,7 @@
-{{#get "tags" limit="18" include="count.posts" order="count.posts desc"}} +{{#get "tags" limit="all" include="count.posts" order="count.posts desc"}}
diff --git a/partials/article/article-body.hbs b/partials/article/article-body.hbs index e79bb5b2..f14f98d4 100644 --- a/partials/article/article-body.hbs +++ b/partials/article/article-body.hbs @@ -20,14 +20,11 @@ {{!-- Button for Toggle Comments --}} -
- {{!-- Disqus Comments Count --}} - 0 {{t "Comments"}} - {{!-- Facebook Comments Counts --}} - {{!-- 0 - {{t "Comments"}} --}} -
- + {{#if discussion_room}} +
+ {{t "Comments"}} +
+ {{/if}}
diff --git a/partials/article/article-comments.hbs b/partials/article/article-comments.hbs index 076c89ca..077fb778 100644 --- a/partials/article/article-comments.hbs +++ b/partials/article/article-comments.hbs @@ -4,12 +4,12 @@ -
-
{{t "Loading..."}}
- {{!-- Disqus Comments --}} -
- {{!-- Comments section for facebook --}} - {{!--
--}} +
+
{{t "Loading..."}}
+ {{!-- Comments --}} +
+ +
@@ -19,44 +19,18 @@ {{#contentFor "scripts"}} diff --git a/partials/article/article-share.hbs b/partials/article/article-share.hbs index e33023de..28280f5e 100644 --- a/partials/article/article-share.hbs +++ b/partials/article/article-share.hbs @@ -35,8 +35,10 @@ onclick="window.open(this.href, 'share-pinterest', 'width=600,height=480');return false;"> -
  • -
    -
  • + {{#if discussion_room}} +
  • +
    +
  • + {{/if}} diff --git a/partials/helper/helper-author-image.hbs b/partials/helper/helper-author-image.hbs new file mode 100644 index 00000000..c940e120 --- /dev/null +++ b/partials/helper/helper-author-image.hbs @@ -0,0 +1,11 @@ +{{#if profile_image}} + {{title}} +{{else}} +
    +{{/if}} diff --git a/partials/search.hbs b/partials/search.hbs index c1abb829..f356dc0e 100644 --- a/partials/search.hbs +++ b/partials/search.hbs @@ -15,11 +15,11 @@
    {{!-- showing the function keys --}} -
    + {{!--
    {{t "Navigate up/down"}}
    Enter {{t "Go to article"}}
    / {{t "Search new term"}}
    Esc {{t "Close search"}}
    -
    +
    --}}