Skip to content

Commit

Permalink
Initially reveal the site header on the project page when not signed in
Browse files Browse the repository at this point in the history
  • Loading branch information
brian-c committed Jul 8, 2016
1 parent 81065c3 commit 99f790a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/layout/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const AppLayout = React.createClass({

childContextTypes: {
setAppHeaderVariant: React.PropTypes.func,
revealSiteHeader: React.PropTypes.func,
},

getInitialState() {
Expand All @@ -36,6 +37,13 @@ const AppLayout = React.createClass({
siteHeaderDemoted: variant === 'demoted',
});
},

revealSiteHeader: () => {
this.matchWindowScale();
this.setState({
siteHeaderRevealed: true,
});
}
};
},

Expand Down
3 changes: 3 additions & 0 deletions app/pages/project/index.cjsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ SOCIAL_ICONS =
ProjectPage = React.createClass
contextTypes:
setAppHeaderVariant: React.PropTypes.func
revealSiteHeader: React.PropTypes.func
geordi: React.PropTypes.object

getDefaultProps: ->
Expand All @@ -51,6 +52,8 @@ ProjectPage = React.createClass

componentDidMount: ->
@context.setAppHeaderVariant 'demoted'
unless @props.user?
@context.revealSiteHeader()
document.documentElement.classList.add 'on-project-page'
@fetchInfo @props.project
@getSelectedWorkflow @props.project, @props.preferences
Expand Down

0 comments on commit 99f790a

Please sign in to comment.