comments: fix video duration not being shown on thumbnails

Fix the video duration not being shown on thumbnails on the
https://danbooru.donmai.us/comments page.

BUG: this introduces duplicate HTML ids on the comments page. Post
thumbnails and post comment containers both have the same html ID.
This commit is contained in:
evazion
2021-11-02 02:53:42 -05:00
parent a5ed8c72c9
commit d8a55bd62b
6 changed files with 13 additions and 27 deletions

View File

@@ -4,12 +4,10 @@
<% end %>
<% @posts.select(&:visible?).each do |post| %>
<%= tag.div id: "post_#{post.id}", **PostPreviewComponent.new(post: post).article_attrs("post") do %>
<div class="preview">
<%= link_to(image_tag(post.preview_file_url), post_path(post)) %>
</div>
<%= tag.div id: "post_#{post.id}", **PostPreviewComponent.new(post: post).article_attrs("post space-x-4") do %>
<%= post_preview(post, show_deleted: true) %>
<div class="comment-section">
<div class="flex-1">
<%= render "comments/partials/index/header", post: post %>
<%= render_comment_section(post, limit: 6, current_user: CurrentUser.user) %>
</div>