Replace the `pool_id` and `favgroup_id` url params:
https://danbooru.donmai.us/posts/123?pool_id=456
https://danbooru.donmai.us/posts/123?favgroup_id=456
with the `q` param:
https://danbooru.donmai.us/posts/123?q=pool:456
https://danbooru.donmai.us/posts/123?q=favgroup:456
48 lines
1.7 KiB
Plaintext
48 lines
1.7 KiB
Plaintext
<%= tag.article id: "post_#{post.id}", **article_attrs do -%>
|
|
<%= link_to polymorphic_path(link_target, q: tags) do -%>
|
|
<picture>
|
|
<%= tag.source media: "(max-width: 660px)", srcset: cropped_url -%>
|
|
<%= tag.source media: "(min-width: 660px)", srcset: post.preview_file_url -%>
|
|
<%= tag.img class: "has-cropped-#{post.has_cropped?}", src: post.preview_file_url, style: "min-width: #{preview_dimensions[:width]}px; min-height: #{preview_dimensions[:height]}px;", title: tooltip, alt: "post ##{post.id}" -%>
|
|
</picture>
|
|
<% end -%>
|
|
<% if pool -%>
|
|
<p class="desc">
|
|
<%= link_to pool.pretty_name.truncate(80), pool %>
|
|
</p>
|
|
<% end -%>
|
|
<% if similarity -%>
|
|
<p class="desc">
|
|
<% 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 %>
|
|
</p>
|
|
<% end %>
|
|
<% if size -%>
|
|
<p class="desc">
|
|
<%= link_to number_to_human_size(size), post.file_url %>
|
|
(<%= post.image_width %>x<%= post.image_height %>)
|
|
</p>
|
|
<% end -%>
|
|
<% if similarity -%>
|
|
<p class="desc">
|
|
<%= link_to "#{similarity}%", iqdb_queries_path(post_id: post.id) %> similarity
|
|
</p>
|
|
<% end -%>
|
|
|
|
<% if recommended -%>
|
|
<p class="desc recommended">
|
|
<%= link_to recommended_posts_path(search: { post_id: post.id }), class: "more-recommended-posts", "data-post-id": post.id do %>
|
|
<%= post.fav_count %>
|
|
|
|
<%= empty_heart_icon(class: "fa-xs") %>
|
|
|
|
<br>more »
|
|
<% end %>
|
|
</p>
|
|
<% end -%>
|
|
<% end -%>
|