-
+ return (
+
+
+
{this.type.charAt(0).toUpperCase()+this.type.substr(1)}
+
{bottom_nav}
);
}
}
diff --git a/src/components/portal/Category/Tribes.js b/src/components/portal/Category/Tribes.js
index 18f2a97..c1af97f 100644
--- a/src/components/portal/Category/Tribes.js
+++ b/src/components/portal/Category/Tribes.js
@@ -25,7 +25,7 @@ export default class Tribes extends React.Component {
// -> /{Tribe}/Mugic || /{Tribe}/Creatures
render() {
if (this.loaded == false) {
- API.buildCollection([{'cards': 'creatures'}, {'portal': 'creatures'}, {'cards': 'mugic'}, {'portal': 'mugic'}])
+ API.LoadDB([{'cards': 'creatures'}, {'portal': 'creatures'}, {'cards': 'mugic'}, {'portal': 'mugic'}])
.then(() => {
this.loaded = true;
});
@@ -37,7 +37,6 @@ export default class Tribes extends React.Component {
let tribe = path[2];
-
let filter = this.filter.addCollection('filter');
var pview = filter.addDynamicView('filter');
pview.applySimpleSort('gsx$name');
diff --git a/src/components/portal/Search.js b/src/components/portal/Search.js
index fa64019..4d2bc35 100644
--- a/src/components/portal/Search.js
+++ b/src/components/portal/Search.js
@@ -49,15 +49,10 @@ class DBSearch extends React.Component {
render() {
if (this.loaded == false) {
- if (API.urls !== null &&
- API.portal !== null &&
- API.cards !== null
- ) {
- API.buildCollection([{'portal': 'attacks'}, {'portal': 'battlegear'}, {'portal': 'creatures'}, {'portal': 'locations'}, {'portal': 'mugic'}])
- .then(() => {
- this.loaded = true;
- });
- }
+ API.LoadDB([{'portal': 'attacks'}, {'portal': 'battlegear'}, {'portal': 'creatures'}, {'portal': 'locations'}, {'portal': 'mugic'}])
+ .then(() => {
+ this.loaded = true;
+ });
return (
Loading...);
}
diff --git a/src/components/portal/index.js b/src/components/portal/index.js
index 391648f..52556c4 100644
--- a/src/components/portal/index.js
+++ b/src/components/portal/index.js
@@ -6,12 +6,13 @@ import {Link, Route} from 'react-router-dom';
import API from '../SpreadsheetData';
import Home from './Home';
import Search from './Search';
-import Attacks from './Category/Attacks';
-import Battlegear from './Category/Battlegear';
+import Category from './Category/Category';
import Creatures from './Category/Creatures';
-import Locations from './Category/Locations';
import Mugic from './Category/Mugic';
import Tribes from './Category/Tribes';
+import Attack from './Single/Attack';
+import Battlegear from './Single/Battlegear';
+import Location from './Single/Location';
import {SearchButton} from '../Snippets';
import '../../scss/portal.scss';
@@ -31,21 +32,20 @@ export default class Base extends React.Component {
}
function Routing(props) {
- const match = props.match;
+ const url = props.match.url;
- const tribes = API.tribes.map((tribe, i) => (
-
- ));
return (
-
-
-
-
-
-
- {tribes}
-
+
+ } />
+ } />
+
+ } />
+
+ {API.tribes.map((tribe, i) => (
+
+ ))}
+
);
}
diff --git a/src/scss/portal.scss b/src/scss/portal.scss
index a2adab5..f357b09 100644
--- a/src/scss/portal.scss
+++ b/src/scss/portal.scss
@@ -72,10 +72,6 @@
width: 18px;
}
-.entry {
- padding: 10px;
-}
-
.entry .title {
font-weight: bold;
font-size: 16px;
@@ -109,3 +105,59 @@
font-size: 16px;
line-height: 20px;
}
+
+.portal {
+ .entry {
+ font-size: 1.2em;
+
+ .top_content {
+ min-height: 600px;
+ height: calc(100vh - 200px);
+ overflow-y: scroll;
+
+ /* width */
+ ::-webkit-scrollbar {
+ width: 10px;
+ }
+
+ /* Track */
+ ::-webkit-scrollbar-track {
+ background: #f1f1f1;
+ }
+
+ /* Handle */
+ ::-webkit-scrollbar-thumb {
+ background: #888;
+ }
+
+ /* Handle on hover */
+ ::-webkit-scrollbar-thumb:hover {
+ background: #555;
+ }
+ }
+
+ .cat_title {
+ text-align: left;
+ background-color: #1a1a1a;
+ font-weight: bold;
+ font-size: 16px;
+ padding-top: 1px;
+ padding-left: 4px;
+ }
+
+ /* height is 118px */
+ .bottom_nav {
+ background-color: #1a1a1a;
+ overflow-x: scroll;
+ overflow-y: hidden;
+ white-space: nowrap;
+ > div {
+ display: inline-block;
+ img {
+ margin-right: 3px;
+ margin-left: 3px;
+ }
+ }
+ }
+ }
+}