#5 more routes updated

This commit is contained in:
Daniel
2018-01-19 21:45:35 -05:00
parent 2aecb184ce
commit 754b7e8c96
4 changed files with 136 additions and 145 deletions

View File

@@ -1,122 +0,0 @@
import React from 'react';
import Interactive from 'react-interactive';
import { Link } from 'react-router-dom';
import s from '../styles/app.style';
import {Children} from './index';
const language = "ENG";
const bkgrnd = "05";
export default function Base(props) {
const children = <Children {...props} />;
return (
<div>
<div className="fix-pgBkgrnd-repeat-x">
<div className={"fix-img-bkgrnd fix-img-bkgrnd_"+bkgrnd}></div>
</div>
<div className="pgBkgrnd-repeat-x">
<div className="img-bkgrnd">
<div className="content-wrap">
<div className="legacy legacy-header">
<div className="header">
<div id="nav">
<div className="zero-clear-line headerSpriteNav-wrap">
<ul id="unity-sprite" className={language}>
<li id="unity-nav1" className={language}></li>
<li id="unity-nav2" className={language}><Link to={`/collection/`}><span>Collect</span></Link></li>
<li id="unity-nav3" className={language}><a href="http://www.tradecardsonline.com/?action=selectCard&goal=DK&game_id=82"><span>Build</span></a></li>
<li id="unity-nav4" className={language}><a href="http://www.tradecardsonline.com/?action=selectCard&goal=&game_id=82"><span>Trade</span></a></li>
<li id="unity-nav5" className={language}><Link to={`/`}><span>Home</span></Link></li>
<li id="unity-nav6" className={language}><a href="http://chaoticbackup.forumotion.com"><span>Forums</span></a></li>
<li id="unity-nav7" className={language}><Link to={`/portal/`}><span>Portal</span></Link></li>
<li id="unity-nav8" className={language}><a href="http://www.tradecardsonline.com/?action=selectCard&goal=DK&game_id=82"><span>Play</span></a></li>
<li id="unity-nav9" className={language}></li>
</ul>
<ul id="unityETC-sprite" className={language}>
<li id="unity-nav10" className={language}><Link to={`/EnterTheCode`}><span>Enter the Code</span></Link></li>
</ul>
</div>
</div>
</div>
</div>
<div className="legacy content">
<div className="left-column">
<div className="full-width clear-line" style={{marginBottom: "5px"}}>
</div>
</div>
<div className="full-column">
<div className="pods-wrap pad5px-btm">
<div className="clear-line full-width">
<div className="adPod-top-wrap">
<div className="videoAdPod-topleft">
<div className="videoAdPod-topLeft-repeat-x"></div>
</div>
<div className="videoAdPod-topright">
<div className="videoAdPod-topRight-repeat-x"></div>
</div>
</div>
</div>
<div className="content-area-repeat-xy">
<div className="content-area-top-repeat-x">
<div className="content-area-left-repeat-y">
<div className="content-area-right-repeat-y">
<div style={{margin: "0 8px 0 10px"}}>
<div id="player" style={{textAlign: "center"}}>
{children}
</div>
</div>
</div>
</div>
</div>
</div>
<div className="content-btm-wrap">
<div className="content-area-btm-left">
<div className="content-left-btm-repeat-x">
</div>
</div>
<div className="content-area-btm-right">
<div className="content-right-btm-repeat-x">
</div>
</div>
</div>
</div>
</div>
<div className="right-column">
<div className="full-width clear-line" style={{marginBottom: "5px"}}>
</div>
</div>
</div>
<div className="legacy legacy-footer">
<div className="footer-wrap">
<div className="footer-repeat-x">
<div className="footer-left">
<div className="footer-right">
<div className="footer-text">
<div className="footer-search"></div>
<div className="footer-nav">
<div className="copyright">
©2008 Chaotic USA Entertainment Group, Inc.
<br />
U.S. Pat 5810666 and 5954332 and other pending patent applications. All Rights Reserved.
</div>
</div>
<div className="footer-language">
<a href="javascript:showLanguageSelection();" className="page-options" title="Change Language">
<img src="http://web.archive.org/web/20130304153151im_/http://chaoticgame.com/Images/flag_usa_.gif" alt="English (Change Language)" width="40" height="27"/>
<br />English (Change Language)
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
);
}

View File

@@ -3,7 +3,7 @@ import Interactive from 'react-interactive';
import { Link } from 'react-router-dom';
import s from '../styles/home.style';
function Home() {
export default function Home() {
return (
<div>
<link rel="stylesheet" href="/src/css/with_love.css" />
@@ -21,5 +21,3 @@ function Home() {
</div>
);
}
export default Home;

19
src/components/Routing.js Normal file
View File

@@ -0,0 +1,19 @@
import React from 'react';
import { Route } from 'react-router-dom';
import {PageNotFound, UnderConstruction} from './Snippets';
import Home from './Home';
import EnterTheCode from './account/EnterTheCode';
export function Routing(props) {
console.log(props);
const match = props.match;
return (
<div>
<Route exact path={match.url} component={Home} />
<Route path={`${match.url}EnterTheCode`} component={EnterTheCode} />
<Route path="/PageNotFound" component={PageNotFound} />
<Route path="/UnderConstruction" component={UnderConstruction} />
</div>
);
}

View File

@@ -1,37 +1,133 @@
import React from 'react';
import { render } from 'react-dom';
import { Link } from 'react-router-dom';
import { BrowserRouter as Router, Route } from 'react-router-dom';
/* Common Components */
import Base from './Base';
import {PageNotFound, UnderConstruction} from './Snippets';
import s from '../styles/app.style';
import {Routing} from './Routing';
/* Home Component */
import Home from './Home';
import EnterTheCode from './account/EnterTheCode';
const language = "ENG";
const bkgrnd = "05";
render(
<Router>
<App />
</Router>
,document.getElementById('root'),
);
function App() {
return (
<div>
<Route path="/" component={Base}/>
</div>
);
}
</Router>
, document.getElementById('root'),
);
function Base(props) {
const children = <Routing {...props} />;
export function Children(props) {
console.log(props);
const match = props.match;
return (
<div>
<Route exact path={match.url} component={Home} />
<Route path={`${match.url}EnterTheCode`} component={EnterTheCode} />
<div className="fix-pgBkgrnd-repeat-x">
<div className={"fix-img-bkgrnd fix-img-bkgrnd_"+bkgrnd}></div>
</div>
<div className="pgBkgrnd-repeat-x">
<div className="img-bkgrnd">
<div className="content-wrap">
<div className="legacy legacy-header">
<div className="header">
<div id="nav">
<div className="zero-clear-line headerSpriteNav-wrap">
<ul id="unity-sprite" className={language}>
<li id="unity-nav1" className={language}></li>
<li id="unity-nav2" className={language}><Link to={`/collection/`}><span>Collect</span></Link></li>
<li id="unity-nav3" className={language}><a href="http://www.tradecardsonline.com/?action=selectCard&goal=DK&game_id=82"><span>Build</span></a></li>
<li id="unity-nav4" className={language}><a href="http://www.tradecardsonline.com/?action=selectCard&goal=&game_id=82"><span>Trade</span></a></li>
<li id="unity-nav5" className={language}><Link to={`/`}><span>Home</span></Link></li>
<li id="unity-nav6" className={language}><a href="http://chaoticbackup.forumotion.com"><span>Forums</span></a></li>
<li id="unity-nav7" className={language}><Link to={`/portal/`}><span>Portal</span></Link></li>
<li id="unity-nav8" className={language}><a href="http://www.tradecardsonline.com/?action=selectCard&goal=DK&game_id=82"><span>Play</span></a></li>
<li id="unity-nav9" className={language}></li>
</ul>
<ul id="unityETC-sprite" className={language}>
<li id="unity-nav10" className={language}><Link to={`/EnterTheCode`}><span>Enter the Code</span></Link></li>
</ul>
</div>
</div>
</div>
</div>
<div className="legacy content">
<div className="left-column">
<div className="full-width clear-line" style={{marginBottom: "5px"}}>
</div>
</div>
<div className="full-column">
<div className="pods-wrap pad5px-btm">
<div className="clear-line full-width">
<div className="adPod-top-wrap">
<div className="videoAdPod-topleft">
<div className="videoAdPod-topLeft-repeat-x"></div>
</div>
<div className="videoAdPod-topright">
<div className="videoAdPod-topRight-repeat-x"></div>
</div>
</div>
</div>
<div className="content-area-repeat-xy">
<div className="content-area-top-repeat-x">
<div className="content-area-left-repeat-y">
<div className="content-area-right-repeat-y">
<div style={{margin: "0 8px 0 10px"}}>
<div id="player" style={{textAlign: "center"}}>
{children}
</div>
</div>
</div>
</div>
</div>
</div>
<div className="content-btm-wrap">
<div className="content-area-btm-left">
<div className="content-left-btm-repeat-x">
</div>
</div>
<div className="content-area-btm-right">
<div className="content-right-btm-repeat-x">
</div>
</div>
</div>
</div>
</div>
<div className="right-column">
<div className="full-width clear-line" style={{marginBottom: "5px"}}>
</div>
</div>
</div>
<div className="legacy legacy-footer">
<div className="footer-wrap">
<div className="footer-repeat-x">
<div className="footer-left">
<div className="footer-right">
<div className="footer-text">
<div className="footer-search"></div>
<div className="footer-nav">
<div className="copyright">
©2008 Chaotic USA Entertainment Group, Inc.
<br />
U.S. Pat 5810666 and 5954332 and other pending patent applications. All Rights Reserved.
</div>
</div>
<div className="footer-language">
<a href="javascript:showLanguageSelection();" className="page-options" title="Change Language">
<img src="http://web.archive.org/web/20130304153151im_/http://chaoticgame.com/Images/flag_usa_.gif" alt="English (Change Language)" width="40" height="27"/>
<br />English (Change Language)
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
);
}