fix blank profile pic dimensions, add sensible limits
change blank image to square (rather than 1x16) so that it's not ridiculously tall when scaled up. also add min and max height for avatar images at display time so that we don't break the layout test plan 1. go to the new profile page on an account with avatars disabled 2. the blank avatar image should be a square Change-Id: I68729fbe2097c893aa6623b867ee22591296ed36 Reviewed-on: https://gerrit.instructure.com/12696 Tested-by: Jenkins <jenkins@instructure.com> Reviewed-by: Jon Jensen <jon@instructure.com>
This commit is contained in:
parent
996b2431a9
commit
264448c5ac
|
@ -153,7 +153,7 @@ module ApplicationHelper
|
||||||
if session["reported_#{user_id}"]
|
if session["reported_#{user_id}"]
|
||||||
image_tag "messages/avatar-50.png"
|
image_tag "messages/avatar-50.png"
|
||||||
else
|
else
|
||||||
image_tag(avatar_image_url(User.avatar_key(user_id || 0), :bust => Time.now.to_i), :style => "width: #{width}px;", :alt => '')
|
image_tag(avatar_image_url(User.avatar_key(user_id || 0), :bust => Time.now.to_i), :style => "width: #{width}px; min-height: #{(width/1.6).to_i}px; max-height: #{(width*1.6).to_i}px", :alt => '')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 39 B After Width: | Height: | Size: 37 B |
Loading…
Reference in New Issue