constrain in the image uploader, don't crop
This commit is contained in:
parent
e1a7ff798a
commit
e84635dae2
3 changed files with 10 additions and 23 deletions
|
|
@ -21,10 +21,10 @@ class ProcessedImage < CarrierWave::Uploader::Base
|
||||||
process :resize_to_fill => [50,50]
|
process :resize_to_fill => [50,50]
|
||||||
end
|
end
|
||||||
version :thumb_medium do
|
version :thumb_medium do
|
||||||
process :resize_to_fill => [100,100]
|
process :resize_to_limit => [100,100]
|
||||||
end
|
end
|
||||||
version :thumb_large do
|
version :thumb_large do
|
||||||
process :resize_to_fill => [300,300]
|
process :resize_to_limit => [300,300]
|
||||||
end
|
end
|
||||||
|
|
||||||
version :scaled_full do
|
version :scaled_full do
|
||||||
|
|
|
||||||
|
|
@ -3,19 +3,7 @@
|
||||||
-# the COPYRIGHT file.
|
-# the COPYRIGHT file.
|
||||||
|
|
||||||
|
|
||||||
- content_for :head do
|
|
||||||
:javascript
|
|
||||||
$(document).ready(function(){
|
|
||||||
$("#thumbnails").find("img").bind("mouseenter",function(){
|
|
||||||
var photo = $(this),
|
|
||||||
messageId = photo.attr("data-message-id");
|
|
||||||
|
|
||||||
$("#thumbnails").find("img[data-message-id='"+messageId+"']").css('opacity','0.5');
|
|
||||||
$("#thumbnails").find("img").fadeTo(100,1);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
#thumbnails.span-15.last
|
#thumbnails.span-15.last
|
||||||
- for photo in photos
|
- for photo in photos
|
||||||
= link_to (image_tag photo.url(:thumb_medium), "data-message-guid" => photo.status_message_guid ), photo_path(photo)
|
= link_to (image_tag photo.url(:thumb_large), "data-message-guid" => photo.status_message_guid ), photo_path(photo)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1054,17 +1054,16 @@ img.scaled_full
|
||||||
#thumbnails
|
#thumbnails
|
||||||
a
|
a
|
||||||
:display inline-block
|
:display inline-block
|
||||||
:width 100px
|
:height 125px
|
||||||
:min-width 100px
|
|
||||||
:height 100px
|
|
||||||
:min-height 100px
|
|
||||||
:margin
|
:margin
|
||||||
:bottom 15px
|
:bottom 8px
|
||||||
:right 15px
|
:right 2px
|
||||||
|
:vertical-align middle
|
||||||
|
:background
|
||||||
|
:color red
|
||||||
|
|
||||||
img
|
img
|
||||||
:height 100px
|
:max-height 125px
|
||||||
:width 100px
|
|
||||||
|
|
||||||
#global_search
|
#global_search
|
||||||
:display inline
|
:display inline
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue