Initial restyle

Added background gradient and restyled conversation elements as floating
panels and cards.

// FREEBIE
This commit is contained in:
lilia 2015-10-16 18:14:50 -07:00
parent ee393bfa03
commit 389b9a026d
7 changed files with 126 additions and 116 deletions

View file

@ -11,12 +11,12 @@
</ul> </ul>
</div> </div>
<span class='socket-status'></span> <span class='socket-status'></span>
<div class='tool-bar clearfix'>
<!-- <button class='show-new-conversation'></button> -->
<input type='text' class='search' placeholder='Search'>
</div>
</div> </div>
<div class='gutter'> <div class='gutter'>
<div class='tool-bar clearfix'>
<input type='text' class='search' placeholder='Search'>
<!-- <button class='show-new-conversation'></button> -->
</div>
<div class='conversations scrollable inbox'></div> <div class='conversations scrollable inbox'></div>
<div class='conversations scrollable search-results hide'> <div class='conversations scrollable search-results hide'>
<div class='new-contact contact hide'></div> <div class='new-contact contact hide'></div>
@ -71,9 +71,9 @@
<div class="close">x</div> <div class="close">x</div>
</script> </script>
<script type='text/x-tmpl-mustache' id='message'> <script type='text/x-tmpl-mustache' id='message'>
<div class='sender'>{{ sender }}</div>
{{> avatar }} {{> avatar }}
<div class="bubble"> <div class="bubble">
<div class='sender'>{{ sender }}</div>
<div class='attachments'></div> <div class='attachments'></div>
<p class="content">{{ message }}</p> <p class="content">{{ message }}</p>
<div class='meta'> <div class='meta'>

View file

@ -229,7 +229,9 @@
$bottomBar.outerHeight(this.$messageField.outerHeight() + 1); $bottomBar.outerHeight(this.$messageField.outerHeight() + 1);
var $bottomBarNewHeight = $bottomBar.outerHeight(); var $bottomBarNewHeight = $bottomBar.outerHeight();
$discussionContainer.outerHeight(this.$el.outerHeight() - $bottomBarNewHeight - this.$('.conversation-header').outerHeight());
//TODO: revisit this logic for new layout.
$discussionContainer.outerHeight(this.$el.outerHeight() - $bottomBarNewHeight - this.$('.conversation-header').outerHeight() - 20);
this.view.scrollToBottomIfNeeded(); this.view.scrollToBottomIfNeeded();
}, },

View file

@ -1,5 +1,12 @@
.conversation { .conversation {
background-color: #ffffff; background-color: #ffffff;
margin: 10px;
padding: 10px;
border-radius: 10px;
.panel {
height: 100%;
}
} }
.conversation-title { .conversation-title {
display: block; display: block;
@ -11,18 +18,20 @@
} }
.conversation { .conversation {
height: calc(100% - 20px);
border-radius: 10px;
.file-input .close { .file-input .close {
top: -10px; top: -10px;
} }
.discussion-container { .discussion-container {
height: calc(100% - 2 * #{$header-height}); height: calc(100% - 2 * #{$header-height} - 60px);
} }
} }
.group-member-list, .group-member-list,
.new-group-update, .new-group-update,
.conversation, .message-list, .message-detail, .key-verification { .message-list, .message-detail, .key-verification {
height: 100%; height: 100%;
} }
@ -172,10 +181,13 @@
.sender { .sender {
font-size: smaller; font-size: smaller;
opacity: 0.8; opacity: 0.8;
margin-bottom: 5px;
font-weight: bold;
} }
.timestamp { .timestamp {
font-size: smaller; font-size: smaller;
margin-right: 3px;
} }
.entry.delivered .checkmark { .entry.delivered .checkmark {
@ -195,6 +207,10 @@
} }
} }
&::-webkit-scrollbar-thumb {
background: rgba(0,0,0,0.15);
}
} }
.message-detail, .message-detail,
@ -219,30 +235,12 @@
left: -2px; left: -2px;
display: inline-block; display: inline-block;
vertical-align: top; vertical-align: top;
max-width: calc(100% - 20px - 2 * 12px); max-width: calc(100% - 20px - 2 * 22px);
padding: 9px 12px; padding: 9px 12px;
border-radius: 4px; border-radius: 10px;
box-shadow: 0 3px 3px -4px black; box-shadow: 0 3px 3px -4px black;
word-wrap: break-word; word-wrap: break-word;
margin-left: 8px;
&::before, &::after {
content: '';
position: absolute;
height: 0;
width: 0;
}
&::before {
top: (34px / 2) - 8px;
border-top: 8px solid transparent;
border-bottom: 8px solid transparent;
}
&::after {
top: (34px / 2) - 6px;
border-top: 6px solid transparent;
border-bottom: 6px solid transparent;
}
.content { .content {
-webkit-user-select: text; -webkit-user-select: text;
@ -291,6 +289,10 @@
left: -8px; left: -8px;
border-right: 8px solid $grey_l; border-right: 8px solid $grey_l;
} }
.timestamp {
color: #999;
}
} }
} }
@ -417,7 +419,7 @@
.bottom-bar { .bottom-bar {
$button-width: 36px; $button-width: 36px;
margin-top: 4px;
height: 36px; height: 36px;
border-top: 1px solid $grey_l; border-top: 1px solid $grey_l;
background: white; background: white;

View file

@ -37,14 +37,11 @@ body {
height: $header-height; height: $header-height;
line-height: 24px; line-height: 24px;
color: #f2f2f2; color: #f2f2f2;
box-shadow: 0 -4px 3px 4px rgba(darken($header-color, 30%), 0.8);
background-color: $header-color;
-webkit-app-region: drag; -webkit-app-region: drag;
button { button {
-webkit-app-region: no-drag; -webkit-app-region: no-drag;
color: inherit; color: inherit;
background-color: $blue;
&:hover { &:hover {
background-color: rgba(darken($blue, 10%), 0.8); background-color: rgba(darken($blue, 10%), 0.8);
@ -83,11 +80,24 @@ button.back {
} }
} }
::-webkit-scrollbar {
width: 10px;
}
::-webkit-scrollbar-track {
}
::-webkit-scrollbar-thumb {
border-radius: 10px;
background: rgba(255,255,255,0.6);
}
.menu { .menu {
position: relative; position: relative;
float: right; float: right;
height: 36px; height: 36px;
padding-right: 8px; padding-left: 8px;
.hamburger { .hamburger {
width: $header-height; width: $header-height;
@ -263,12 +273,18 @@ $avatar-size: 44px;
overflow: hidden; overflow: hidden;
box-shadow: 0 0px 1px rgba(#aaa, 0.8); box-shadow: 0 0px 1px rgba(#aaa, 0.8);
background: $grey_l; background: $grey_l;
margin: 10px;
border-radius: 10px;
&.selected { &.selected {
background: $blue; background: $blue;
color: #ffffff; color: #ffffff;
} }
&:first-child {
margin-top: 0;
}
&:last-child::after { &:last-child::after {
display: none; display: none;
} }

View file

@ -1,5 +1,4 @@
.gutter { .gutter {
background: $grey_l;
padding: $header-height 0 0; padding: $header-height 0 0;
} }
@ -19,15 +18,16 @@
.gutter { .gutter {
float: left; float: left;
margin: 10px 0;
width: 300px; width: 300px;
border-right: solid 1px #ddd;
.conversations { .conversations {
height: calc(100% - #{$header-height}); height: calc(100% - 20px);
width: 100%; width: 100%;
} }
} }
.socket-status { .socket-status {
float: right;
padding: 6px; padding: 6px;
-webkit-app-region: no-drag; -webkit-app-region: no-drag;
@ -53,7 +53,6 @@
} }
.conversation-stack { .conversation-stack {
background: url('/images/icon_tile.png');
padding-left: 300px; padding-left: 300px;
padding-top: $header-height; padding-top: $header-height;
.conversation { .conversation {
@ -64,21 +63,11 @@
} }
} }
.tool-bar,
.conversation-header { .conversation-header {
background: $grey_l;
border-bottom: solid 1px darken($grey_l, 10%); border-bottom: solid 1px darken($grey_l, 10%);
margin-bottom: 4px;
} }
.menu.conversation-menu { .menu.conversation-menu {
float: right;
padding-left: 8px;
padding-right: 0;
.menu-list {
right: 0;
left: initial;
}
button.drop-down { button.drop-down {
background: url('/images/arrow_drop_down.png') no-repeat center; background: url('/images/arrow_drop_down.png') no-repeat center;
} }
@ -109,20 +98,20 @@ input.search {
input.search { input.search {
height: $header-height - 10px; height: $header-height - 10px;
width: calc(100% - #{$header-height + 10px}); width: 280px;
background: $grey_l; background: rgba(255,255,255,0.2);
margin: 5px; margin: 10px;
padding: 5px; padding: 5px;
&:before { &::-webkit-input-placeholder {
content: 'Search'; color: white;
} }
&.active, &:active, &:focus { &.active, &:active, &:focus {
background: white; background: white;
&:before { &::-webkit-input-placeholder {
content: ''; color: #ccc;
} }
} }
} }
@ -147,7 +136,7 @@ input.search {
.index { .index {
color: $grey_d; color: $grey_d;
background: #eee; background: linear-gradient(rgba(46,172,224,1.0) 50%, rgba(160,228,208,1.0) 100%);
.gutter .new-group-update-form { .gutter .new-group-update-form {
display: none; display: none;

View file

@ -28,3 +28,4 @@ $roboto-light: Roboto-Light, 'Helvetica Neue', Arial, Helvetica, sans-serif;
$header-height: 36px; $header-height: 36px;
$header-color: $blue; $header-color: $blue;
$bubble-border-radius: 20px;

View file

@ -46,13 +46,10 @@ body {
height: 36px; height: 36px;
line-height: 24px; line-height: 24px;
color: #f2f2f2; color: #f2f2f2;
box-shadow: 0 -4px 3px 4px rgba(10, 62, 103, 0.8);
background-color: #2090ea;
-webkit-app-region: drag; } -webkit-app-region: drag; }
#header button { #header button {
-webkit-app-region: no-drag; -webkit-app-region: no-drag;
color: inherit; color: inherit; }
background-color: #2090ea; }
#header button:hover { #header button:hover {
background-color: rgba(19, 117, 196, 0.8); } background-color: rgba(19, 117, 196, 0.8); }
@ -82,11 +79,18 @@ button.back {
button.back + .title-text { button.back + .title-text {
text-indent: -36px; } text-indent: -36px; }
::-webkit-scrollbar {
width: 10px; }
::-webkit-scrollbar-thumb {
border-radius: 10px;
background: rgba(255, 255, 255, 0.6); }
.menu { .menu {
position: relative; position: relative;
float: right; float: right;
height: 36px; height: 36px;
padding-right: 8px; } padding-left: 8px; }
.menu .hamburger { .menu .hamburger {
width: 36px; width: 36px;
height: 36px; height: 36px;
@ -222,10 +226,14 @@ img.emoji {
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
box-shadow: 0 0px 1px rgba(170, 170, 170, 0.8); box-shadow: 0 0px 1px rgba(170, 170, 170, 0.8);
background: #f3f3f3; } background: #f3f3f3;
margin: 10px;
border-radius: 10px; }
.contact.selected { .contact.selected {
background: #2090ea; background: #2090ea;
color: #ffffff; } color: #ffffff; }
.contact:first-child {
margin-top: 0; }
.contact:last-child::after { .contact:last-child::after {
display: none; } display: none; }
.contact .contact-details { .contact .contact-details {
@ -385,7 +393,6 @@ img.emoji {
-webkit-user-select: text; } -webkit-user-select: text; }
.gutter { .gutter {
background: #f3f3f3;
padding: 36px 0 0; } padding: 36px 0 0; }
.conversation-stack, .conversation-stack,
@ -398,13 +405,14 @@ img.emoji {
.gutter { .gutter {
float: left; float: left;
width: 300px; margin: 10px 0;
border-right: solid 1px #ddd; } width: 300px; }
.gutter .conversations { .gutter .conversations {
height: calc(100% - 36px); height: calc(100% - 20px);
width: 100%; } width: 100%; }
.socket-status { .socket-status {
float: right;
padding: 6px; padding: 6px;
-webkit-app-region: no-drag; } -webkit-app-region: no-drag; }
.socket-status * { .socket-status * {
@ -422,7 +430,6 @@ img.emoji {
background: url("/images/error_red.png") no-repeat left center; } background: url("/images/error_red.png") no-repeat left center; }
.conversation-stack { .conversation-stack {
background: url("/images/icon_tile.png");
padding-left: 300px; padding-left: 300px;
padding-top: 36px; } padding-top: 36px; }
.conversation-stack .conversation { .conversation-stack .conversation {
@ -430,20 +437,12 @@ img.emoji {
.conversation-stack .conversation:first-child { .conversation-stack .conversation:first-child {
display: block; } display: block; }
.tool-bar,
.conversation-header { .conversation-header {
background: #f3f3f3; border-bottom: solid 1px #d9d9d9;
border-bottom: solid 1px #d9d9d9; } margin-bottom: 4px; }
.menu.conversation-menu { .menu.conversation-menu button.drop-down {
float: right; background: url("/images/arrow_drop_down.png") no-repeat center; }
padding-left: 8px;
padding-right: 0; }
.menu.conversation-menu .menu-list {
right: 0;
left: initial; }
.menu.conversation-menu button.drop-down {
background: url("/images/arrow_drop_down.png") no-repeat center; }
input.search { input.search {
border: none; border: none;
@ -464,16 +463,16 @@ input.search {
background-color: #ebebeb; } background-color: #ebebeb; }
.tool-bar input.search { .tool-bar input.search {
height: 26px; height: 26px;
width: calc(100% - 46px); width: 280px;
background: #f3f3f3; background: rgba(255, 255, 255, 0.2);
margin: 5px; margin: 10px;
padding: 5px; } padding: 5px; }
.tool-bar input.search:before { .tool-bar input.search::-webkit-input-placeholder {
content: 'Search'; } color: white; }
.tool-bar input.search.active, .tool-bar input.search:active, .tool-bar input.search:focus { .tool-bar input.search.active, .tool-bar input.search:active, .tool-bar input.search:focus {
background: white; } background: white; }
.tool-bar input.search.active:before, .tool-bar input.search:active:before, .tool-bar input.search:focus:before { .tool-bar input.search.active::-webkit-input-placeholder, .tool-bar input.search:active::-webkit-input-placeholder, .tool-bar input.search:focus::-webkit-input-placeholder {
content: ''; } color: #ccc; }
.last-timestamp { .last-timestamp {
font-size: smaller; } font-size: smaller; }
@ -492,7 +491,7 @@ input.search {
.index { .index {
color: #454545; color: #454545;
background: #eee; } background: linear-gradient(#2eace0 50%, #a0e4d0 100%); }
.index .gutter .new-group-update-form { .index .gutter .new-group-update-form {
display: none; display: none;
padding: 0.5em; } padding: 0.5em; }
@ -520,7 +519,12 @@ input.search {
font-weight: bold; } font-weight: bold; }
.conversation { .conversation {
background-color: #ffffff; } background-color: #ffffff;
margin: 10px;
padding: 10px;
border-radius: 10px; }
.conversation .panel {
height: 100%; }
.conversation-title { .conversation-title {
display: block; display: block;
@ -530,14 +534,17 @@ input.search {
text-overflow: ellipsis; text-overflow: ellipsis;
padding-left: 10px; } padding-left: 10px; }
.conversation .file-input .close { .conversation {
top: -10px; } height: calc(100% - 20px);
.conversation .discussion-container { border-radius: 10px; }
height: calc(100% - 2 * 36px); } .conversation .file-input .close {
top: -10px; }
.conversation .discussion-container {
height: calc(100% - 2 * 36px - 60px); }
.group-member-list, .group-member-list,
.new-group-update, .new-group-update,
.conversation, .message-list, .message-detail, .key-verification { .message-list, .message-detail, .key-verification {
height: 100%; } height: 100%; }
.key-verification { .key-verification {
@ -642,10 +649,13 @@ input.search {
.sender { .sender {
font-size: smaller; font-size: smaller;
opacity: 0.8; } opacity: 0.8;
margin-bottom: 5px;
font-weight: bold; }
.timestamp { .timestamp {
font-size: smaller; } font-size: smaller;
margin-right: 3px; }
.entry.delivered .checkmark { .entry.delivered .checkmark {
display: inline; } display: inline; }
@ -658,6 +668,8 @@ input.search {
cursor: pointer; } cursor: pointer; }
.message-list .timestamp:hover { .message-list .timestamp:hover {
text-decoration: underline; } text-decoration: underline; }
.message-list::-webkit-scrollbar-thumb {
background: rgba(0, 0, 0, 0.15); }
.message-detail, .message-detail,
.message-list { .message-list {
@ -679,28 +691,12 @@ input.search {
left: -2px; left: -2px;
display: inline-block; display: inline-block;
vertical-align: top; vertical-align: top;
max-width: calc(100% - 20px - 2 * 12px); max-width: calc(100% - 20px - 2 * 22px);
padding: 9px 12px; padding: 9px 12px;
border-radius: 4px; border-radius: 10px;
box-shadow: 0 3px 3px -4px black; box-shadow: 0 3px 3px -4px black;
word-wrap: break-word; } word-wrap: break-word;
.message-detail .bubble::before, .message-detail .bubble::after, margin-left: 8px; }
.message-list .bubble::before,
.message-list .bubble::after {
content: '';
position: absolute;
height: 0;
width: 0; }
.message-detail .bubble::before,
.message-list .bubble::before {
top: 9px;
border-top: 8px solid transparent;
border-bottom: 8px solid transparent; }
.message-detail .bubble::after,
.message-list .bubble::after {
top: 11px;
border-top: 6px solid transparent;
border-bottom: 6px solid transparent; }
.message-detail .bubble .content, .message-detail .bubble .content,
.message-list .bubble .content { .message-list .bubble .content {
-webkit-user-select: text; -webkit-user-select: text;
@ -740,6 +736,9 @@ input.search {
.message-list .incoming .bubble::after { .message-list .incoming .bubble::after {
left: -8px; left: -8px;
border-right: 8px solid #f3f3f3; } border-right: 8px solid #f3f3f3; }
.message-detail .incoming .bubble .timestamp,
.message-list .incoming .bubble .timestamp {
color: #999; }
.message-detail .outgoing .avatar, .message-detail .outgoing .bubble, .message-detail .outgoing .avatar, .message-detail .outgoing .bubble,
.message-list .outgoing .avatar, .message-list .outgoing .avatar,
.message-list .outgoing .bubble { .message-list .outgoing .bubble {
@ -833,6 +832,7 @@ input.search {
cursor: pointer; } cursor: pointer; }
.bottom-bar { .bottom-bar {
margin-top: 4px;
height: 36px; height: 36px;
border-top: 1px solid #f3f3f3; border-top: 1px solid #f3f3f3;
background: white; } background: white; }