From 4c92d0821ec26b58d0816b9e6716df269c5231ba Mon Sep 17 00:00:00 2001 From: cha0s Date: Mon, 12 Jul 2021 14:04:43 -0500 Subject: [PATCH] refactor: ui --- packages/core/src/components/persea/index.jsx | 26 ++--- .../core/src/components/persea/index.scss | 49 ++------- .../src/components/project/bottom/index.jsx | 34 ++++++ .../project/bottom/index.module.scss | 46 ++++++++ .../src/components/project/bottom/map.png | Bin 0 -> 5617 bytes .../components/project/bottom/settings.svg | 1 + .../core/src/components/project/index.jsx | 78 ++++++++------ .../core/src/components/project/index.scss | 14 --- .../src/components/project/route/index.jsx | 5 +- .../src/components/project/sidebar/index.scss | 98 ------------------ 10 files changed, 152 insertions(+), 199 deletions(-) create mode 100644 packages/core/src/components/project/bottom/index.jsx create mode 100644 packages/core/src/components/project/bottom/index.module.scss create mode 100644 packages/core/src/components/project/bottom/map.png create mode 100644 packages/core/src/components/project/bottom/settings.svg delete mode 100644 packages/core/src/components/project/index.scss delete mode 100644 packages/core/src/components/project/sidebar/index.scss diff --git a/packages/core/src/components/persea/index.jsx b/packages/core/src/components/persea/index.jsx index c7a1f7d..4e70bb5 100644 --- a/packages/core/src/components/persea/index.jsx +++ b/packages/core/src/components/persea/index.jsx @@ -19,19 +19,21 @@ import history from './history'; const Persea = React.memo(() => { const isLoggedIn = useSelector(userIdSelector); return ( - - - - {isLoggedIn ? : Login} +
+ + + + {isLoggedIn ? : Login} + + + + + + - - - - - - - {!isLoggedIn && } - + {!isLoggedIn && } + +
); }); diff --git a/packages/core/src/components/persea/index.scss b/packages/core/src/components/persea/index.scss index 0a506c9..83f926b 100644 --- a/packages/core/src/components/persea/index.scss +++ b/packages/core/src/components/persea/index.scss @@ -111,11 +111,6 @@ label, .label { min-height: 3em; padding: 1em; user-select: none; - // @media(min-width: 20em) { - // align-items: center; - // flex-direction: row; - // justify-content: space-between; - // } &:nth-of-type(2n+1) { background-color: rgba(0, 0, 0, 0.15); } @@ -178,38 +173,6 @@ textarea { resize: none; } -.grow-wrap { - /* easy way to plop the elements on top of each other and have them both sized based on the tallest one's height */ - display: grid; -} -.grow-wrap::after { - /* Note the weird space! Needed to preventy jumpy behavior */ - content: attr(data-replicated-value) " "; - - /* This is how textarea text behaves */ - white-space: pre-wrap; - - /* Hidden from view, clicks, and screen readers */ - visibility: hidden; -} -.grow-wrap > textarea { - /* You could leave this, but after a user resizes, then it ruins the auto sizing */ - resize: none; - - /* Firefox shows scrollbar on growth, you can hide like this. */ - overflow: hidden; -} -.grow-wrap > textarea, -.grow-wrap::after { - /* Identical styling required!! */ - border: 1px solid black; - padding: 0.5rem; - font: inherit; - - /* Place on top of each other */ - grid-area: 1 / 1 / 2 / 2; -} - fieldset { background-color: #151515; border: 1px solid rgba(255, 255, 255, 0.1); @@ -233,6 +196,11 @@ button, .button { &:hover { background-color: rgba(255, 255, 255, 0.05); } + .active { + box-shadow: 0px 0px 5px #00e1ff inset; + background-color: #006370; + border: 2px solid #006370; + } } button, input[type="checkbox"], input[type="checkbox"] + label { @@ -289,8 +257,7 @@ img { image-rendering: pixelated; } -button.active { - box-shadow: 0px 0px 5px #00e1ff inset; - background-color: #006370; - border: 2px solid #006370; +.persea { + height: 100vh; + width: 100vw; } diff --git a/packages/core/src/components/project/bottom/index.jsx b/packages/core/src/components/project/bottom/index.jsx new file mode 100644 index 0000000..f43533e --- /dev/null +++ b/packages/core/src/components/project/bottom/index.jsx @@ -0,0 +1,34 @@ +import { + classnames, + hot, + React, +} from '@latus/react'; + +import {locals} from './index.module.scss'; + +function Bottom() { + const buttons = [ + , + // eslint-disable-next-line jsx-a11y/control-has-associated-label +