Skip to content

Commit

Permalink
Framework: Fixes uncentered logged-out layouts with no sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
ebinnion committed Dec 3, 2015
1 parent caf3310 commit a5613f0
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions client/layout/logged-out.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/**
* External dependencies
*/
var React = require( 'react' );
var React = require( 'react' ),
classNames = require( 'classnames' );

/**
* Internal dependencies
Expand All @@ -15,15 +16,19 @@ module.exports = React.createClass( {

getInitialState: function() {
return {
section: undefined
section: undefined,
noSidebar: false
};
},

render: function() {
var sectionClass = 'wp' + ( this.state.section ? ' is-section-' + this.state.section : '' );
var sectionClass = this.state.section ? ' is-section-' + this.state.section : '',
classes = classNames( 'wp', sectionClass, {
'has-no-sidebar': this.state.noSidebar
} );

return (
<div className={ sectionClass }>
<div className={ classes }>
<Masterbar />
<div id="content" className="wp-content">
<NoticesList id="notices" notices={ notices.list } />
Expand Down

0 comments on commit a5613f0

Please sign in to comment.