1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 09:23:13 +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() {
return (
<AclProxy
aclObject={this.props.whitelabel}
aclName="acl_view_powered_by">
<li>
<a className="pull-right ascribe-powered-by" href="https://www.ascribe.io/" target="_blank">
<span id="powered">{getLangText('powered by')} </span>
<span className="icon-ascribe-logo"></span>
</a>
</li>
</AclProxy>
<li>
<a className="pull-right ascribe-powered-by" href="https://www.ascribe.io/" target="_blank">
<span id="powered">{getLangText('powered by')} </span>
<span className="icon-ascribe-logo"></span>
</a>
</li>
);
},
@ -130,7 +126,7 @@ let Header = React.createClass({
},
render() {
const { currentUser, routes } = this.props;
const { currentUser, routes, whitelabel } = this.props;
const { unfilteredPieceListCount } = this.state;
let account;
@ -211,7 +207,11 @@ let Header = React.createClass({
className="hidden-print">
<CollapsibleNav eventKey={0}>
<Nav navbar left>
{this.getPoweredBy()}
<AclProxy
aclObject={whitelabel}
aclName="acl_view_powered_by">
{this.getPoweredBy()}
</AclProxy>
</Nav>
<Nav navbar right>
<HeaderNotificationDebug show={false} />

View File

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

View File

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

View File

@ -36,7 +36,7 @@ let Vivi23Landing = React.createClass({
src={this.props.whitelabel.logo}
height="75" />
<div>
{getLangText('23VIVI Marketplace is powered by') + ' '}
{getLangText('23VIVI digital wallet is powered by') + ' '}
<span className="icon-ascribe-logo" />
</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 AppRouteWrapper from '../../app_route_wrapper';
import Footer from '../../footer';
import Header from '../../header';
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 MarketPieceContainer from './components/market/market_detail/market_piece_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';
@ -249,44 +250,56 @@ let ROUTES = {
<IndexRoute component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(Vivi23Landing)} />
<Route
path='login'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)} />
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)}
footer={MarketFooter} />
<Route
path='logout'
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} />
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)}
footer={MarketFooter} />
<Route
path='signup'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)} />
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)}
footer={MarketFooter} />
<Route
path='password_reset'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} />
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)}
footer={MarketFooter} />
<Route
path='settings'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)} />
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)}
footer={MarketFooter} />
<Route
path='contract_settings'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)} />
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)}
footer={MarketFooter} />
<Route
path='register_piece'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(MarketRegisterPiece)}
headerTitle={getLangText('+ NEW WORK')}
aclName='acl_wallet_submit' />
aclName='acl_wallet_submit'
footer={MarketFooter} />
<Route
path='collection'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(Vivi23PieceList)}
headerTitle={getLangText('COLLECTION')}
disableOn='noPieces' />
disableOn='noPieces'
footer={MarketFooter} />
<Route
path='pieces/:pieceId'
component={MarketPieceContainer} />
component={MarketPieceContainer}
footer={MarketFooter} />
<Route
path='editions/:editionId'
component={MarketEditionContainer} />
component={MarketEditionContainer}
footer={MarketFooter} />
<Route
path='coa_verify'
component={CoaVerifyContainer} />
component={CoaVerifyContainer}
footer={MarketFooter} />
<Route
path='*'
component={ErrorNotFoundPage} />
component={ErrorNotFoundPage}
footer={MarketFooter} />
</Route>
),
'polline': (

View File

@ -5,6 +5,7 @@
@import 'polline/polline_custom_style';
@import 'artcity/artcity_custom_style';
@import 'demo/demo_custom_style';
@import 'market/index';
.ascribe-wallet-app {
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;
}
}