Incoming bubbles have sender's color background

// FREEBIE
This commit is contained in:
lilia 2016-03-23 16:13:41 -07:00
parent 4060221b9c
commit 512c5bf739
7 changed files with 51 additions and 84 deletions

View file

@ -116,7 +116,7 @@
</script> </script>
<script type='text/x-tmpl-mustache' id='message'> <script type='text/x-tmpl-mustache' id='message'>
{{> avatar }} {{> avatar }}
<div class='bubble'> <div class='bubble' style='background-color: {{ avatar.color }};'>
<div class='sender'>{{ sender }}</div> <div class='sender'>{{ sender }}</div>
<div class='attachments'></div> <div class='attachments'></div>
<p class='content'>{{ message }}</p> <p class='content'>{{ message }}</p>

BIN
images/check-black.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 B

View file

@ -100,7 +100,7 @@
} }
}, },
render: function() { render: function() {
var contact = this.model.getContact(); var contact = this.model.isIncoming() ? this.model.getContact() : null;
this.$el.html( this.$el.html(
Mustache.render(_.result(this, 'template', ''), { Mustache.render(_.result(this, 'template', ''), {
message: this.model.get('body'), message: this.model.get('body'),

View file

@ -321,11 +321,11 @@
} }
.sent .status { .sent .status {
display: inline-block; display: inline-block;
background: url('/images/check-white.png'); background: url('/images/check-black.png');
} }
.delivered .status { .delivered .status {
display: inline-block; display: inline-block;
background: url('/images/double-check-white.png'); background: url('/images/double-check-black.png');
} }
.pending .status { .pending .status {
display: inline-block; display: inline-block;
@ -347,29 +347,6 @@
float: left; float: left;
} }
.bubble { .bubble {
color: $grey_d;
background-color: $grey_l;
&::before {
left: -10px;
border-right: 10px solid white;
}
&::after {
left: -8px;
border-right: 8px solid $grey_l;
}
}
}
.outgoing {
.avatar, .bubble {
float: right;
}
.bubble {
clear: left;
color: white; color: white;
background-color: $blue; background-color: $blue;
@ -377,21 +354,6 @@
color: white; color: white;
} }
&::before {
right: -10px;
border-left: 10px solid white;
}
&::after {
right: -8px;
border-left: 8px solid $blue;
}
.attachments, .content {
a {
color: $grey_l;
}
}
.content { .content {
&::selection, a::selection { &::selection, a::selection {
color: $grey_d; color: $grey_d;
@ -403,6 +365,24 @@
background: white; background: white;
} }
} }
.attachments, .content {
a {
color: $grey_l;
}
}
}
}
.outgoing {
.avatar, .bubble {
float: right;
}
.bubble {
background-color: $grey_l;
clear: left;
} }
} }

View file

@ -61,6 +61,7 @@
color: white; color: white;
background-color: #999999; background-color: #999999;
transition: background-color 0.5s; transition: background-color 0.5s;
border-bottom: 1px solid rgba(0,0,0,0.2);
.avatar { .avatar {
margin-bottom: -30px; margin-bottom: -30px;
@ -75,6 +76,7 @@
.inactive .conversation-header { .inactive .conversation-header {
background-color: $grey_l !important; background-color: $grey_l !important;
color: $grey_d; color: $grey_d;
border-color: 1px solid rgba(0,0,0,0.05);
} }
input.search { input.search {

View file

@ -474,7 +474,8 @@ input[type=text]:active, input[type=text]:focus, input[type=search]:active, inpu
text-align: center; text-align: center;
color: white; color: white;
background-color: #999999; background-color: #999999;
transition: background-color 0.5s; } transition: background-color 0.5s;
border-bottom: 1px solid rgba(0, 0, 0, 0.2); }
.conversation-header .avatar { .conversation-header .avatar {
margin-bottom: -30px; margin-bottom: -30px;
border: solid 2px white; border: solid 2px white;
@ -486,7 +487,8 @@ input[type=text]:active, input[type=text]:focus, input[type=search]:active, inpu
.inactive .conversation-header { .inactive .conversation-header {
background-color: #f3f3f3 !important; background-color: #f3f3f3 !important;
color: #454545; } color: #454545;
border-color: 1px solid rgba(0, 0, 0, 0.05); }
input.search { input.search {
border: none; border: none;
@ -875,11 +877,11 @@ input.search {
.message-container .sent .status, .message-container .sent .status,
.message-list .sent .status { .message-list .sent .status {
display: inline-block; display: inline-block;
background: url("/images/check-white.png"); } background: url("/images/check-black.png"); }
.message-container .delivered .status, .message-container .delivered .status,
.message-list .delivered .status { .message-list .delivered .status {
display: inline-block; display: inline-block;
background: url("/images/double-check-white.png"); } background: url("/images/double-check-black.png"); }
.message-container .pending .status, .message-container .pending .status,
.message-list .pending .status { .message-list .pending .status {
display: inline-block; display: inline-block;
@ -902,50 +904,33 @@ input.search {
float: left; } float: left; }
.message-container .incoming .bubble, .message-container .incoming .bubble,
.message-list .incoming .bubble { .message-list .incoming .bubble {
color: #454545; color: white;
background-color: #f3f3f3; } background-color: #2090ea; }
.message-container .incoming .bubble::before, .message-container .incoming .bubble .meta,
.message-list .incoming .bubble::before { .message-list .incoming .bubble .meta {
left: -10px; color: white; }
border-right: 10px solid white; } .message-container .incoming .bubble .content::selection, .message-container .incoming .bubble .content a::selection,
.message-container .incoming .bubble::after, .message-list .incoming .bubble .content::selection,
.message-list .incoming .bubble::after { .message-list .incoming .bubble .content a::selection {
left: -8px; color: #454545;
border-right: 8px solid #f3f3f3; } background: white; }
.message-container .incoming .bubble .content::-moz-selection, .message-container .incoming .bubble .content a::-moz-selection,
.message-list .incoming .bubble .content::-moz-selection,
.message-list .incoming .bubble .content a::-moz-selection {
color: #454545;
background: white; }
.message-container .incoming .bubble .attachments a, .message-container .incoming .bubble .content a,
.message-list .incoming .bubble .attachments a,
.message-list .incoming .bubble .content a {
color: #f3f3f3; }
.message-container .outgoing .avatar, .message-container .outgoing .bubble, .message-container .outgoing .avatar, .message-container .outgoing .bubble,
.message-list .outgoing .avatar, .message-list .outgoing .avatar,
.message-list .outgoing .bubble { .message-list .outgoing .bubble {
float: right; } float: right; }
.message-container .outgoing .bubble, .message-container .outgoing .bubble,
.message-list .outgoing .bubble { .message-list .outgoing .bubble {
clear: left; background-color: #f3f3f3;
color: white; clear: left; }
background-color: #2090ea; }
.message-container .outgoing .bubble .meta,
.message-list .outgoing .bubble .meta {
color: white; }
.message-container .outgoing .bubble::before,
.message-list .outgoing .bubble::before {
right: -10px;
border-left: 10px solid white; }
.message-container .outgoing .bubble::after,
.message-list .outgoing .bubble::after {
right: -8px;
border-left: 8px solid #2090ea; }
.message-container .outgoing .bubble .attachments a, .message-container .outgoing .bubble .content a,
.message-list .outgoing .bubble .attachments a,
.message-list .outgoing .bubble .content a {
color: #f3f3f3; }
.message-container .outgoing .bubble .content::selection, .message-container .outgoing .bubble .content a::selection,
.message-list .outgoing .bubble .content::selection,
.message-list .outgoing .bubble .content a::selection {
color: #454545;
background: white; }
.message-container .outgoing .bubble .content::-moz-selection, .message-container .outgoing .bubble .content a::-moz-selection,
.message-list .outgoing .bubble .content::-moz-selection,
.message-list .outgoing .bubble .content a::-moz-selection {
color: #454545;
background: white; }
.message-container .control .bubble .content, .message-container .control .bubble .content,
.message-list .control .bubble .content { .message-list .control .bubble .content {
font-style: italic; } font-style: italic; }