avatar: add size 30, fix unique scaled avatar background

This commit is contained in:
Felix Niklas 2016-03-23 15:14:42 +01:00
parent fa223d560f
commit 77eccea2c9
2 changed files with 18 additions and 4 deletions

View file

@ -48,6 +48,7 @@ class App.User extends App.Model
return '??'
avatar: (size = 40, placement = '', cssClass = '', unique = false, avatar, type = undefined) ->
baseSize = 40
size = parseInt(size, 10)
cssClass += ' ' if cssClass
@ -92,8 +93,8 @@ class App.User extends App.Model
cssClass: cssClass
placement: placement
vip: vip
x: x
y: y
x: x * size/baseSize
y: y * size/baseSize
initials: @initials()
# generate image based avatar

View file

@ -3381,6 +3381,11 @@ footer {
vertical-align: bottom;
position: relative;
&.size-30 {
width: 30px;
height: 30px;
}
.icon-crown {
position: absolute;
width: 28px;
@ -3414,7 +3419,7 @@ footer {
&.unique {
background-image: image_url("/assets/images/avatar-bg.png");
background-size: auto;
background-size: 300px 226px;
color: white;
line-height: 40px;
text-align: center;
@ -3424,14 +3429,22 @@ footer {
text-shadow: 0 1px rgba(0,0,0,.2);
cursor: default;
&.size-30 {
font-size: 10px;
line-height: 32px;
background-size: 225px 170px;
}
&.size-50 {
font-size: 16px;
line-height: 52px;
background-size: 375px 283px;
}
&.size-80 {
font-size: 20px;
font-size: 26px;
line-height: 84px;
background-size: 600px 452px;
}
}