feat: Use mobile_comment.liquid on mobile view in post.liquid
This commit is contained in:
1 parent
285de9287b
commit
e9ab66b1e4
1 file changed
+16
-8
+16
-8
@@ -52,13 +52,21 @@ layout: default
|
|||||||
<h3 class="mt-4 text-lg font-medium">Comments</h3>
|
<h3 class="mt-4 text-lg font-medium">Comments</h3>
|
||||||
|
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
{% assign top_level_comments = site.comments | where: "post", page.slug | where_exp: "item", "item.parent == nil" | sort: "date" %}
|
<!-- Desktop Comments -->
|
||||||
{% if top_level_comments.size > 0 %}
|
<div class="hidden md:block">
|
||||||
{% for comment in top_level_comments %}
|
{% assign top_level_comments = site.comments | where: "post", page.slug | where_exp: "item", "item.parent == nil" | sort: "date" %}
|
||||||
{% include comment.liquid comment=comment %}
|
{% if top_level_comments.size > 0 %}
|
||||||
{% endfor %}
|
{% for comment in top_level_comments %}
|
||||||
{% else %}
|
{% include comment.liquid comment=comment %}
|
||||||
<p>No comments yet.</p>
|
{% endfor %}
|
||||||
{% endif %}
|
{% else %}
|
||||||
|
<p>No comments yet.</p>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Mobile Comments -->
|
||||||
|
<div class="block md:hidden">
|
||||||
|
{% include mobile_comment.liquid %}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
Reference in new issue
Block a user