mirror of
https://github.com/ascribe/onion.git
synced 2025-01-03 10:25:08 +01:00
Add custom styling for PR
This commit is contained in:
parent
7e5662676c
commit
32bc4b0c69
@ -37,16 +37,9 @@ import { constructHead } from '../utils/dom_utils';
|
|||||||
|
|
||||||
let Header = React.createClass({
|
let Header = React.createClass({
|
||||||
propTypes: {
|
propTypes: {
|
||||||
showAddWork: React.PropTypes.bool,
|
|
||||||
routes: React.PropTypes.arrayOf(React.PropTypes.object)
|
routes: React.PropTypes.arrayOf(React.PropTypes.object)
|
||||||
},
|
},
|
||||||
|
|
||||||
getDefaultProps() {
|
|
||||||
return {
|
|
||||||
showAddWork: true
|
|
||||||
};
|
|
||||||
},
|
|
||||||
|
|
||||||
getInitialState() {
|
getInitialState() {
|
||||||
return mergeOptions(
|
return mergeOptions(
|
||||||
WhitelabelStore.getState(),
|
WhitelabelStore.getState(),
|
||||||
|
@ -13,7 +13,7 @@ export function AuthPrizeRoleRedirect({ to, when }) {
|
|||||||
|
|
||||||
return function(currentUser, query) {
|
return function(currentUser, query) {
|
||||||
const exprToValidate = when
|
const exprToValidate = when
|
||||||
.map((role) => currentUser[role])
|
.map(role => currentUser[role])
|
||||||
.reduce((a, b) => a || b);
|
.reduce((a, b) => a || b);
|
||||||
|
|
||||||
if(exprToValidate) {
|
if(exprToValidate) {
|
||||||
|
@ -52,7 +52,7 @@ let PRApp = React.createClass({
|
|||||||
header = <Hero />;
|
header = <Hero />;
|
||||||
style = { paddingTop: '0 !important' };
|
style = { paddingTop: '0 !important' };
|
||||||
} else if(currentUser && (currentUser.is_admin || currentUser.is_jury || currentUser.is_judge)) {
|
} else if(currentUser && (currentUser.is_admin || currentUser.is_jury || currentUser.is_judge)) {
|
||||||
header = <Header routes={routes} showAddWork={false} />;
|
header = <Header routes={routes} />;
|
||||||
} else {
|
} else {
|
||||||
style = { paddingTop: '0 !important' };
|
style = { paddingTop: '0 !important' };
|
||||||
}
|
}
|
||||||
|
@ -61,15 +61,14 @@ const ROUTES = {
|
|||||||
),
|
),
|
||||||
portfolioreview: (
|
portfolioreview: (
|
||||||
<Route path='/' component={PRApp}>
|
<Route path='/' component={PRApp}>
|
||||||
<IndexRoute component={PRLanding} />
|
<IndexRoute component={ProxyHandler(AuthPrizeRoleRedirect({ to: '/collection', when: ['is_admin', 'is_judge', 'is_jury'] }))(PRLanding)} />
|
||||||
<Route
|
<Route
|
||||||
path='register_piece'
|
path='register_piece'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(PRRegisterPiece)}
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(PRRegisterPiece)}/>
|
||||||
headerTitle='+ NEW WORK'/>
|
|
||||||
<Route
|
<Route
|
||||||
path='collection'
|
path='collection'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SPPieceList)}
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SPPieceList)}
|
||||||
headerTitle='COLLECTION'/>
|
headerTitle='SUBMISSIONS'/>
|
||||||
<Route
|
<Route
|
||||||
path='login'
|
path='login'
|
||||||
component={ProxyHandler(
|
component={ProxyHandler(
|
||||||
|
@ -48,7 +48,9 @@ let PrizePieceList = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
getButtonSubmit() {
|
getButtonSubmit() {
|
||||||
if (this.state.prize && this.state.prize.active && !this.state.currentUser.is_jury){
|
const { currentUser } = this.state;
|
||||||
|
if (this.state.prize && this.state.prize.active &&
|
||||||
|
!currentUser.is_jury && !currentUser.is_admin && !currentUser.is_judge){
|
||||||
return (
|
return (
|
||||||
<LinkContainer to="/register_piece">
|
<LinkContainer to="/register_piece">
|
||||||
<Button>
|
<Button>
|
||||||
@ -57,9 +59,6 @@ let PrizePieceList = React.createClass({
|
|||||||
</LinkContainer>
|
</LinkContainer>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else if (this.state.prize && this.state.currentUser.is_judge){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -22,10 +22,59 @@ $pr--button-color: $pr--nav-fg-prim-color;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.navbar-default {
|
||||||
|
.navbar-nav > .ascribe-powered-by, li > a {
|
||||||
|
color: $pr--button-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.active a {
|
||||||
|
border-bottom-color: $pr--button-color !important;
|
||||||
|
color: $pr--button-color !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-bar > .form-group > .input-group input {
|
||||||
|
&::-webkit-input-placeholder {
|
||||||
|
color: rgba($pr--button-color, 0.5);
|
||||||
|
}
|
||||||
|
&::-moz-placeholder {
|
||||||
|
color: rgba($pr--button-color, 0.5);
|
||||||
|
}
|
||||||
|
&:-ms-input-placeholder {
|
||||||
|
color: rgba($pr--button-color, 0.5);
|
||||||
|
}
|
||||||
|
&:-moz-placeholder {
|
||||||
|
color: rgba($pr--button-color, 0.5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-ascribe-search {
|
||||||
|
color: $pr--button-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
// filter widget
|
||||||
|
.ascribe-piece-list-toolbar-filter-widget button {
|
||||||
|
background-color: transparent !important;
|
||||||
|
border-color: transparent !important;
|
||||||
|
color: $pr--button-color !important;
|
||||||
|
|
||||||
|
&:hover,
|
||||||
|
&:active {
|
||||||
|
background-color: $pr--button-color !important;
|
||||||
|
border-color: $pr--button-color !important;
|
||||||
|
color: white !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.ascribe-property {
|
.ascribe-property {
|
||||||
> p > span:not(> .span),
|
> div,
|
||||||
> textarea,
|
> input,
|
||||||
> input {
|
> pre,
|
||||||
|
> select,
|
||||||
|
> span:not(.glyphicon),
|
||||||
|
> p,
|
||||||
|
> p > span,
|
||||||
|
> textarea {
|
||||||
color: $pr--nav-fg-prim-color;
|
color: $pr--nav-fg-prim-color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user