Factor out thumbnail galleries into a PostGallery component. This changes the html structure so that post galleries on all pages are always wrapped in a `.posts-container` class. This fixes an issue with thumbnails on the pool show page not being aligned correctly on mobile, like they are on the post index page. This also affected thumbnail galleries on other pages, like wiki pages and user profiles.
18 lines
662 B
Plaintext
18 lines
662 B
Plaintext
<% if presenter.has_uploads? %>
|
|
<div class="user-uploads recent-posts">
|
|
<h2 class="recent-posts-header">
|
|
<%= link_to "Uploads", posts_path(tags: "user:#{user.name}") %>
|
|
</h2>
|
|
<%= render_post_gallery(presenter.uploads, tags: "user:#{user.name}", show_deleted: true) %>
|
|
</div>
|
|
<% end %>
|
|
|
|
<% if presenter.has_favorites? && policy(user).can_see_favorites? %>
|
|
<div class="user-favorites recent-posts">
|
|
<h2 class="recent-posts-header">
|
|
<%= link_to "Favorites", posts_path(tags: "ordfav:#{user.name}") %>
|
|
</h2>
|
|
<%= render_post_gallery(presenter.favorites, tags: "ordfav:#{user.name}", show_deleted: true) %>
|
|
</div>
|
|
<% end %>
|