mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-23 15:47:53 -05:00
Merge pull request #656 from technoboy10/gh651-stagingalert
Fix GH-651: Orangeify navbar when SCRATCH_ENV=staging
This commit is contained in:
commit
a4e9db929c
6 changed files with 35 additions and 9 deletions
|
@ -15,6 +15,10 @@
|
||||||
font-size: .8125rem;
|
font-size: .8125rem;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
|
|
||||||
|
&.staging {
|
||||||
|
background-color: $ui-orange;
|
||||||
|
}
|
||||||
|
|
||||||
&.open {
|
&.open {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
@ -53,7 +57,7 @@
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.with-arrow {
|
&.with-arrow {
|
||||||
$arrow-border-width: 14px;
|
$arrow-border-width: 14px;
|
||||||
|
@ -61,12 +65,12 @@
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
|
|
||||||
&:before {
|
&:before {
|
||||||
display: block;
|
display: block;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -$arrow-border-width / 2;
|
top: -$arrow-border-width / 2;
|
||||||
right: 10%;
|
right: 10%;
|
||||||
|
|
||||||
transform: rotate(45deg);
|
transform: rotate(45deg);
|
||||||
|
|
||||||
border-top: 1px solid $active-gray;
|
border-top: 1px solid $active-gray;
|
||||||
|
|
|
@ -11,8 +11,12 @@
|
||||||
box-shadow: 0 0 3px $box-shadow-gray;
|
box-shadow: 0 0 3px $box-shadow-gray;
|
||||||
background-color: $ui-blue;
|
background-color: $ui-blue;
|
||||||
|
|
||||||
|
&.staging {
|
||||||
|
background-color: $ui-orange;
|
||||||
|
}
|
||||||
|
|
||||||
width: 100%;
|
|
||||||
|
width: 100%;
|
||||||
/* NOTE: Height should match offset settings in main.scss file */
|
/* NOTE: Height should match offset settings in main.scss file */
|
||||||
height: 50px;
|
height: 50px;
|
||||||
|
|
||||||
|
@ -35,7 +39,7 @@
|
||||||
.ie9 & {
|
.ie9 & {
|
||||||
display: table-row;
|
display: table-row;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
> li {
|
> li {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
@ -75,7 +79,7 @@
|
||||||
display: block;
|
display: block;
|
||||||
padding: 13px 15px 4px 15px;
|
padding: 13px 15px 4px 15px;
|
||||||
height: 33px;
|
height: 33px;
|
||||||
|
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
color: $type-white;
|
color: $type-white;
|
||||||
|
|
|
@ -253,7 +253,8 @@ var Navigation = React.createClass({
|
||||||
<Dropdown
|
<Dropdown
|
||||||
as="ul"
|
as="ul"
|
||||||
isOpen={this.state.accountNavOpen}
|
isOpen={this.state.accountNavOpen}
|
||||||
onRequestClose={this.closeAccountNav}>
|
onRequestClose={this.closeAccountNav}
|
||||||
|
className={process.env.SCRATCH_ENV}>
|
||||||
<li>
|
<li>
|
||||||
<a href={this.getProfileUrl()}>
|
<a href={this.getProfileUrl()}>
|
||||||
<FormattedMessage id="general.profile" />
|
<FormattedMessage id="general.profile" />
|
||||||
|
|
|
@ -1,6 +1,18 @@
|
||||||
@import "../../../colors";
|
@import "../../../colors";
|
||||||
|
|
||||||
#navigation {
|
#navigation {
|
||||||
|
&.staging {
|
||||||
|
.messages {
|
||||||
|
.message-count {
|
||||||
|
display: none;
|
||||||
|
|
||||||
|
&.show {
|
||||||
|
background-color: $ui-blue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.logo {
|
.logo {
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
var React = require('react');
|
var React = require('react');
|
||||||
|
var classNames = require('classnames');
|
||||||
|
|
||||||
var Navigation = require('../../navigation/www/navigation.jsx');
|
var Navigation = require('../../navigation/www/navigation.jsx');
|
||||||
var Footer = require('../../footer/www/footer.jsx');
|
var Footer = require('../../footer/www/footer.jsx');
|
||||||
|
@ -6,9 +7,12 @@ var Footer = require('../../footer/www/footer.jsx');
|
||||||
var Page = React.createClass({
|
var Page = React.createClass({
|
||||||
type: 'Page',
|
type: 'Page',
|
||||||
render: function () {
|
render: function () {
|
||||||
|
var classes = classNames({
|
||||||
|
'staging': process.env.SCRATCH_ENV == 'staging'
|
||||||
|
});
|
||||||
return (
|
return (
|
||||||
<div className="page">
|
<div className="page">
|
||||||
<div id="navigation">
|
<div id="navigation" className={classes}>
|
||||||
<Navigation />
|
<Navigation />
|
||||||
</div>
|
</div>
|
||||||
<div id="view">
|
<div id="view">
|
||||||
|
|
|
@ -116,7 +116,8 @@ module.exports = {
|
||||||
'process.env.NODE_ENV': '"' + (process.env.NODE_ENV || 'development') + '"',
|
'process.env.NODE_ENV': '"' + (process.env.NODE_ENV || 'development') + '"',
|
||||||
'process.env.SENTRY_DSN': '"' + (process.env.SENTRY_DSN || '') + '"',
|
'process.env.SENTRY_DSN': '"' + (process.env.SENTRY_DSN || '') + '"',
|
||||||
'process.env.API_HOST': '"' + (process.env.API_HOST || 'https://api.scratch.mit.edu') + '"',
|
'process.env.API_HOST': '"' + (process.env.API_HOST || 'https://api.scratch.mit.edu') + '"',
|
||||||
'process.env.SMARTY_STREETS_API_KEY': '"' + (process.env.SMARTY_STREETS_API_KEY || '') + '"'
|
'process.env.SMARTY_STREETS_API_KEY': '"' + (process.env.SMARTY_STREETS_API_KEY || '') + '"',
|
||||||
|
'process.env.SCRATCH_ENV': '"'+ (process.env.SCRATCH_ENV || 'development') + '"'
|
||||||
}),
|
}),
|
||||||
new webpack.optimize.CommonsChunkPlugin('common', 'js/common.bundle.js'),
|
new webpack.optimize.CommonsChunkPlugin('common', 'js/common.bundle.js'),
|
||||||
new webpack.optimize.OccurenceOrderPlugin()
|
new webpack.optimize.OccurenceOrderPlugin()
|
||||||
|
|
Loading…
Reference in a new issue