diff --git a/src/App.scss b/src/App.scss index c6dfb8f..7c324de 100644 --- a/src/App.scss +++ b/src/App.scss @@ -47,7 +47,7 @@ main { } .container { - max-width: 1000px; + max-width: 960px; margin: 0 auto; padding: 0 1em; } diff --git a/src/components/Calculator.tsx b/src/components/Calculator.tsx index 9ab76cd..3f63ce0 100644 --- a/src/components/Calculator.tsx +++ b/src/components/Calculator.tsx @@ -4,7 +4,6 @@ import { Map } from 'immutable' import TalentTree from './TalentTree' import { calcAvailablePoints } from '../lib/tree' import { classById } from '../data/classes' -import { Link } from 'react-router-dom'; import { connect } from 'react-redux'; import { addPoint, removePoint } from '../store/calculator/actions' import { Points } from '../store/calculator/types' diff --git a/src/containers/Home.scss b/src/containers/Home.scss index 0ac3e5d..07eae90 100644 --- a/src/containers/Home.scss +++ b/src/containers/Home.scss @@ -1,4 +1,19 @@ .home { + min-height: 85vh; + + &:before { + content: ''; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-image: url('../images/home-bg.jpg'); + background-size: cover; + opacity: .05; + z-index: -1; + } + &__class-picker { margin: 2em 0; transform: translateY(0); diff --git a/src/containers/Home.tsx b/src/containers/Home.tsx index a6a444c..1a97482 100644 --- a/src/containers/Home.tsx +++ b/src/containers/Home.tsx @@ -41,7 +41,7 @@ export class Home extends React.PureComponent { if (prevParams.selectedClass !== params.selectedClass) { // Class changed in route this.loadFromUrlParams() - } else { + } else if (this.props.classId) { // Changes within same class if (prevParams.pointString !== params.pointString) { // Same class but point string changed @@ -49,11 +49,11 @@ export class Home extends React.PureComponent { if (!this.props.points.equals(decoded)) { this.props.setPoints(decoded) } - } else if (prevProps.points !== this.props.points && this.props.classId) { + } else if (prevProps.points !== this.props.points) { // Points map changed, update the URL this.updateURL(this.props.points) } - } + } } componentWillUnmount() { @@ -95,23 +95,25 @@ export class Home extends React.PureComponent { }) return ( -
-
- {!selectedClass && -

Choose your class

+
+
+
+ {!selectedClass && +

Choose your class

+ } + +
+ + {currentClass && + } -
- - {currentClass && - - }
) } diff --git a/src/images/home-bg.jpg b/src/images/home-bg.jpg new file mode 100644 index 0000000..9bad678 Binary files /dev/null and b/src/images/home-bg.jpg differ