diff --git a/TODO.md b/TODO.md index cfa6319..1463f47 100644 --- a/TODO.md +++ b/TODO.md @@ -1,5 +1,6 @@ # TODO +- [ ] SCSS: Normalize - [ ] General: Add redux - [ ] General: Talent tooltips - [ ] General: Responsive on mobile diff --git a/src/App.scss b/src/App.scss index b35cda8..c009a84 100644 --- a/src/App.scss +++ b/src/App.scss @@ -4,6 +4,12 @@ body { color: white; background-color: #111; font-family: Verdana; + margin: 0; +} + +// Normalize etc. +ul { + margin: 0; } a { @@ -28,6 +34,17 @@ a { } } +.yellow { color: $color-yellow; } +.green { color: $quality-2; } + +.tight { + margin-bottom: 0; + + & + p { + margin-top: 0; + } +} + .calculator { &__points { color: white; @@ -69,35 +86,16 @@ a { } } -.class-picker { - display: flex; - list-style: none; - padding: 0; +.index { + min-height: 85vh; +} + +.index__class-picker { margin: 2em 0; +} - &--center { - justify-content: center; - } - - &__class { - margin-right: 1em; - opacity: 1; - transition: all .1s ease-out; - - &:hover { - opacity: 1; - } - - &--active { - opacity: 1; - } - - &--inactive { - opacity: .4; - - &:hover { - opacity: .5; - } - } - } +footer { + padding: 2em; + font-size: 12px; + text-align: center; } \ No newline at end of file diff --git a/src/App.tsx b/src/App.tsx index aaf4595..550e91a 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,8 +1,8 @@ import React from 'react' import './App.scss' import { IndexRoute } from './components/IndexRoute' -import { PlaygroundRoute } from './components/PlaygroundRoute' -import { BrowserRouter as Router, Route, Switch } from 'react-router-dom' +import { Playground } from './components/Playground' +import { BrowserRouter as Router, Route, Switch, Link } from 'react-router-dom' const App: React.FC = () => { return ( @@ -10,9 +10,15 @@ const App: React.FC = () => { {/* */}
- + + +
); diff --git a/src/components/Calculator.tsx b/src/components/Calculator.tsx index 463b76d..3a98ab8 100644 --- a/src/components/Calculator.tsx +++ b/src/components/Calculator.tsx @@ -5,13 +5,12 @@ import { modifyTalentPoint, calcAvailablePoints, encodeKnownTalents, - SORT_TALENTS_BY_SPEC } from '../lib/tree' -import { talentsBySpec, talentsById } from '../data/talents' +import { talentsBySpec } from '../data/talents' import { classByName } from '../data/classes' import { History } from 'history' -import { spells } from '../data/spells' import { debugPrintKnown } from '../lib/debug' +import { Link } from 'react-router-dom'; interface Props { selectedClass: string @@ -96,10 +95,11 @@ export class Calculator extends React.PureComponent { Points: {availablePoints} +

Quick links

) diff --git a/src/components/ClassPicker.scss b/src/components/ClassPicker.scss new file mode 100644 index 0000000..89c7ba4 --- /dev/null +++ b/src/components/ClassPicker.scss @@ -0,0 +1,31 @@ +.class-picker { + display: flex; + list-style: none; + padding: 0; + + &--center { + justify-content: center; + } + + &__class { + margin-right: 1em; + opacity: 1; + transition: all .1s ease-out; + + &:hover { + opacity: 1; + } + + &--active { + opacity: 1; + } + + &--inactive { + opacity: .4; + + &:hover { + opacity: .5; + } + } + } +} \ No newline at end of file diff --git a/src/components/ClassPicker.tsx b/src/components/ClassPicker.tsx index d773c33..fdc8c93 100644 --- a/src/components/ClassPicker.tsx +++ b/src/components/ClassPicker.tsx @@ -1,3 +1,4 @@ +import './ClassPicker.scss' import React from 'react' import { Link } from 'react-router-dom' import { classByName } from '../data/classes' @@ -8,6 +9,7 @@ interface Props { /** Name of the selected class, lowercase */ selected?: string center?: boolean + className?: string } const classNameForItem = (c: ClassData, selected: string) => classNames('class-picker__class', { @@ -24,7 +26,7 @@ export class ClassPicker extends React.PureComponent { const cn = classNames('class-picker', { 'class-picker--has-selection': !!selected, 'class-picker--center': center, - }) + }, this.props.className) return (