posts: add hidden 540px thumbnail size option.

Add a hidden option for 540px size thumbnails. This option currently
isn't listed in the thumbnail size menu, but it can be enabled with an
URL param: https://danbooru.donmai.us/posts?size=540.
This commit is contained in:
evazion
2022-06-26 15:34:47 -05:00
parent 5795a651f1
commit f35bc60e51
5 changed files with 11 additions and 3 deletions

View File

@@ -5,7 +5,7 @@ class PostPreviewComponent < ApplicationComponent
# PostGalleryComponent::DEFAULT_SIZE for the default size of thumbnails in a gallery.
DEFAULT_SIZE = "180"
SIZES = %w[150 180 225 225w 270 270w 360 720]
SIZES = %w[150 180 225 225w 270 270w 360 540 720]
with_collection_parameter :post
@@ -66,7 +66,7 @@ class PostPreviewComponent < ApplicationComponent
media_asset.variant("360x360")
when "360"
media_asset.variant("360x360")
when "720"
when "540", "720"
media_asset.variant("720x720")
else
raise NotImplementedError