Fix bug with 0th contact color

Contact color css class wasn't being rendered because 0 is falsey.

// FREEBIE
This commit is contained in:
lilia 2015-07-31 16:38:55 -07:00
parent 47b58b8994
commit d808d255eb
4 changed files with 32 additions and 32 deletions

View file

@ -250,7 +250,7 @@
}
var initials = title.trim()[0];
return {
color: Math.abs(this.hashCode()) % 15,
color: 1 + (Math.abs(this.hashCode()) % 15),
content: initials
};
} else {

View file

@ -358,18 +358,18 @@ $avatar-size: 44px;
// avatar colors
.avatar.colorgray { background-color: #999999 }
.avatar.color0 { background-color: #EF5350 } // red
.avatar.color1 { background-color: #EC407A } // pink
.avatar.color2 { background-color: #AB47BC } // purple
.avatar.color3 { background-color: #7E57C2 } // deep purple
.avatar.color4 { background-color: #5C6BC0 } // indigo
.avatar.color5 { background-color: #2196F3 } // blue
.avatar.color6 { background-color: #03A9F4 } // light blue
.avatar.color7 { background-color: #00BCD4 } // cyan
.avatar.color8 { background-color: #009688 } // teal
.avatar.color9 { background-color: #4CAF50 } // green
.avatar.color10 { background-color: #7CB342 } // light green
.avatar.color11 { background-color: #FF9800 } // orange
.avatar.color12 { background-color: #FF5722 } // deep orange
.avatar.color13 { background-color: #FFB300 } // amber
.avatar.color14 { background-color: #607D8B } // blue grey
.avatar.color1 { background-color: #EF5350 } // red
.avatar.color2 { background-color: #EC407A } // pink
.avatar.color3 { background-color: #AB47BC } // purple
.avatar.color4 { background-color: #7E57C2 } // deep purple
.avatar.color5 { background-color: #5C6BC0 } // indigo
.avatar.color6 { background-color: #2196F3 } // blue
.avatar.color7 { background-color: #03A9F4 } // light blue
.avatar.color8 { background-color: #00BCD4 } // cyan
.avatar.color9 { background-color: #009688 } // teal
.avatar.color10 { background-color: #4CAF50 } // green
.avatar.color11 { background-color: #7CB342 } // light green
.avatar.color12 { background-color: #FF9800 } // orange
.avatar.color13 { background-color: #FF5722 } // deep orange
.avatar.color14 { background-color: #FFB300 } // amber
.avatar.color15 { background-color: #607D8B } // blue grey

View file

@ -277,49 +277,49 @@ img.emoji {
.avatar.colorgray {
background-color: #999999; }
.avatar.color0 {
.avatar.color1 {
background-color: #EF5350; }
.avatar.color1 {
.avatar.color2 {
background-color: #EC407A; }
.avatar.color2 {
.avatar.color3 {
background-color: #AB47BC; }
.avatar.color3 {
.avatar.color4 {
background-color: #7E57C2; }
.avatar.color4 {
.avatar.color5 {
background-color: #5C6BC0; }
.avatar.color5 {
.avatar.color6 {
background-color: #2196F3; }
.avatar.color6 {
.avatar.color7 {
background-color: #03A9F4; }
.avatar.color7 {
.avatar.color8 {
background-color: #00BCD4; }
.avatar.color8 {
.avatar.color9 {
background-color: #009688; }
.avatar.color9 {
.avatar.color10 {
background-color: #4CAF50; }
.avatar.color10 {
.avatar.color11 {
background-color: #7CB342; }
.avatar.color11 {
.avatar.color12 {
background-color: #FF9800; }
.avatar.color12 {
.avatar.color13 {
background-color: #FF5722; }
.avatar.color13 {
.avatar.color14 {
background-color: #FFB300; }
.avatar.color14 {
.avatar.color15 {
background-color: #607D8B; }
.gutter {

File diff suppressed because one or more lines are too long