Add background to Home
This commit is contained in:
+1
-1
@@ -47,7 +47,7 @@ main {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
max-width: 1000px;
|
max-width: 960px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
padding: 0 1em;
|
padding: 0 1em;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import { Map } from 'immutable'
|
|||||||
import TalentTree from './TalentTree'
|
import TalentTree from './TalentTree'
|
||||||
import { calcAvailablePoints } from '../lib/tree'
|
import { calcAvailablePoints } from '../lib/tree'
|
||||||
import { classById } from '../data/classes'
|
import { classById } from '../data/classes'
|
||||||
import { Link } from 'react-router-dom';
|
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { addPoint, removePoint } from '../store/calculator/actions'
|
import { addPoint, removePoint } from '../store/calculator/actions'
|
||||||
import { Points } from '../store/calculator/types'
|
import { Points } from '../store/calculator/types'
|
||||||
|
|||||||
@@ -1,4 +1,19 @@
|
|||||||
.home {
|
.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 {
|
&__class-picker {
|
||||||
margin: 2em 0;
|
margin: 2em 0;
|
||||||
transform: translateY(0);
|
transform: translateY(0);
|
||||||
|
|||||||
+20
-18
@@ -41,7 +41,7 @@ export class Home extends React.PureComponent<Props> {
|
|||||||
if (prevParams.selectedClass !== params.selectedClass) {
|
if (prevParams.selectedClass !== params.selectedClass) {
|
||||||
// Class changed in route
|
// Class changed in route
|
||||||
this.loadFromUrlParams()
|
this.loadFromUrlParams()
|
||||||
} else {
|
} else if (this.props.classId) {
|
||||||
// Changes within same class
|
// Changes within same class
|
||||||
if (prevParams.pointString !== params.pointString) {
|
if (prevParams.pointString !== params.pointString) {
|
||||||
// Same class but point string changed
|
// Same class but point string changed
|
||||||
@@ -49,7 +49,7 @@ export class Home extends React.PureComponent<Props> {
|
|||||||
if (!this.props.points.equals(decoded)) {
|
if (!this.props.points.equals(decoded)) {
|
||||||
this.props.setPoints(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
|
// Points map changed, update the URL
|
||||||
this.updateURL(this.props.points)
|
this.updateURL(this.props.points)
|
||||||
}
|
}
|
||||||
@@ -95,23 +95,25 @@ export class Home extends React.PureComponent<Props> {
|
|||||||
})
|
})
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="container home">
|
<div className="home">
|
||||||
<div className={classPickerCn}>
|
<div className="container">
|
||||||
{!selectedClass &&
|
<div className={classPickerCn}>
|
||||||
<h3 className="home__class-picker-title">Choose your class</h3>
|
{!selectedClass &&
|
||||||
}
|
<h3 className="home__class-picker-title">Choose your class</h3>
|
||||||
<ClassPicker
|
}
|
||||||
center
|
<ClassPicker
|
||||||
selected={selectedClass}
|
center
|
||||||
/>
|
selected={selectedClass}
|
||||||
</div>
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
{currentClass &&
|
{currentClass &&
|
||||||
<Calculator
|
<Calculator
|
||||||
classId={classId}
|
classId={classId}
|
||||||
points={this.props.points}
|
points={this.props.points}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 228 KiB |
Reference in New Issue
Block a user