Refactor css to support theming

Move away from inline style attributes for setting contact colors.
Apply colors by name via css classes instead. Also lays groundwork
for syncing contact colors.

// FREEBIE
This commit is contained in:
lilia 2016-08-28 23:57:33 -07:00
parent ce583bed18
commit 7b9894d688
8 changed files with 174 additions and 76 deletions

View file

@ -8,21 +8,21 @@
// TODO: Factor out private and group subclasses of Conversation
var COLORS = [
'#EF5350', // red
'#EC407A', // pink
'#AB47BC', // purple
'#7E57C2', // deep purple
'#5C6BC0', // indigo
'#2196F3', // blue
'#03A9F4', // light blue
'#00BCD4', // cyan
'#009688', // teal
'#4CAF50', // green
'#7CB342', // light green
'#FF9800', // orange
'#FF5722', // deep orange
'#FFB300', // amber
'#607D8B', // blue grey
'red',
'pink',
'purple',
'deep_purple',
'indigo',
'blue',
'light_blue',
'cyan',
'teal',
'green',
'light_green',
'orange',
'deep_orange',
'amber',
'blue_grey',
];
Whisper.Conversation = Backbone.Model.extend({
@ -360,10 +360,10 @@
if (title) {
color = COLORS[Math.abs(this.hashCode()) % 15];
} else {
color = '#999999';
color = 'grey';
}
} else {
color = '#2090ea';
color = 'default';
}
if (this.avatarUrl) {