Initial framework ready
This commit is contained in:
+53
@@ -0,0 +1,53 @@
|
||||
import React from "react";
|
||||
import { BrowserRouter, Switch, Route } from "react-router-dom";
|
||||
import { Header, Container } from "semantic-ui-react";
|
||||
|
||||
//include styles
|
||||
import "./styles/shared.css";
|
||||
|
||||
//include other pages
|
||||
import Landing from "./pages/landing.jsx";
|
||||
import Rules from "./pages/rules.jsx";
|
||||
import CardList from "./pages/card_list.jsx";
|
||||
import Concepts from "./pages/concepts.jsx";
|
||||
import About from "./pages/about.jsx";
|
||||
import NotFound from "./pages/not_found.jsx";
|
||||
|
||||
//include panels
|
||||
import LinkButton from "./panels/link_button.jsx";
|
||||
import Footer from "./panels/footer.jsx";
|
||||
|
||||
class App extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className="central">
|
||||
<Header as="h1" textAlign="center">Mecha: Immense Warfare</Header>
|
||||
<BrowserRouter>
|
||||
<Container className="panel">
|
||||
<LinkButton.Group widths="5">
|
||||
<LinkButton to="/rules">Rules</LinkButton>
|
||||
<LinkButton to="/cardlist">Card List</LinkButton>
|
||||
<LinkButton to="/concepts">Concepts</LinkButton>
|
||||
<LinkButton to="/about">About</LinkButton>
|
||||
</LinkButton.Group>
|
||||
<Switch>
|
||||
<Route exact path="/" component={ Landing } />
|
||||
<Route exact path="/rules" component={ Rules } />
|
||||
<Route exact path="/cardlist" component={ CardList } />
|
||||
<Route exact path="/concepts" component={ Concepts } />
|
||||
<Route exact path="/about" component={ About } />
|
||||
<Route path="*" component={ NotFound } />
|
||||
</Switch>
|
||||
</Container>
|
||||
</BrowserRouter>
|
||||
<Footer />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default App;
|
||||
Reference in New Issue
Block a user