<% scope = scope(@conn) image_url = fn image, hit -> ~p"/images/#{image}?#{Keyword.put(scope, :sort, hit["sort"])}" end route = fn p -> ~p"/galleries/#{@gallery}?#{p}" end pagination = render(PhilomenaWeb.PaginationView, "_pagination.html", page: @images, route: route, params: scope) info = render(PhilomenaWeb.PaginationView, "_pagination_info.html", page: @images) %>
A gallery by <%= link(@gallery.creator.name, to: ~p"/profiles/#{@gallery.creator}") %> with <%= @gallery.image_count %> <%= pluralize("image", "images", @gallery.image_count) %>, last updated <%= pretty_time(@gallery.updated_at) %>
<%= render(PhilomenaWeb.ImageView, "_image_container.html", image: @gallery.thumbnail, size: :thumb_tiny, conn: @conn) %>
<%= if @gallery.spoiler_warning not in [nil, ""] do %> Warning: <%= @gallery.spoiler_warning %> <% end %> <%= if @gallery.description not in [nil, ""] do %>

<%= @gallery.description %>

<% end %>
<%= for {image, hit} <- @gallery_images do %> <%= render(PhilomenaWeb.ImageView, "_image_box.html", image: image, link: image_url.(image, hit), size: :thumb, conn: @conn) %> <% end %>