Settings pages tweak.

This commit is contained in:
Sean Li 2015-06-11 11:01:53 -07:00
parent 77afa027fe
commit ee130fa346
3 changed files with 42 additions and 23 deletions

View File

@ -1,3 +1,4 @@
var $ = require('jquery');
var _ = require('underscore'); var _ = require('underscore');
var React = require('react/addons'); var React = require('react/addons');
var Router = require('react-router'); var Router = require('react-router');
@ -11,6 +12,17 @@ var ContainerSettings = React.createClass({
}, },
componentDidMount: function() { componentDidMount: function() {
this.init(); this.init();
this.handleResize();
window.addEventListener('resize', this.handleResize);
},
componentWillUnmount: function() {
window.removeEventListener('resize', this.handleResize);
},
componentDidUpdate: function () {
this.handleResize();
},
handleResize: function () {
$('.settings-panel').height(window.innerHeight - 210);
}, },
init: function () { init: function () {
var currentRoute = _.last(this.context.router.getCurrentRoutes()).name; var currentRoute = _.last(this.context.router.getCurrentRoutes()).name;

View File

@ -1,38 +1,37 @@
.details-panel .settings { .details-panel .settings {
display: flex; display: flex;
flex: 1 auto; flex: 1 auto;
flex-direction: row;
.settings-menu {
min-width: 180px;
flex: 0 auto;
ul {
position: fixed;
margin: 0;
padding: 0;
padding-top: 14px;
display: flex;
flex-direction: column; flex-direction: column;
background-color: white;
margin: 1rem;
margin-bottom: 0;
border: 1px solid @color-divider;
border-radius: @border-radius;
.settings-menu {
display: flex;
flex: 0 auto;
height: 40px;
border-bottom: 1px solid @color-divider;
ul {
display: flex;
flex-direction: row;
width: 100%;
justify-content: flex-end;
a { a {
min-width: 160px;
margin-left: 12px;
color: @gray-normal; color: @gray-normal;
flex-shrink: 0;
cursor: default; cursor: default;
outline: none; outline: none;
margin-bottom: 10px;
&.active { &.active {
li { li {
color: white; border-bottom: 2px solid @brand-primary;
border-radius: 40px; color: @gray-darkest;
.brand-gradient();
} }
} }
&:hover { &:hover {
text-decoration: none; text-decoration: none;
li { li {
cursor: default; cursor: default;
border-radius: 40px; color: @gray-darkest;
background-color: @gray-lightest;
} }
} }
&:focus { &:focus {
@ -40,24 +39,32 @@
} }
} }
li { li {
transition: all 140ms;
vertical-align: middle; vertical-align: middle;
padding: 5px 12px; padding: 0.9rem 1.6rem;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
} }
} }
} }
.settings-panel { .settings-panel {
padding-left: 20px; padding: 2rem;
flex: 1 auto; flex: 1 auto;
overflow-x: hidden; overflow-x: hidden;
h3 {
margin-top: 0;
color: @gray-darker;
font-weight: 400;
font-size: 18px;
}
.settings-section { .settings-section {
margin-bottom: 40px; margin-bottom: 4rem;
} }
.container-name { .container-name {
margin-bottom: 20px; margin-bottom: 2rem;
input { input {
width: 40%; width: 100%;
max-width: 500px;
} }
p { p {
font-weight: 300; font-weight: 300;

View File

@ -44,8 +44,8 @@ input[type="text"] {
border-bottom: 1px solid @brand-action; border-bottom: 1px solid @brand-action;
} }
&::-webkit-input-placeholder { &::-webkit-input-placeholder {
color: #DDD; color: @gray-lighter;
font-weight: 300; font-weight: 400;
} }
} }
} }