From 0e365ee24820762d4934dd6743d6e6005fe2acca Mon Sep 17 00:00:00 2001 From: Michael Rose Date: Wed, 23 Mar 2016 12:55:36 -0400 Subject: [PATCH] Organize comments providers includes and make FB fill parent container --- _config.yml | 3 +-- _includes/comments-providers/scripts.html | 14 ++++++++++++++ _includes/comments.html | 15 ++++++--------- _includes/scripts.html | 2 +- 4 files changed, 22 insertions(+), 12 deletions(-) create mode 100644 _includes/comments-providers/scripts.html diff --git a/_config.yml b/_config.yml index a008068f..985fabed 100644 --- a/_config.yml +++ b/_config.yml @@ -35,8 +35,7 @@ comments: facebook: # https://developers.facebook.com/docs/plugins/comments appid : - num_posts : # 5 - width : # 580 + num_posts : # 5 (default) colorscheme : # "light" (default), "dark" google_site_verification : bing_site_verification : diff --git a/_includes/comments-providers/scripts.html b/_includes/comments-providers/scripts.html new file mode 100644 index 00000000..df699fc5 --- /dev/null +++ b/_includes/comments-providers/scripts.html @@ -0,0 +1,14 @@ +{% if site.comments.provider and page.comments %} + +{% case site.comments.provider %} +{% when "disqus" %} + {% include /comments-providers/disqus.html %} +{% when "facebook" %} + {% include /comments-providers/facebook.html %} +{% when "google-plus" %} + {% include /comments-providers/google-plus.html %} +{% when "custom" %} + {% include /comments-providers/custom.html %} +{% endcase %} + +{% endif %} \ No newline at end of file diff --git a/_includes/comments.html b/_includes/comments.html index df699fc5..66536d25 100644 --- a/_includes/comments.html +++ b/_includes/comments.html @@ -1,14 +1,11 @@ -{% if site.comments.provider and page.comments %} - +

{{ site.data.ui-text[site.locale].comments_label }}

{% case site.comments.provider %} {% when "disqus" %} - {% include /comments-providers/disqus.html %} +
{% when "facebook" %} - {% include /comments-providers/facebook.html %} +
{% when "google-plus" %} - {% include /comments-providers/google-plus.html %} +
Loading Google+ Comments ...
{% when "custom" %} - {% include /comments-providers/custom.html %} -{% endcase %} - -{% endif %} \ No newline at end of file +
+{% endcase %} \ No newline at end of file diff --git a/_includes/scripts.html b/_includes/scripts.html index d16c5c9f..138d271e 100644 --- a/_includes/scripts.html +++ b/_includes/scripts.html @@ -1,4 +1,4 @@ {% include analytics.html %} -{% include comments.html %} +{% include /comments-providers/scripts.html %}