add crop option

This commit is contained in:
邱博亞 2023-02-18 11:26:07 +08:00
parent 92e2673c09
commit 46df77f0e0
4 changed files with 6 additions and 1 deletions

View File

@ -1,6 +1,7 @@
$('.show-gallery .show-content.col-sm-2').ready(function() {
if ($('.show-gallery .show-content.col-sm-2').eq(0).css('float') == 'left') {
$('.show-gallery .show-content.col-sm-2').eq(0).parent().css('float', 'left')
$('.show-gallery .show-content.col-sm-2').eq(0).parent().css('float', 'left');
$('.show-gallery .show-content.col-sm-2').eq(0).parent().css('width', '100%');
}
})
window.GalleryTheater = function() {

View File

@ -182,6 +182,8 @@ class GalleryUploader < CarrierWave::Uploader::Base
resize_and_pad(w, h, (transparent? ? :transparent : now_album.album_colors.first['color']), (now_album.resize_gravity rescue 'Center'))
when 1
limit_process(w, h)
when 2
resize_to_fill(w, h)
end
end
end

View File

@ -7,6 +7,7 @@ en:
thumb_process_option:
- resize and padding
- resize only
- resize and crop
inner_page_layout: Inner Page Layout
card_style: Card Style
grid_style: Grid Style

View File

@ -7,6 +7,7 @@ zh_tw:
thumb_process_option:
- 縮放並填充
- 僅縮放
- 縮放並裁切
inner_page_layout: 內頁頁面樣式
card_style: 卡片樣式
grid_style: 格子排版樣式