From a074677ed6bae101d072e429448271ce3779a1c8 Mon Sep 17 00:00:00 2001 From: ntr Date: Fri, 31 May 2019 16:23:34 +1000 Subject: [PATCH] stats and other tings --- client/assets/styles/instance.css | 22 +++++------------- client/index.html | 9 ++++++++ client/src/components/instance.constructs.jsx | 23 ++++++++----------- client/src/components/main.jsx | 2 -- 4 files changed, 25 insertions(+), 31 deletions(-) diff --git a/client/assets/styles/instance.css b/client/assets/styles/instance.css index ac6ff176..3503fefb 100644 --- a/client/assets/styles/instance.css +++ b/client/assets/styles/instance.css @@ -264,12 +264,10 @@ .construct-list .stats { grid-area: stats; - display: grid; - grid-template-rows: 1fr 3fr; - grid-template-columns: 3fr 1fr 3fr; - grid-template-areas: - "dl sl ll" - "st st st"; + display: flex; + flex-flow: row; + flex: 1; + justify-content: center; border-width: 0px; } @@ -277,19 +275,11 @@ font-size: 75%; } -.construct-list .stats .icons { - grid-area: st; - display: flex; - flex-flow: row; - flex: 1; - justify-content: center; -} - -.icons figure:nth-child(4n) { +.stats figure:nth-child(4n) { margin: 0 1em; } -.icons figure { +.stats figure { flex: 1; } diff --git a/client/index.html b/client/index.html index f0da3e9e..77fe1f70 100644 --- a/client/index.html +++ b/client/index.html @@ -19,4 +19,13 @@ + \ No newline at end of file diff --git a/client/src/components/instance.constructs.jsx b/client/src/components/instance.constructs.jsx index cdaa8aab..e5197f1c 100644 --- a/client/src/components/instance.constructs.jsx +++ b/client/src/components/instance.constructs.jsx @@ -183,7 +183,15 @@ function Construct(props) { const stats = Object.keys(STATS).map(s => { const stat = STATS[s]; - return
+ + const info = (s === 'Speed' && 'Speed') + || (s.includes('Power') && 'Power') + || (s.includes('Life') && 'Life'); + + return
hoverInfo(e, info)} > {shapes[s]()}
{construct[stat.stat].value}
; @@ -203,18 +211,7 @@ function Construct(props) { {specs}
-
- Power -
-
- Speed -
-
- Life -
-
- {stats} -
+ {stats}
); diff --git a/client/src/components/main.jsx b/client/src/components/main.jsx index e8583398..a74bbd8b 100644 --- a/client/src/components/main.jsx +++ b/client/src/components/main.jsx @@ -35,8 +35,6 @@ function Main(props) { return ; } - console.warn('nav', nav, instance, game) - if (nav === 'team') return ; if (nav === 'list') return ;