Skip to content

Commit

Permalink
Layout restyled using flex
Browse files Browse the repository at this point in the history
  • Loading branch information
gorkalaucirica committed Oct 28, 2015
1 parent 4a67d64 commit 02b0a4d
Show file tree
Hide file tree
Showing 13 changed files with 63 additions and 82 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ export default React.createClass({

return (
<div className={classes}>
<div className="notification-icon">
<div className="notification__icon">
<i className="fa fa-exclamation-circle"></i>
</div>
<p className="notification-message">{this.props.message}</p>
<i className="notification-hide fa fa-times"
<p className="notification__message">{this.props.message}</p>
<i className="notification__hide fa fa-times"
onClick={this.onCloseClick}></i>
</div>
);
Expand Down
4 changes: 3 additions & 1 deletion Bundle/WebBundle/Resources/public/js/views/layout/Base.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* file that was distributed with this source code.
*/

import '../../../scss/layout/_base.scss';

import React from 'react';

import ContentLayout from './ContentLayout.js';
Expand All @@ -18,7 +20,7 @@ export default React.createClass({

render() {
return (
<div>
<div className="base-layout">
<NotificationLayout/>
<MainMenu/>
<ContentLayout>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import React from 'react';
export default React.createClass({
render() {
return (
<div id="content">
<div className="content">
{this.props.children}
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ export default React.createClass({

return (
<div className={classes}>
{this.props.children}
<div className="content__middle-content">
{this.props.children}
</div>
</div>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ export default React.createClass({
});
return (
<div className={classes}>
{this.props.children}
<div className="content__right-content">
{this.props.children}
</div>
</div>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* file that was distributed with this source code.
*/

import '../../../scss/layout/_notification.scss';

import React from 'react';

import Notification from '../component/Notification.js';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ $notification-height: 50px !default;
color: $white;
display: flex;
height: 0;
margin-left: 80px;
overflow: hidden;
transition-duration: .5s;
}
Expand All @@ -29,7 +28,7 @@ $notification-height: 50px !default;
background: $main-red;
}

.notification-icon {
.notification__icon {
background: rgba($main-black, .2);
height: $notification-height;
line-height: $notification-height;
Expand All @@ -38,11 +37,11 @@ $notification-height: 50px !default;
width: $notification-height;
}

.notification-message {
.notification__message {
flex: 1;
}

.notification-hide {
.notification__hide {
cursor: pointer;
margin: 0 .5em;
}
46 changes: 0 additions & 46 deletions Bundle/WebBundle/Resources/public/scss/layout/_aside.scss

This file was deleted.

13 changes: 13 additions & 0 deletions Bundle/WebBundle/Resources/public/scss/layout/_base.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// This file is part of the Kreta package.
//
// (c) Beñat Espiña <[email protected]>
// (c) Gorka Laucirica <[email protected]>
//
// For the full copyright and license information, please view the LICENSE
// file that was distributed with this source code.

.base-layout {
display: flex;
flex-flow: row wrap;
height: 100vh;
}
36 changes: 21 additions & 15 deletions Bundle/WebBundle/Resources/public/scss/layout/_content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,41 +5,47 @@
//
// For the full copyright and license information, please view the LICENSE
// file that was distributed with this source code.

@import '../../scss/base/colors';

$content-width: 900px;
$content-right-width: 450px;
$content-transition: .3s;

.content {
width: 100%;
flex: 1;

> div {
display: flex;
height: 100vh;
}
}

.content__middle {
margin-left: 90px;
padding: 20px calc(50% - #{$content-width / 2});
flex: 1;
overflow-y: scroll;
transition-duration: $content-transition;
}

.content__middle--right-open {
padding: 20px calc(50% - #{$content-width / 2} + #{$content-right-width / 2})
20px calc(50% - #{$content-width / 2} - #{$content-right-width / 2});
.content__middle-content {
max-width: $content-width;
margin: auto;
width: 100%;
}

.content__right {
background-color: $light-grey;
border-left: 1px solid $main-grey;
bottom: 0;
box-sizing: border-box;
padding: 20px;
position: fixed;
right: -$content-right-width;
top: 0;
transition: right $content-transition;
width: $content-right-width;
overflow-y: scroll;
transition: width $content-transition;
width: 0;
}

.content__right--visible {
right: 0;
width: $content-right-width;
}

.content__right-content {
padding: 20px;
width: $content-right-width;
}
4 changes: 0 additions & 4 deletions Bundle/WebBundle/Resources/public/scss/layout/_main-menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,9 @@
background: $grey;
color: $white;
height: 100%;
left: 0;
padding: 5px;
position: fixed;
text-align: center;
top: 0;
width: 80px;
z-index: 30;
}

.menu-logo {
Expand Down
11 changes: 11 additions & 0 deletions Bundle/WebBundle/Resources/public/scss/layout/_notification.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// This file is part of the Kreta package.
//
// (c) Beñat Espiña <[email protected]>
// (c) Gorka Laucirica <[email protected]>
//
// For the full copyright and license information, please view the LICENSE
// file that was distributed with this source code.

.notification-layout {
width: 100%;
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@

@import '../../../base/colors';

.issue-new {
padding-top: 100px;
position: relative;
width: 100%;
}

.issue-new__details {
border-top: 1px solid $main-grey;
display: flex;
Expand Down

0 comments on commit 02b0a4d

Please sign in to comment.