posts: add hidden 720x720 thumbnail option (#4944).

Allow 720x720 thumbnails with https://danbooru.donmai.us/posts?size=720.
This commit is contained in:
evazion
2021-12-28 11:36:14 -06:00
parent 6d7a139ef1
commit 572b1b74f7
4 changed files with 9 additions and 2 deletions

View File

@@ -19,7 +19,7 @@
<% case size %>
<% when "150", "180" %>
<%= tag.source type: "image/jpeg", srcset: "#{media_asset.variant("180x180").file_url} 1x, #{media_asset.variant("360x360").file_url} 2x" %>
<% else # 225 to 360 %>
<% when "225", "225w", "270", "270w", "360" %>
<%= tag.source type: "image/webp", srcset: "#{media_asset.variant("360x360").file_url} 1x, #{media_asset.variant("720x720").file_url} 2x" %>
<% end %>
<% end %>

View File

@@ -36,6 +36,7 @@ article.post-preview {
&.post-preview-270 { width: 270px; }
&.post-preview-270w { width: 270px; }
&.post-preview-360 { width: 360px; }
&.post-preview-720 { width: 720px; }
}
.post-preview-150 .post-preview-image { max-height: 150px; width: auto; }
@@ -45,6 +46,7 @@ article.post-preview {
.post-preview-270 .post-preview-image { max-height: 270px; width: auto; }
.post-preview-270w .post-preview-image { max-height: 360px; width: auto; }
.post-preview-360 .post-preview-image { max-height: 360px; width: auto; }
.post-preview-720 .post-preview-image { max-height: 720px; width: auto; }
.post-preview {
img {