docbrown/app/views/articles/_full_comment_area.html.erb
ludwiczakpawel 3a69f349be
[deploy] Refactor code blocks styling (#8975)
* flare tag line height

* .

* dropdown fix + actions bar fix

* actions bar on mob

* .

* missing bit

* document

* .

* little fix

* btn--highlight
2020-06-29 21:15:11 -04:00

36 lines
1.5 KiB
Text

<% cache("whole-comment-area-#{@article.id}-#{@article.last_comment_at}-#{@article.show_comments}", expires_in: 2.hours) do %>
<section id="comments" data-updated-at="<%= Time.current %>" class="crayons-card text-padding mb-4">
<% if @article.show_comments %>
<header class="relative flex justify-between items-center">
<h3 class="fs-2xl fw-bold">Discussion</h3>
<div id="comment-subscription">
<div role="presentation" class="crayons-btn-group">
<span class="crayons-btn crayons-btn--outlined">Subscribe</span>
</div>
</div>
</header>
<div
class="comments-container"
id="comments-container"
data-commentable-id="<%= @article.id %>"
data-commentable-type="Article">
<%= render "/comments/form",
commentable: @article,
commentable_type: "Article" %>
<div class="comment-trees" id="comment-trees-container">
<% if @article.comments_count > 0 %>
<% Comment.tree_for(@article, @comments_to_show_count).each do |comment, sub_comments| %>
<% cache ["comment_root_cached_tree", comment] do %>
<%= tree_for(comment, sub_comments, @article) %>
<% end %>
<% end %>
<% end %>
</div>
</div>
<div class="show-comments-footer">
<%= render "articles/comments_actions" %>
</div>
<% end %>
</section>
<% end %>
<% return if @warm_only %>