From e3e853e4e27bd3e9a4f7305bf38ea7b498573878 Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 12 Oct 2017 04:37:01 -0400 Subject: [PATCH] converted to "collection" --- 404.html | 2 +- index.html | 10 ++-- package.json | 6 +- src/components/App.js | 2 +- src/components/Category/Creatures.js | 6 +- src/components/Category/Mugic.js | 4 +- src/components/ExampleComponent.js | 33 ----------- src/components/ExampleTwoDeepComponent.js | 71 ----------------------- src/components/Helper.js | 4 +- src/components/Home.js | 27 ++------- src/components/Single/Creature.js | 12 ++-- src/index.js | 8 +-- 12 files changed, 29 insertions(+), 156 deletions(-) delete mode 100644 src/components/ExampleComponent.js delete mode 100644 src/components/ExampleTwoDeepComponent.js diff --git a/404.html b/404.html index 99f4fd2..5eea322 100644 --- a/404.html +++ b/404.html @@ -2,7 +2,7 @@ - Chaotic Backup Portal + Chaotic Backup Collection + diff --git a/package.json b/package.json index b754588..278b2e5 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/components/App.js b/src/components/App.js index 1e608f8..d2481e3 100644 --- a/src/components/App.js +++ b/src/components/App.js @@ -55,7 +55,7 @@ function App({ children, routes }) {
  • Trade
  • Home
  • Forums
  • -
  • Portal
  • +
  • Collection
  • Play
  • diff --git a/src/components/Category/Creatures.js b/src/components/Category/Creatures.js index d46a032..c05ea7b 100644 --- a/src/components/Category/Creatures.js +++ b/src/components/Category/Creatures.js @@ -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 (
    {tribe} {list_creatures(tribe, "Creatures/"+tribe+"/")}
    diff --git a/src/components/Category/Mugic.js b/src/components/Category/Mugic.js index abf05d0..031aa20 100644 --- a/src/components/Category/Mugic.js +++ b/src/components/Category/Mugic.js @@ -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 ( diff --git a/src/components/ExampleComponent.js b/src/components/ExampleComponent.js deleted file mode 100644 index 340abf5..0000000 --- a/src/components/ExampleComponent.js +++ /dev/null @@ -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 ( -
    -

    - 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). -

    - {children || -
    - Example two deep with query and hash -
    - } -
    - ); -} - -ExampleComponent.propTypes = propTypes; - -export default ExampleComponent; diff --git a/src/components/ExampleTwoDeepComponent.js b/src/components/ExampleTwoDeepComponent.js deleted file mode 100644 index 9afb205..0000000 --- a/src/components/ExampleTwoDeepComponent.js +++ /dev/null @@ -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 ( -
    - {linkText} -
    - ); - } - - return ( -
    -
    -
    {queryStringTitle()}
    -
      - { - Object.keys(location.query).map((field, index) => ( - s.li(`${field}: ${location.query[field]}`, { key: index }) - )) - } -
    -
    -
    -
    {hashFragmentTitle()}
    -
      - {hashPresent ? s.li(location.hash.slice(1)) : undefined} -
    -
    - {linkToShowQueryAndOrHash()} -
    - ); -} - -ExampleTwoDeepComponent.propTypes = propTypes; - -export default ExampleTwoDeepComponent; diff --git a/src/components/Helper.js b/src/components/Helper.js index 47fbf76..68cb8d6 100644 --- a/src/components/Helper.js +++ b/src/components/Helper.js @@ -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; diff --git a/src/components/Home.js b/src/components/Home.js index d1cdbed..3a176d3 100644 --- a/src/components/Home.js +++ b/src/components/Home.js @@ -7,41 +7,24 @@ function Home() { return (
    Creatures
    Danian
    Overworld
    Underworld
    Mipedian -
    -
    -
    -
    - Example page -
    -
    - Example two deep with query and hash -
    ); } diff --git a/src/components/Single/Creature.js b/src/components/Single/Creature.js index 94e31b8..7730d23 100644 --- a/src/components/Single/Creature.js +++ b/src/components/Single/Creature.js @@ -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 {item}; + return {item}; }); const locations = creature.gsx$location.$t.split(/[,]+\s*/).map((item, i) => { - return

    {item}

    ; + return

    {item}

    ; }); const battlegear = creature.gsx$battlegear.$t.split(/[,]+\s*/).map((item, i) => { - return

    {item}

    ; + return

    {item}

    ; }); return( @@ -164,7 +164,7 @@ export default class SingleCreature extends React.Component {
    Tribe: {this.state.tribe} - +

    diff --git a/src/index.js b/src/index.js index 986c0ba..28d8094 100644 --- a/src/index.js +++ b/src/index.js @@ -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 = ( - + - - - - {/* Attacks */}