mirror of
https://github.com/chaoticbackup/chaoticbackup.github.io.git
synced 2026-03-21 17:24:14 -05:00
converted to "collection"
This commit is contained in:
parent
52b4241490
commit
e3e853e4e2
2
404.html
2
404.html
|
|
@ -2,7 +2,7 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Chaotic Backup Portal</title>
|
||||
<title>Chaotic Backup Collection</title>
|
||||
<script type="text/javascript">
|
||||
// Single Page Apps for GitHub Pages
|
||||
// https://github.com/rafrex/spa-github-pages
|
||||
|
|
|
|||
10
index.html
10
index.html
|
|
@ -3,9 +3,9 @@
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Chaotic Backup Portal</title>
|
||||
<meta name="description" content="Chaotic Backup - Portal to Perim">
|
||||
<link rel="stylesheet" href="/portal/src/css/legacy.css">
|
||||
<title>Chaotic Backup Collection</title>
|
||||
<meta name="description" content="Chaotic Backup Collection">
|
||||
<link rel="stylesheet" href="/collection/src/css/legacy.css">
|
||||
<link rel="stylesheet" href="/src/css/legacy.css">
|
||||
<style>
|
||||
html, body, div, span, a, p, ul, li, h1, code, nav {
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
horizontally based on vw to prevent content jump when vertical scroll bar show/hide.*/
|
||||
body { overflow-x: hidden; }
|
||||
</style>
|
||||
<link rel="shortcut icon" type="image/x-icon" href="/portal/favicon.ico"/>
|
||||
<link rel="shortcut icon" type="image/x-icon" href="/collection/favicon.ico"/>
|
||||
|
||||
<!-- Start Single Page Apps for GitHub Pages -->
|
||||
<script type="text/javascript">
|
||||
|
|
@ -88,7 +88,7 @@
|
|||
<body>
|
||||
<div id="root"></div>
|
||||
<!-- single page app in bundle.js -->
|
||||
<script src="/portal/build/bundle.js"></script>
|
||||
<script src="/collection/build/bundle.js"></script>
|
||||
<script src="/build/bundle.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
{
|
||||
"name": "chaoticbackup-portal",
|
||||
"name": "chaoticbackup-collection",
|
||||
"version": "0.0.2",
|
||||
"description": "Chaotic Backup Portal to Perim",
|
||||
"description": "Chaotic Backup Collection",
|
||||
"scripts": {
|
||||
"start": "webpack-dev-server -d --inline --host 0.0.0.0 --history-api-fallback --progress",
|
||||
"build": "webpack -p"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/chaoticbackup/portal.git"
|
||||
"url": "git+https://github.com/chaoticbackup/collection.git"
|
||||
},
|
||||
"author": "Danude Sandstorm",
|
||||
"license": "MIT",
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ function App({ children, routes }) {
|
|||
<li id="unity-nav4" className={language}><a href={ChangePage('trade')}><span>Trade</span></a></li>
|
||||
<li id="unity-nav5" className={language}><a href={ChangePage('centerOval')}><span>Home</span></a></li>
|
||||
<li id="unity-nav6" className={language}><a href={ChangePage('forum')}><span>Forums</span></a></li>
|
||||
<li id="unity-nav7" className={language}><a href={ChangePage('portal')}><span>Portal</span></a></li>
|
||||
<li id="unity-nav7" className={language}><a href={ChangePage('portal')}><span>Collection</span></a></li>
|
||||
<li id="unity-nav8" className={language}><a href={ChangePage('playNow')}><span>Play</span></a></li>
|
||||
<li id="unity-nav9" className={language}></li>
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ export default class Creatures extends React.Component {
|
|||
}
|
||||
|
||||
// ** Process the tribe ** //
|
||||
// /portal/Creatures/
|
||||
// /portal/{Tribe}/Creatures/
|
||||
// /collection/Creatures/
|
||||
// /collection/{Tribe}/Creatures/
|
||||
// The first / gets counted
|
||||
getData(props) {
|
||||
if (props.children) return this.props = props;
|
||||
|
|
@ -75,7 +75,7 @@ export default class Creatures extends React.Component {
|
|||
return (
|
||||
<div key={i}>
|
||||
<Interactive as={Link} {...s.link}
|
||||
to={"/portal/"+tribe}
|
||||
to={"/collection/"+tribe}
|
||||
><span style={s.title}>{tribe}</span></Interactive>
|
||||
{list_creatures(tribe, "Creatures/"+tribe+"/")}
|
||||
<hr />
|
||||
|
|
|
|||
|
|
@ -34,8 +34,8 @@ export default class Mugic extends React.Component {
|
|||
if (path[path.length-1] == "") path.pop(); // Remove trailing backslash
|
||||
|
||||
// ** Process the tribe ** //
|
||||
// /portal/Mugic/
|
||||
// /portal/{Tribe}/Mugic/
|
||||
// /collection/Mugic/
|
||||
// /collection/{Tribe}/Mugic/
|
||||
// The first / gets counted
|
||||
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -1,33 +0,0 @@
|
|||
import React, { PropTypes } from 'react';
|
||||
import Interactive from 'react-interactive';
|
||||
import { Link } from 'react-router';
|
||||
import s from '../styles/exampleComponent.style';
|
||||
|
||||
const propTypes = {
|
||||
children: PropTypes.element,
|
||||
};
|
||||
|
||||
function ExampleComponent({ children }) {
|
||||
return (
|
||||
<div>
|
||||
<p style={s.p}>
|
||||
This is an example page. Refresh the page or copy/paste the url to
|
||||
test out the redirect functionality (this same page should load
|
||||
after the redirect).
|
||||
</p>
|
||||
{children ||
|
||||
<div style={s.pageLinkContainer}>
|
||||
<Interactive
|
||||
as={Link}
|
||||
{...s.link}
|
||||
to="/portal/example/two-deep?field1=foo&field2=bar#boom!"
|
||||
>Example two deep with query and hash</Interactive>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
ExampleComponent.propTypes = propTypes;
|
||||
|
||||
export default ExampleComponent;
|
||||
|
|
@ -1,71 +0,0 @@
|
|||
import React, { PropTypes } from 'react';
|
||||
import Interactive from 'react-interactive';
|
||||
import { Link } from 'react-router';
|
||||
import s from '../styles/exampleTwoDeepComponent.style';
|
||||
|
||||
const propTypes = {
|
||||
location: PropTypes.object.isRequired,
|
||||
};
|
||||
|
||||
function ExampleTwoDeepComponent({ location }) {
|
||||
const queryPresent = Object.keys(location.query).length !== 0;
|
||||
const hashPresent = location.hash !== '';
|
||||
|
||||
function queryStringTitle() {
|
||||
if (queryPresent) return 'The query string field-value pairs are:';
|
||||
return 'No query string in the url';
|
||||
}
|
||||
|
||||
function hashFragmentTitle() {
|
||||
if (hashPresent) return 'The hash fragment is:';
|
||||
return 'No hash fragment in the url';
|
||||
}
|
||||
|
||||
function linkToShowQueryAndOrHash() {
|
||||
if (queryPresent && hashPresent) return null;
|
||||
|
||||
const queryString = (queryPresent ? location.search : '?field1=foo&field2=bar');
|
||||
const hashFragment = (hashPresent ? location.hash : '#boom!');
|
||||
|
||||
let linkText = '';
|
||||
if (queryPresent && !hashPresent) linkText = 'Show with hash fragment';
|
||||
if (!queryPresent && hashPresent) linkText = 'Show with query string';
|
||||
if (!queryPresent && !hashPresent) linkText = 'Show with query string and hash fragment';
|
||||
|
||||
return (
|
||||
<div style={s.lineContainer}>
|
||||
<Interactive
|
||||
as={Link}
|
||||
to={`/portal/example/two-deep${queryString}${hashFragment}`}
|
||||
{...s.link}
|
||||
>{linkText}</Interactive>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div style={s.lineContainer}>
|
||||
<div>{queryStringTitle()}</div>
|
||||
<ul>
|
||||
{
|
||||
Object.keys(location.query).map((field, index) => (
|
||||
s.li(`${field}: ${location.query[field]}`, { key: index })
|
||||
))
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
<div style={s.lineContainer}>
|
||||
<div>{hashFragmentTitle()}</div>
|
||||
<ul>
|
||||
{hashPresent ? s.li(location.hash.slice(1)) : undefined}
|
||||
</ul>
|
||||
</div>
|
||||
{linkToShowQueryAndOrHash()}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
ExampleTwoDeepComponent.propTypes = propTypes;
|
||||
|
||||
export default ExampleTwoDeepComponent;
|
||||
|
|
@ -23,7 +23,7 @@ export function ChangePage(asParams) {
|
|||
location = 'http://www.tradecardsonline.com/?action=selectCard&goal=&game_id=82';
|
||||
break;
|
||||
case 'portal':
|
||||
location = ('/portal/')
|
||||
location = ('/collection/')
|
||||
break;
|
||||
case 'forum':
|
||||
location = 'http://chaoticbackup.forumotion.com';
|
||||
|
|
@ -32,7 +32,7 @@ export function ChangePage(asParams) {
|
|||
location = 'http://www.tradecardsonline.com/?action=selectCard&goal=DK&game_id=82';
|
||||
break;
|
||||
default:
|
||||
location = '/portal/UnderConstruction/';
|
||||
location = '/collection/UnderConstruction/';
|
||||
break;
|
||||
}
|
||||
return location;
|
||||
|
|
|
|||
|
|
@ -7,41 +7,24 @@ function Home() {
|
|||
return (
|
||||
<div>
|
||||
<Interactive as={Link} {...s.link}
|
||||
to="/portal/Creatures"
|
||||
to="/collection/Creatures"
|
||||
>Creatures</Interactive>
|
||||
<br />
|
||||
<Interactive as={Link} {...s.link}
|
||||
to="/portal/Danian/Creatures"
|
||||
to="/collection/Danian/Creatures"
|
||||
>Danian</Interactive>
|
||||
<br />
|
||||
<Interactive as={Link} {...s.link}
|
||||
to="/portal/Overworld/Creatures"
|
||||
to="/collection/Overworld/Creatures"
|
||||
>Overworld</Interactive>
|
||||
<br />
|
||||
<Interactive as={Link} {...s.link}
|
||||
to="/portal/Underworld/Creatures"
|
||||
to="/collection/Underworld/Creatures"
|
||||
>Underworld</Interactive>
|
||||
<br />
|
||||
<Interactive as={Link} {...s.link}
|
||||
to="/portal/Mipedian/Creatures"
|
||||
to="/collection/Mipedian/Creatures"
|
||||
>Mipedian</Interactive>
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<div style={s.pageLinkContainer}>
|
||||
<Interactive
|
||||
as={Link}
|
||||
{...s.link}
|
||||
to="/portal/example"
|
||||
>Example page</Interactive>
|
||||
</div>
|
||||
<div style={s.pageLinkContainer}>
|
||||
<Interactive
|
||||
as={Link}
|
||||
{...s.link}
|
||||
to="/portal/example/two-deep?field1=foo&field2=bar#boom!"
|
||||
>Example two deep with query and hash</Interactive>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ export default class SingleCreature extends React.Component {
|
|||
}
|
||||
|
||||
// ** Process the tribe ** //
|
||||
// /portal/Creatures/{Tribe}/{Name}
|
||||
// /portal/{Tribe}/Creatures/{Name}
|
||||
// /collection/Creatures/{Tribe}/{Name}
|
||||
// /collection/{Tribe}/Creatures/{Name}
|
||||
// The first / gets counted
|
||||
getData(props) {
|
||||
let path = props.location.pathname.split("/");
|
||||
|
|
@ -91,15 +91,15 @@ export default class SingleCreature extends React.Component {
|
|||
);
|
||||
|
||||
const elements = card_data.gsx$elements.$t.split(/[ ,]+/).map((item, i) => {
|
||||
return <img className="icon" src={"/portal/src/img/icons/elements/"+item.toLowerCase()+".png"} alt={item} key={i}></img>;
|
||||
return <img className="icon" src={"/collection/src/img/icons/elements/"+item.toLowerCase()+".png"} alt={item} key={i}></img>;
|
||||
});
|
||||
|
||||
const locations = creature.gsx$location.$t.split(/[,]+\s*/).map((item, i) => {
|
||||
return <p key={i}><Interactive as={Link} {...s.link} to={"/portal/Locations/"+item}><span>{item}</span></Interactive></p>;
|
||||
return <p key={i}><Interactive as={Link} {...s.link} to={"/collection/Locations/"+item}><span>{item}</span></Interactive></p>;
|
||||
});
|
||||
|
||||
const battlegear = creature.gsx$battlegear.$t.split(/[,]+\s*/).map((item, i) => {
|
||||
return <p key={i}><Interactive as={Link} {...s.link} to={"/portal/Battlegear/"+item}><span>{item}</span></Interactive></p>;
|
||||
return <p key={i}><Interactive as={Link} {...s.link} to={"/collection/Battlegear/"+item}><span>{item}</span></Interactive></p>;
|
||||
});
|
||||
|
||||
return(
|
||||
|
|
@ -164,7 +164,7 @@ export default class SingleCreature extends React.Component {
|
|||
<hr />
|
||||
<div>
|
||||
<strong>Tribe: </strong>{this.state.tribe}
|
||||
<img className="icon" src={"/portal/src/img/icons/tribes/"+this.state.tribe.toLowerCase()+".png"}></img>
|
||||
<img className="icon" src={"/collection/src/img/icons/tribes/"+this.state.tribe.toLowerCase()+".png"}></img>
|
||||
</div>
|
||||
<hr />
|
||||
<div>
|
||||
|
|
|
|||
|
|
@ -6,8 +6,6 @@ import App from './components/App';
|
|||
import Home from './components/Home';
|
||||
import PageNotFound from './components/PageNotFound';
|
||||
import UnderConstruction from './components/UnderConstruction';
|
||||
import ExampleComponent from './components/ExampleComponent';
|
||||
import ExampleTwoDeepComponent from './components/ExampleTwoDeepComponent';
|
||||
|
||||
// import Attacks from './component/Category/Attacks';
|
||||
// import Battlegear from './component/Category/Battlegear';
|
||||
|
|
@ -23,13 +21,9 @@ import SingleCreature from './components/Single/Creature';
|
|||
|
||||
const routes = (
|
||||
<Route path="/" component={App}>
|
||||
<Route path="portal/" mapMenuTitle="Home">
|
||||
<Route path="collection/" mapMenuTitle="Home">
|
||||
<IndexRoute component={Home} />
|
||||
|
||||
<Route path="example" mapMenuTitle="Example" component={ExampleComponent}>
|
||||
<Route path="two-deep" mapMenuTitle="Two Deep" component={ExampleTwoDeepComponent} />
|
||||
</Route>
|
||||
|
||||
{/* Attacks */}
|
||||
<Route path="Attacks" component={UnderConstruction} mapMenuTitle="Attacks">
|
||||
<Route path="*" component={UnderConstruction} />
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user