Skip to content

Commit

Permalink
FIX: comments block only show if comments present.
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-nginx authored Sep 28, 2017
1 parent c2c2834 commit d8543f8
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions layout/_partials/comments.swig
Original file line number Diff line number Diff line change
@@ -1,35 +1,51 @@
{% if page.comments %}
<div class="comments" id="comments">
{% if (theme.duoshuo and theme.duoshuo.shortname) or theme.duoshuo_shortname %}
<div class="comments" id="comments">
<div class="ds-thread" data-thread-key="{{ page.path }}"
data-title="{{ page.title }}" data-url="{{ page.permalink }}">
</div>
</div>
{% elseif theme.facebook_sdk.enable and theme.facebook_comments_plugin.enable %}
<div class="comments" id="comments">
<div class="fb-comments"
data-href="{{ page.permalink }}"
data-numposts="{{ theme.facebook_comments_plugin.num_of_posts }}"
data-width="{{ theme.facebook_comments_plugin.width }}"
data-colorscheme="{{ theme.facebook_comments_plugin.scheme }}">
</div>
</div>
{% elseif theme.vkontakte_api.enable and theme.vkontakte_api.comments %}
<div class="comments" id="comments">
<div id="vk_comments"></div>
</div>
{% elseif theme.disqus.enable %}
<div class="comments" id="comments">
<div id="disqus_thread">
<noscript>
Please enable JavaScript to view the
<a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a>
</noscript>
</div>
</div>
{% elseif theme.hypercomments_id %}
<div class="comments" id="comments">
<div id="hypercomments_widget"></div>
</div>
{% elseif theme.youyan_uid %}
<div class="comments" id="comments">
<div id="uyan_frame"></div>
</div>
{% elseif theme.livere_uid %}
<div class="comments" id="comments">
<div id="lv-container" data-id="city" data-uid="{{ theme.livere_uid }}"></div>
</div>
{% elseif theme.changyan.appid and theme.changyan.appkey %}
<div class="comments" id="comments">
<div id="SOHUCS"></div>
</div>
{% elseif theme.valine.appid and theme.valine.appkey %}
<div class="comments" id="comments">
<div id="vcomments"></div>
</div>
{% endif %}
</div>
{% endif %}

0 comments on commit d8543f8

Please sign in to comment.