Browse Source

Move colors to variables.

Required mixins.

Use mixins and format css.

Color pallete of site to easily compare color values.

Create color variables.

Create font variable.

Improved ordering.

Replace box-shadow instances with mixin.

Compact font and background.

Revert to original color declaration type.

Improved .right .btn

Changed #bar .right/.middle/.left to #bar .bar-right/.bar-middle/.bar-left

Breakup elements in bar-left,bar-middle,bar-right blocks

Use compass vertical rhythm - setup baseline, using relative units.
pull/30/head
Evan Theurer 11 years ago
parent
commit
3a848f1444
  1. 4
      html/main.html
  2. 100
      src/styles/color-pallete.html
  3. 259
      src/styles/components/_bar.scss
  4. 5
      src/styles/global/_base.scss
  5. 23
      src/styles/global/_mixins.scss
  6. 14
      src/styles/global/_variables.scss
  7. 4
      src/styles/main.scss
  8. 2
      static/partials/statusmessage.html

4
html/main.html

@ -8,11 +8,11 @@
<div id="loader"><div><i class="fa fa-spinner fa-spin"></i></div></div> <div id="loader"><div><i class="fa fa-spinner fa-spin"></i></div></div>
<page></page> <page></page>
<div id="bar"> <div id="bar">
<div class="left"> <div class="bar-left">
<%template "logo" .%> <%template "logo" .%>
</div> </div>
<status-message></status-message> <status-message></status-message>
<div class="ng-cloak right"> <div class="ng-cloak bar-right">
<button title="{{_('Share your screen')}}" class="btn aenablebtn" ng-show="isChrome && webrtcDetectedVersion >= 32 && (status=='connected' || status=='conference' || layout.screenshare)" ng-model="layout.screenshare" btn-checkbox><i class="fa fa-desktop"></i></button> <button title="{{_('Share your screen')}}" class="btn aenablebtn" ng-show="isChrome && webrtcDetectedVersion >= 32 && (status=='connected' || status=='conference' || layout.screenshare)" ng-model="layout.screenshare" btn-checkbox><i class="fa fa-desktop"></i></button>
<button title="{{_('Chat')}}" ng-show="roomstatus" class="btn" ng-class="{messagesunseen: chatMessagesUnseen>0}" ng-model="layout.chat" btn-checkbox btn-checkbox-true="true" btn-checkbox-false="false"><i class="fa fa-comments-o"></i><span class="badge" ng-show="chatMessagesUnseen">{{chatMessagesUnseen}}</span></button> <button title="{{_('Chat')}}" ng-show="roomstatus" class="btn" ng-class="{messagesunseen: chatMessagesUnseen>0}" ng-model="layout.chat" btn-checkbox btn-checkbox-true="true" btn-checkbox-false="false"><i class="fa fa-comments-o"></i><span class="badge" ng-show="chatMessagesUnseen">{{chatMessagesUnseen}}</span></button>
<button title="{{_('Mute microphone')}}" class="btn amutebtn" ng-model="microphoneMute" btn-checkbox btn-checkbox-true="true" btn-checkbox-false="false"><i class="fa fa-microphone-slash"></i></button> <button title="{{_('Mute microphone')}}" class="btn amutebtn" ng-model="microphoneMute" btn-checkbox btn-checkbox-true="true" btn-checkbox-false="false"><i class="fa fa-microphone-slash"></i></button>

100
src/styles/color-pallete.html

@ -0,0 +1,100 @@
<!DOCTYPE html>
<title>CSS site color pallete</title>
<style>
td {
width: 20em;
padding: 0 2%;
}
.color-block {
height: 50px;
border: 10px solid white;
}
.color-desc {
height: 25px;
padding: 5% 0 0 0;
text-align: center;
}
</style>
<table>
<tr>
<td class="color-desc">
$background: #e5e5e5
</td>
<td class="color-desc">
$componentbg: #f5f5f5
</td>
<td class="color-desc">
$componentfg1: #262626
</td>
</tr>
<tr>
<td class="color-block" style="background-color: #e5e5e5;"></td>
<td class="color-block" style="background-color: #f5f5f5;"></td>
<td class="color-block" style="background-color: #262626;"></td>
</tr>
<tr>
<td class="color-desc">
$componentfg2: rgba(0,0,0,.5)
</td>
<td class="color-desc">
$componentfg3: rgba(0,0,0,.2)
</td>
<td class="color-desc">
$componentfg4: #737373
</td>
</tr>
<tr>
<td class="color-block" style="background-color: rgba(0,0,0,.5);"></td>
<td class="color-block" style="background-color: rgba(0,0,0,.2);"></td>
<td class="color-block" style="background-color: #737373;"></td>
</tr>
<tr>
<td class="color-desc">
$sidepanebg: white
</td>
<td class="color-desc">
$bordercolor: #ccc
</td>
<td class="color-desc">
$actioncolor1: rgb(132,184,25)
</td>
</tr>
<tr>
<td class="color-block" style="background-color: white;"></td>
<td class="color-block" style="background-color: #ccc;"></td>
<td class="color-block" style="background-color: rgb(132,184,25);"></td>
</tr>
<tr>
<td class="color-desc">
$actioncolor2: rgb(0,149,52)
</td>
<td class="color-desc">
none: #222
</td>
<td class="color-desc">
none: #db4f39
</td>
</tr>
<tr>
<td class="color-block" style="background-color: rgb(0,149,52);"></td>
<td class="color-block" style="background-color: #222;"></td>
<td class="color-block" style="background-color: #db4f39;"></td>
</tr>
<tr>
<td class="color-desc">
none: #84b819
</td>
<td class="color-desc">
none: rgba(0,0,0,.4)
</td>
<td class="color-desc">
none: rgba(0,0,0,.3)
</td>
</tr>
<tr>
<td class="color-block" style="background-color: #84b819;"></td>
<td class="color-block" style="background-color: rgba(0,0,0,.4);"></td>
<td class="color-block" style="background-color: rgba(0,0,0,.3);"></td>
</tr>
</table>

259
src/styles/components/_bar.scss

@ -18,167 +18,170 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
* *
*/ */
#bar { #bar {
-webkit-box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.2);
box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.2);
position: absolute;
top: 0;
left: 0;
right: 0;
min-height: 44px;
background-color: $componentbg; background-color: $componentbg;
color: $componentfg1; color: $componentfg1;
font-size: 1em; left: 0;
font-weight: bold; min-height: 44px;
line-height: 40px; position: absolute;
right: 0;
top: 0;
text-align: center; text-align: center;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
z-index: 5; z-index: 5;
@include adjust-leading-to(2);
@include box-shadow(0 2px 10px 0 $componentfg3);
// @include debug-vertical-alignment();
@include touch-callout(none);
@include user-select(none);
@include breakpt($breakpoint-medium) {
z-index: 40;
@include box-shadow(none);
} }
#bar > .left { .btn {
position: absolute; position: relative;
left:0px;
top:0px;
bottom:0px;
padding-left:12px;
} }
#bar .logo { }
font-size:11px;
line-height:11px; .bar-left {
font-weight:normal; bottom: 0;
color:black; left: 0;
width:90px; top: 0;
height:32px; padding-left: 12px;
position: absolute;
.logo {
background: url(../img/logo-small.png) no-repeat;
background-size: 100%; background-size: 100%;
background-repeat:no-repeat;
background-image:url(../img/logo-small.png);
display: inline-block; display: inline-block;
color: black;
height: 32px;
text-align: left; text-align: left;
} width: 90px;
#bar .logo > span { vertical-align: middle;
position: relative; @include adjust-font-size-to(11px,0.4);
span {
font-style: italic;
left: 38px; left: 38px;
position: relative;
top: 26px; top: 26px;
font-style: italic;
} }
#bar .logo > span a { span a {
color:#222; color: $dgrey;
} }
#bar > .right {
position: absolute;
right:0px;
top:1px;
bottom:1px;
padding-right:8px;
} }
#bar > .left > *, #bar > .right > * {
vertical-align: middle;
} }
#bar > .right .btn {
border-color:transparent; .bar-middle {
background:transparent; background-color: $componentbg;
color:rgba(0,0,0,0.3);
height:42px;
width:42px;
display: inline-block; display: inline-block;
font-size:24px; font-weight: bold;
padding:0px; min-height: 44px;
line-height:40px; padding: 0 1em;
text-align:center; position: relative;
margin-left:-4px; margin-left: -70px;
z-index: 5;
@include breakpt($breakpoint-medium) {
display: block;
margin-left: 0px;
max-width: 40%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
} }
#bar > .right .btn:focus { .userpicture {
border: none; border-radius: 2px;
box-shadow: 0; display: inline-block;
outline: none; height: 46px;
margin: -5px .5em 0 .5em;
width: 46px;
} }
#bar > .right .btn:hover { img {
border-color: #ccc; @include breakpt($breakpoint-medium) {
background-color:none; display: none;
color:rgba(0,0,0,0.4);
} }
#bar > .right .btn.active {
border-color: #ccc;
background-color:none;
color:rgba(0,0,0,0.4);
} }
#bar > .right .btn.active.amutebtn { &.status-connected,
background-color: #db4f39; &.status-conference {
border-color: #db4f39; @include breakpt($breakpoint-medium) {
color: white; max-width: 100%;
left: 0;
position: absolute;
right: 0;
} }
#bar > .right .btn.active.aenablebtn {
background-color: #84b819;
border-color: #84b819;
color: white;
} }
#bar .btn { &.status-connecting,
position:relative; &.status-closed,
&.status-reconnecting,
&.status-error,
&.status-ringing {
@include breakpt($breakpoint-medium) {
border-bottom: 1px solid $bordercolor;
max-width: 100%;
min-height: 45px;
} }
#bar .badge { }
background-color: #84b819; // TODO(theurere): cleanup
&.status-connecting .actions,
&.status-closed .actions,
&.status-reconnecting .actions,
&.status-error .actions,
&.status-ringing .actions {
@include breakpt($breakpoint-medium) {
display: block;
padding: .2em 0 .8em 0;
}
}
}
.bar-right {
bottom: 1px;
padding-right: 8px;
position: absolute;
right: 0;
top: 1px;
.badge {
background-color: $actioncolor1;
border: 1px solid white;
font-size: .4em; font-size: .4em;
position: absolute; position: absolute;
right:0px; right: 0;
top: 2px; top: 2px;
border:1px solid white;
}
#bar .userpicture {
margin:-5px 0.5em 0px 0.5em;
width:46px;
height:46px;
border-radius:2px;
display:inline-block;
} }
#bar > .middle { .btn {
z-index:5; background: transparent;
background-color: $componentbg; border-color: transparent;
color: $grey3;
display: inline-block; display: inline-block;
padding:0 1em; height: 42px;
position:relative; margin-left: -4px;
min-height: 44px; padding: 0;
vertical-align:middle; text-align: center;
margin-left:-70px; width: 42px;
} @include adjust-font-size-to(24px);
&:focus {
@media all and (max-width: 700px) { border: none;
#bar { outline: none;
z-index:40; @include box-shadow(0);
-webkit-box-shadow: none;
box-shadow: none;
} }
#bar > .middle.status-connecting, #bar > .middle.status-closed, #bar > .middle.status-reconnecting, #bar > .middle.status-error, #bar > .middle.status-ringing { &:hover {
max-width:100%; background-color: none;
border-bottom:1px solid $bordercolor; border-color: #ccc;
.actions { color: $grey4;
display: block;
padding:.2em 0 .8em 0;
} }
min-height: 45px; &.active {
background-color: none;
border-color: #ccc;
color: $grey4;
} }
#bar > .middle.status-connected, #bar > .middle.status-conference { &.active.amutebtn {
position:absolute; background-color: $red;
left:0px; border-color: $red;
right:0px; color: white;
max-width:100%;
} }
#bar > .middle { &.active.aenablebtn {
display:block; background-color: $actioncolor1;
max-width:40%; border-color: $actioncolor1;
overflow:hidden; color: white;
text-overflow:ellipsis;
white-space:nowrap;
margin-left:0px;
img {
display:none;
} }
} }
} }

5
src/styles/global/_base.scss

@ -18,11 +18,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
* *
*/ */
@include establish-baseline();
html, body { html, body {
background-color: $background; background-color: $background;
background-clip: padding-box; background-clip: padding-box;
height: 100%; height: 100%;
font: normal 13px "Helvetica Neue",Helvetica,Arial,sans-serif; font: normal $base-font-size $font-sans-serif;
} }
body { body {
margin: 0; margin: 0;

23
src/styles/global/_mixins.scss

@ -0,0 +1,23 @@
@mixin breakpt($pt) {
@media (max-width: $pt) {
@content;
}
}
@mixin user-select($select) {
-khtml-user-select: $select;
-moz-user-select: $select;
-ms-user-select: $select;
-webkit-user-select: $select;
user-select: $select;
}
@mixin touch-callout($callout) {
-webkit-touch-callout: $callout;
}
@mixin box-shadow($shadow) {
-webkit-box-shadow: $shadow;
box-shadow: $shadow;
}

14
src/styles/global/_colors.scss → src/styles/global/_variables.scss

@ -22,10 +22,22 @@ $background: #e5e5e5;
$componentbg: #f5f5f5; $componentbg: #f5f5f5;
$componentfg1: #262626; $componentfg1: #262626;
$componentfg2: rgba(0,0,0,.5); $componentfg2: rgba(0,0,0,.5);
$componentfg3: rgba(0,0,0,.2); $componentfg3: rgba(0,0,0,.2); //#ccc
$componentfg4: #737373; $componentfg4: #737373;
$sidepanebg: white; $sidepanebg: white;
$bordercolor: #ccc; $bordercolor: #ccc;
$actioncolor1: rgb(132,184,25); $actioncolor1: rgb(132,184,25);
$actioncolor2: rgb(0,149,52); $actioncolor2: rgb(0,149,52);
$grey3: rgba(0,0,0,.3);
$grey4: rgba(0,0,0,.4);
$dgrey: rgb(34,34,34);
$red: rgb(219,79,57);
$breakpoint-small: 480px;
$breakpoint-medium: 700px;
$breakpoint-large: 1280px;
$font-sans-serif: "Helvetica Neue",Helvetica,Arial,sans-serif;
$base-font-size: 13px;
$base-line-height: 19px;

4
src/styles/main.scss

@ -19,11 +19,13 @@
* *
*/ */
@import "global/variables";
// @import "compass";
@import "compass"; @import "compass";
@import "libs/libs"; @import "libs/libs";
@import "global/colors"; @import "global/mixins";
@import "global/base"; @import "global/base";
@import "global/angular"; @import "global/angular";

2
static/partials/statusmessage.html

@ -1,4 +1,4 @@
<span class="middle status-{{status}}" ng-switch on="status"> <span class="bar-middle status-{{status}}" ng-switch on="status">
<span ng-switch-when="initializing">{{_("Initializing")}} <i class="fa fa-spinner fa-spin"></i></span> <span ng-switch-when="initializing">{{_("Initializing")}} <i class="fa fa-spinner fa-spin"></i></span>
<span ng-switch-when="waiting"><span class="msg">{{_("Online")}} </span><i style="color:rgb(132,184,25)" class="fa fa-bullseye"></i> {{id|displayName}} <img class="userpicture" ng-show="master.buddyPicture" ng-src="{{master.buddyPicture}}" alt="" /></span> <span ng-switch-when="waiting"><span class="msg">{{_("Online")}} </span><i style="color:rgb(132,184,25)" class="fa fa-bullseye"></i> {{id|displayName}} <img class="userpicture" ng-show="master.buddyPicture" ng-src="{{master.buddyPicture}}" alt="" /></span>
<span ng-switch-when="connecting"><span class="msg">{{_("Calling")}} {{dialing|displayName}}</span> <a class="btn btn-small btn-danger" ng-click="doAbort()"><i class="fa fa-spinner fa-spin"></i> {{_("Hangup")}}</a></span> <span ng-switch-when="connecting"><span class="msg">{{_("Calling")}} {{dialing|displayName}}</span> <a class="btn btn-small btn-danger" ng-click="doAbort()"><i class="fa fa-spinner fa-spin"></i> {{_("Hangup")}}</a></span>

Loading…
Cancel
Save