Tune up ios bubble style
// FREEBIE
This commit is contained in:
parent
8fbb0d05f5
commit
6c05a71424
5 changed files with 89 additions and 35 deletions
|
@ -148,7 +148,9 @@
|
||||||
<div class='bubble {{ avatar.color }}'>
|
<div class='bubble {{ avatar.color }}'>
|
||||||
<div class='sender' dir='auto'>{{ sender }}</div>
|
<div class='sender' dir='auto'>{{ sender }}</div>
|
||||||
<div class='attachments'></div>
|
<div class='attachments'></div>
|
||||||
<p class='content' dir='auto'>{{ message }}</p>
|
<p class='content' dir='auto'>
|
||||||
|
{{ #message }}<span class='body'>{{ message }}</span>{{ /message }}
|
||||||
|
</p>
|
||||||
<div class='meta'>
|
<div class='meta'>
|
||||||
<span class='timestamp' data-timestamp={{ timestamp }}></span>
|
<span class='timestamp' data-timestamp={{ timestamp }}></span>
|
||||||
<span class='status hide'></span>
|
<span class='status hide'></span>
|
||||||
|
|
|
@ -138,9 +138,11 @@
|
||||||
size: 16
|
size: 16
|
||||||
});
|
});
|
||||||
|
|
||||||
var content = this.$('.content');
|
var body = this.$('.body');
|
||||||
var escaped = content.html();
|
if (body.length > 0) {
|
||||||
content.html(escaped.replace(/\n/g, '<br>').replace(URL_REGEX, "$1<a href='$2' target='_blank'>$2</a>"));
|
var escaped = body.html();
|
||||||
|
body.html(escaped.replace(/\n/g, '<br>').replace(URL_REGEX, "$1<a href='$2' target='_blank'>$2</a>"));
|
||||||
|
}
|
||||||
|
|
||||||
this.renderSent();
|
this.renderSent();
|
||||||
this.renderDelivered();
|
this.renderDelivered();
|
||||||
|
|
|
@ -285,9 +285,6 @@ li.entry .error-icon-container {
|
||||||
left: -2px;
|
left: -2px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
padding: 9px 12px;
|
|
||||||
border-radius: $border-radius;
|
|
||||||
box-shadow: 0 3px 3px -4px black;
|
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
margin-left: 8px;
|
margin-left: 8px;
|
||||||
max-width: 30em;
|
max-width: 30em;
|
||||||
|
@ -297,7 +294,7 @@ li.entry .error-icon-container {
|
||||||
max-width: calc(100% - 45px - #{$error-icon-size}); // avatar size + padding + error-icon size
|
max-width: calc(100% - 45px - #{$error-icon-size}); // avatar size + padding + error-icon size
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.body {
|
||||||
-webkit-user-select: text;
|
-webkit-user-select: text;
|
||||||
white-space: pre-wrap;
|
white-space: pre-wrap;
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
&, .content {
|
||||||
&::selection, a::selection {
|
&::selection, a::selection {
|
||||||
background: white;
|
background: white;
|
||||||
color: $grey_d;
|
color: $grey_d;
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.attachments, .content {
|
&, .attachments, .content {
|
||||||
a {
|
a {
|
||||||
color: $grey_l;
|
color: $grey_l;
|
||||||
}
|
}
|
||||||
|
@ -23,17 +23,51 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.ios {
|
.ios {
|
||||||
.incoming .bubble {
|
.bubble {
|
||||||
background-color: $grey_l;
|
.content .body {
|
||||||
color: $grey_d;
|
display: inline-block;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
.content, .attachments img {
|
||||||
|
border-radius: 15px;
|
||||||
|
}
|
||||||
|
.meta {
|
||||||
|
float: none;
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.outgoing .bubble {
|
.incoming .content {
|
||||||
background-color: $blue;
|
background-color: #e5e5e5;
|
||||||
@include invert-text-color;
|
color: black;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
.outgoing {
|
||||||
|
.content {
|
||||||
|
background-color: $blue;
|
||||||
|
@include invert-text-color;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
.timestamp {
|
||||||
|
float: none;
|
||||||
|
}
|
||||||
|
.status {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.attachment {
|
||||||
|
a {
|
||||||
|
border-radius: 15px;
|
||||||
|
}
|
||||||
|
margin-bottom: 1px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.android {
|
.android {
|
||||||
|
.bubble {
|
||||||
|
padding: 9px 12px;
|
||||||
|
border-radius: $border-radius;
|
||||||
|
box-shadow: 0 3px 3px -4px black;
|
||||||
|
}
|
||||||
.outgoing .bubble {
|
.outgoing .bubble {
|
||||||
background-color: $grey_l;
|
background-color: $grey_l;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1052,9 +1052,6 @@ li.entry .error-icon-container {
|
||||||
left: -2px;
|
left: -2px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
padding: 9px 12px;
|
|
||||||
border-radius: 5px;
|
|
||||||
box-shadow: 0 3px 3px -4px black;
|
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
margin-left: 8px;
|
margin-left: 8px;
|
||||||
max-width: 30em;
|
max-width: 30em;
|
||||||
|
@ -1063,12 +1060,12 @@ li.entry .error-icon-container {
|
||||||
.message-container .bubble,
|
.message-container .bubble,
|
||||||
.message-list .bubble {
|
.message-list .bubble {
|
||||||
max-width: calc(100% - 45px - 24px); } }
|
max-width: calc(100% - 45px - 24px); } }
|
||||||
.message-container .bubble .content,
|
.message-container .bubble .body,
|
||||||
.message-list .bubble .content {
|
.message-list .bubble .body {
|
||||||
-webkit-user-select: text;
|
-webkit-user-select: text;
|
||||||
white-space: pre-wrap; }
|
white-space: pre-wrap; }
|
||||||
.message-container .bubble .content a,
|
.message-container .bubble .body a,
|
||||||
.message-list .bubble .content a {
|
.message-list .bubble .body a {
|
||||||
word-break: break-all; }
|
word-break: break-all; }
|
||||||
.message-container .bubble p,
|
.message-container .bubble p,
|
||||||
.message-list .bubble p {
|
.message-list .bubble p {
|
||||||
|
@ -1277,33 +1274,55 @@ li.entry .error-icon-container {
|
||||||
background-color: #d9d9d9;
|
background-color: #d9d9d9;
|
||||||
border-color: silver; }
|
border-color: silver; }
|
||||||
|
|
||||||
.ios .incoming .bubble {
|
.ios .bubble .content .body {
|
||||||
background-color: #f3f3f3;
|
display: inline-block;
|
||||||
color: #454545; }
|
padding: 10px; }
|
||||||
.ios .outgoing .bubble {
|
.ios .bubble .content, .ios .bubble .attachments img {
|
||||||
background-color: #2090ea; }
|
border-radius: 15px; }
|
||||||
.ios .outgoing .bubble, .ios .outgoing .bubble .meta {
|
.ios .bubble .meta {
|
||||||
|
float: none;
|
||||||
|
clear: both; }
|
||||||
|
.ios .incoming .content {
|
||||||
|
background-color: #e5e5e5;
|
||||||
|
color: black;
|
||||||
|
float: left; }
|
||||||
|
.ios .outgoing .content {
|
||||||
|
background-color: #2090ea;
|
||||||
|
float: right; }
|
||||||
|
.ios .outgoing .content, .ios .outgoing .content .meta {
|
||||||
color: white; }
|
color: white; }
|
||||||
.ios .outgoing .bubble .content::selection, .ios .outgoing .bubble .content a::selection {
|
.ios .outgoing .content::selection, .ios .outgoing .content a::selection, .ios .outgoing .content .content::selection, .ios .outgoing .content .content a::selection {
|
||||||
background: white;
|
background: white;
|
||||||
color: #454545; }
|
color: #454545; }
|
||||||
.ios .outgoing .bubble .content::-moz-selection, .ios .outgoing .bubble .content a::-moz-selection {
|
.ios .outgoing .content::-moz-selection, .ios .outgoing .content a::-moz-selection, .ios .outgoing .content .content::-moz-selection, .ios .outgoing .content .content a::-moz-selection {
|
||||||
background: white;
|
background: white;
|
||||||
color: #454545; }
|
color: #454545; }
|
||||||
.ios .outgoing .bubble .attachments a, .ios .outgoing .bubble .content a {
|
.ios .outgoing .content a, .ios .outgoing .content .attachments a, .ios .outgoing .content .content a {
|
||||||
color: #f3f3f3; }
|
color: #f3f3f3; }
|
||||||
|
.ios .outgoing .timestamp {
|
||||||
|
float: none; }
|
||||||
|
.ios .outgoing .status {
|
||||||
|
float: right; }
|
||||||
|
.ios .attachment {
|
||||||
|
margin-bottom: 1px; }
|
||||||
|
.ios .attachment a {
|
||||||
|
border-radius: 15px; }
|
||||||
|
|
||||||
|
.android .bubble {
|
||||||
|
padding: 9px 12px;
|
||||||
|
border-radius: 5px;
|
||||||
|
box-shadow: 0 3px 3px -4px black; }
|
||||||
.android .outgoing .bubble {
|
.android .outgoing .bubble {
|
||||||
background-color: #f3f3f3; }
|
background-color: #f3f3f3; }
|
||||||
.android .incoming .bubble, .android .incoming .bubble .meta {
|
.android .incoming .bubble, .android .incoming .bubble .meta {
|
||||||
color: white; }
|
color: white; }
|
||||||
.android .incoming .bubble .content::selection, .android .incoming .bubble .content a::selection {
|
.android .incoming .bubble::selection, .android .incoming .bubble a::selection, .android .incoming .bubble .content::selection, .android .incoming .bubble .content a::selection {
|
||||||
background: white;
|
background: white;
|
||||||
color: #454545; }
|
color: #454545; }
|
||||||
.android .incoming .bubble .content::-moz-selection, .android .incoming .bubble .content a::-moz-selection {
|
.android .incoming .bubble::-moz-selection, .android .incoming .bubble a::-moz-selection, .android .incoming .bubble .content::-moz-selection, .android .incoming .bubble .content a::-moz-selection {
|
||||||
background: white;
|
background: white;
|
||||||
color: #454545; }
|
color: #454545; }
|
||||||
.android .incoming .bubble .attachments a, .android .incoming .bubble .content a {
|
.android .incoming .bubble a, .android .incoming .bubble .attachments a, .android .incoming .bubble .content a {
|
||||||
color: #f3f3f3; }
|
color: #f3f3f3; }
|
||||||
|
|
||||||
.avatar.red, .conversation-header.red, .android .bubble.red {
|
.avatar.red, .conversation-header.red, .android .bubble.red {
|
||||||
|
|
Loading…
Reference in a new issue