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

View File

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

View File

@ -8,16 +8,7 @@ layout: base
<div class="row"> <div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
{{ content }} {{ content }}
{% if page.comments %} {% include comments.html %}
<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 %}
</div> </div>
</div> </div>
</div> </div>

View File

@ -64,17 +64,7 @@ layout: base
</li> </li>
{% endif %} {% endif %}
</ul> </ul>
{% include comments.html %}
{% 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 %}
</div> </div>
</div> </div>
</div> </div>