<%= content_tag(:article, article_attrs) do -%> <%= link_to polymorphic_path(link_target, link_params) do -%> <%= content_tag(:picture) do -%> <%= tag.source media: "(max-width: 660px)", srcset: cropped_url -%> <%= tag.source media: "(min-width: 660px)", srcset: preview_url -%> <%= tag.img class: "has-cropped-#{has_cropped}", src: preview_url, style: "min-width: #{preview_width}px; min-height: #{preview_height}px;", title: tooltip, alt: alt_text -%> <% end -%> <% end -%> <% if pool -%>

<%= link_to pool.pretty_name.truncate(80), pool %>

<% end -%> <% if similarity -%>

<% if post.source =~ %r!\Ahttps?://!i %> <%= external_link_to post.normalized_source, post.source_domain %> (<%= time_ago_in_words_tagged(post.created_at, compact: true) %>) <% else %> <%= time_ago_in_words_tagged(post.created_at, compact: true) %> <% end %>

<% end %> <% if size -%>

<%= link_to number_to_human_size(size), post.file_url %> (<%= width %>x<%= height %>)

<% end -%> <% if similarity -%>

<%= link_to "#{similarity}%", iqdb_queries_path(post_id: post.id) %> similarity

<% end -%> <% if recommended -%> <% end -%> <% end -%>