1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 17:33:14 +01:00

Refactor to route specific footer

This commit is contained in:
Tim Daubenschütz 2016-03-07 13:45:40 +01:00
parent 1c94ecc177
commit 6301c0fe46
10 changed files with 82 additions and 28 deletions

View File

@ -82,16 +82,12 @@ let Header = React.createClass({
getPoweredBy() { getPoweredBy() {
return ( return (
<AclProxy
aclObject={this.props.whitelabel}
aclName="acl_view_powered_by">
<li> <li>
<a className="pull-right ascribe-powered-by" href="https://www.ascribe.io/" target="_blank"> <a className="pull-right ascribe-powered-by" href="https://www.ascribe.io/" target="_blank">
<span id="powered">{getLangText('powered by')} </span> <span id="powered">{getLangText('powered by')} </span>
<span className="icon-ascribe-logo"></span> <span className="icon-ascribe-logo"></span>
</a> </a>
</li> </li>
</AclProxy>
); );
}, },
@ -130,7 +126,7 @@ let Header = React.createClass({
}, },
render() { render() {
const { currentUser, routes } = this.props; const { currentUser, routes, whitelabel } = this.props;
const { unfilteredPieceListCount } = this.state; const { unfilteredPieceListCount } = this.state;
let account; let account;
@ -211,7 +207,11 @@ let Header = React.createClass({
className="hidden-print"> className="hidden-print">
<CollapsibleNav eventKey={0}> <CollapsibleNav eventKey={0}>
<Nav navbar left> <Nav navbar left>
<AclProxy
aclObject={whitelabel}
aclName="acl_view_powered_by">
{this.getPoweredBy()} {this.getPoweredBy()}
</AclProxy>
</Nav> </Nav>
<Nav navbar right> <Nav navbar right>
<HeaderNotificationDebug show={false} /> <HeaderNotificationDebug show={false} />

View File

@ -12,7 +12,6 @@ import Hero from './components/pr_hero';
import AppBase from '../../../app_base'; import AppBase from '../../../app_base';
import AppRouteWrapper from '../../../app_route_wrapper'; import AppRouteWrapper from '../../../app_route_wrapper';
import Footer from '../../../footer';
import Header from '../../../header'; import Header from '../../../header';
import { getSubdomain } from '../../../../utils/general_utils'; import { getSubdomain } from '../../../../utils/general_utils';

View File

@ -7,7 +7,6 @@ import Hero from './components/prize_hero';
import AppBase from '../../../app_base'; import AppBase from '../../../app_base';
import AppRouteWrapper from '../../../app_route_wrapper'; import AppRouteWrapper from '../../../app_route_wrapper';
import Footer from '../../../footer';
import Header from '../../../header'; import Header from '../../../header';
import { getSubdomain } from '../../../../utils/general_utils'; import { getSubdomain } from '../../../../utils/general_utils';

View File

@ -36,7 +36,7 @@ let Vivi23Landing = React.createClass({
src={this.props.whitelabel.logo} src={this.props.whitelabel.logo}
height="75" /> height="75" />
<div> <div>
{getLangText('23VIVI Marketplace is powered by') + ' '} {getLangText('23VIVI digital wallet is powered by') + ' '}
<span className="icon-ascribe-logo" /> <span className="icon-ascribe-logo" />
</div> </div>
</div> </div>

View File

@ -0,0 +1,27 @@
'use strict';
import React from 'react';
import { getLangText } from '../../../../../utils/lang_utils';
const MarketFooter = React.createClass({
render() {
return (
<div className="container hidden-print">
<div className="row">
<div className="whitelabel-footer">
<hr/>
<span id="powered">{getLangText('Digital wallet powered by')} </span>
<a className="ascribe-powered-by" href="https://www.ascribe.io/" target="_blank">
<span className="icon-ascribe-logo"></span>
</a>
</div>
</div>
</div>
);
}
});
export default MarketFooter;

View File

@ -5,7 +5,6 @@ import classNames from 'classnames';
import AppBase from '../../app_base'; import AppBase from '../../app_base';
import AppRouteWrapper from '../../app_route_wrapper'; import AppRouteWrapper from '../../app_route_wrapper';
import Footer from '../../footer';
import Header from '../../header'; import Header from '../../header';
import { getSubdomain } from '../../../utils/general_utils'; import { getSubdomain } from '../../../utils/general_utils';

View File

@ -37,6 +37,7 @@ import MarketPieceList from './components/market/market_piece_list';
import MarketRegisterPiece from './components/market/market_register_piece'; import MarketRegisterPiece from './components/market/market_register_piece';
import MarketPieceContainer from './components/market/market_detail/market_piece_container'; import MarketPieceContainer from './components/market/market_detail/market_piece_container';
import MarketEditionContainer from './components/market/market_detail/market_edition_container'; import MarketEditionContainer from './components/market/market_detail/market_edition_container';
import MarketFooter from './components/market/market_footer';
import LumenusLanding from './components/lumenus/lumenus_landing'; import LumenusLanding from './components/lumenus/lumenus_landing';
@ -249,44 +250,56 @@ let ROUTES = {
<IndexRoute component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(Vivi23Landing)} /> <IndexRoute component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(Vivi23Landing)} />
<Route <Route
path='login' path='login'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)} /> component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)}
footer={MarketFooter} />
<Route <Route
path='logout' path='logout'
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} /> component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)}
footer={MarketFooter} />
<Route <Route
path='signup' path='signup'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)} /> component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)}
footer={MarketFooter} />
<Route <Route
path='password_reset' path='password_reset'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} /> component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)}
footer={MarketFooter} />
<Route <Route
path='settings' path='settings'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)} /> component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)}
footer={MarketFooter} />
<Route <Route
path='contract_settings' path='contract_settings'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)} /> component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)}
footer={MarketFooter} />
<Route <Route
path='register_piece' path='register_piece'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(MarketRegisterPiece)} component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(MarketRegisterPiece)}
headerTitle={getLangText('+ NEW WORK')} headerTitle={getLangText('+ NEW WORK')}
aclName='acl_wallet_submit' /> aclName='acl_wallet_submit'
footer={MarketFooter} />
<Route <Route
path='collection' path='collection'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(Vivi23PieceList)} component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(Vivi23PieceList)}
headerTitle={getLangText('COLLECTION')} headerTitle={getLangText('COLLECTION')}
disableOn='noPieces' /> disableOn='noPieces'
footer={MarketFooter} />
<Route <Route
path='pieces/:pieceId' path='pieces/:pieceId'
component={MarketPieceContainer} /> component={MarketPieceContainer}
footer={MarketFooter} />
<Route <Route
path='editions/:editionId' path='editions/:editionId'
component={MarketEditionContainer} /> component={MarketEditionContainer}
footer={MarketFooter} />
<Route <Route
path='coa_verify' path='coa_verify'
component={CoaVerifyContainer} /> component={CoaVerifyContainer}
footer={MarketFooter} />
<Route <Route
path='*' path='*'
component={ErrorNotFoundPage} /> component={ErrorNotFoundPage}
footer={MarketFooter} />
</Route> </Route>
), ),
'polline': ( 'polline': (

View File

@ -5,6 +5,7 @@
@import 'polline/polline_custom_style'; @import 'polline/polline_custom_style';
@import 'artcity/artcity_custom_style'; @import 'artcity/artcity_custom_style';
@import 'demo/demo_custom_style'; @import 'demo/demo_custom_style';
@import 'market/index';
.ascribe-wallet-app { .ascribe-wallet-app {
border-radius: 0; border-radius: 0;

View File

@ -0,0 +1 @@
@import 'market_footer';

View File

@ -0,0 +1,15 @@
.whitelabel-footer {
text-align: center;
margin-top: 4em;
padding: 1em 0 1em 0;
hr {
background-color: rgba(0, 0, 0, 0);
//border: 0;
margin-bottom: 1.5em;
}
.ascribe-powered-by {
font-weight: 300 !important;
}
}