small refactor and cleanup to comments system

This commit is contained in:
Dean Attali 2020-04-01 17:37:53 -04:00
parent e19a4a7ed6
commit 4cdb150357
5 changed files with 12 additions and 21 deletions

6
_includes/comments.html Normal file
View File

@ -0,0 +1,6 @@
{% if page.comments %}
{% include disqus.html %}
{% include fb-comment.html %}
{% include staticman-comments.html %}
{% include utterances-comment.html %}
{% endif %}

View File

@ -1,4 +1,5 @@
{%- if site.disqus -%}
<div class="disqus-comments">
<div class="comments">
<div id="disqus_thread"></div>
<script type="text/javascript">
@ -14,4 +15,5 @@
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
</div>
</div>
{%- endif -%}

View File

@ -1,4 +1,5 @@
{% if site.staticman.repository and site.staticman.branch %}
<div class="staticman-comments">
<div class="page__comments">
<!-- Start static comments -->
<div class="js-comments">
@ -78,4 +79,5 @@
}
</script>
<script src="{{ "/js/staticman.js" | relative_url }}"></script>
</div>
{% endif %}

View File

@ -8,16 +8,7 @@ layout: base
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
{{ content }}
{% if page.comments %}
<div class="disqus-comments">
{% include disqus.html %}
</div>
{% include fb-comment.html %}
<div class="staticman-comments">
{% include staticman-comments.html %}
</div>
{% include utterances-comment.html %}
{% endif %}
{% include comments.html %}
</div>
</div>
</div>

View File

@ -64,17 +64,7 @@ layout: base
</li>
{% endif %}
</ul>
{% if page.comments %}
<div class="disqus-comments">
{% include disqus.html %}
</div>
{% include fb-comment.html %}
<div class="staticman-comments">
{% include staticman-comments.html %}
</div>
{% include utterances-comment.html %}
{% endif %}
{% include comments.html %}
</div>
</div>
</div>