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>
</div>
<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 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 search-results hide'>
<div class='new-contact contact hide'></div>
@ -71,9 +71,9 @@
<div class="close">x</div>
</script>
<script type='text/x-tmpl-mustache' id='message'>
<div class='sender'>{{ sender }}</div>
{{> avatar }}
<div class="bubble">
<div class='sender'>{{ sender }}</div>
<div class='attachments'></div>
<p class="content">{{ message }}</p>
<div class='meta'>

View File

@ -229,7 +229,9 @@
$bottomBar.outerHeight(this.$messageField.outerHeight() + 1);
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();
},

View File

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

View File

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

View File

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

View File

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

View File

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