From dec4801688f962511cc41aede36a08f007343176 Mon Sep 17 00:00:00 2001 From: Tom Russell Date: Wed, 14 Aug 2019 13:06:07 +0100 Subject: [PATCH] Category sidebar block styles --- app/src/frontend/app.tsx | 21 ++- app/src/frontend/building/categories.css | 46 ++++- app/src/frontend/building/categories.tsx | 229 +++++++++++------------ app/src/frontend/building/sidebar.css | 84 --------- app/src/frontend/styles/colours.css | 40 ++++ 5 files changed, 207 insertions(+), 213 deletions(-) diff --git a/app/src/frontend/app.tsx b/app/src/frontend/app.tsx index 4b210c6a..8e1562e9 100644 --- a/app/src/frontend/app.tsx +++ b/app/src/frontend/app.tsx @@ -12,6 +12,7 @@ import ColouringMap from './map/map'; import Header from './header'; import MultiEdit from './building/multi-edit'; import Categories from './building/categories'; +import Sidebar from './building/sidebar'; import AboutPage from './pages/about'; import ContributorAgreementPage from './pages/contributor-agreement'; @@ -207,16 +208,20 @@ class App extends React.Component { // TODO: add proper types - + + + - + + + ( ( - - - +
    + + + + + + + + + + + + +
) Categories.propTypes = { @@ -127,13 +125,14 @@ Categories.propTypes = { } const Category = (props) => ( -
  • +
  • {props.title}

    {props.desc}

    diff --git a/app/src/frontend/building/sidebar.css b/app/src/frontend/building/sidebar.css index 2c63e677..edaae672 100644 --- a/app/src/frontend/building/sidebar.css +++ b/app/src/frontend/building/sidebar.css @@ -98,90 +98,6 @@ .data-section:first-of-type .section-header { border-top-color: #fff; } -.section-header.active.location { - border-bottom-color: #edc40b; -} -.section-header.location:hover > a::before, -.section-header.location.active > a::before { - color: #edc40b; -} -.section-header.active.use { - border-bottom-color: #f0ee0c; -} -.section-header.use:hover > a::before, -.section-header.use.active > a::before { - color: #f0ee0c; -} -.section-header.active.type { - border-bottom-color: #ff9100; -} -.section-header.type:hover > a::before, -.section-header.type.active > a::before { - color: #ff9100; -} -.section-header.active.age { - border-bottom-color: #ee5f63; -} -.section-header.age:hover > a::before, -.section-header.age.active > a::before { - color: #ee5f63; -} -.section-header.active.size { - border-bottom-color: #ee91bf; -} -.section-header.size:hover > a::before, -.section-header.size.active > a::before { - color: #ee91bf; -} -.section-header.active.construction { - border-bottom-color: #aa7fa7; -} -.section-header.construction:hover > a::before, -.section-header.construction.active > a::before { - color: #aa7fa7; -} -.section-header.active.team { - border-bottom-color: #6f879c; -} -.section-header.team:hover > a::before, -.section-header.team.active > a::before { - color: #6f879c; -} -.section-header.active.sustainability { - border-bottom-color: #5ec232; -} -.section-header.sustainability:hover > a::before, -.section-header.sustainability.active > a::before { - color: #5ec232; -} -.section-header.active.greenery { - border-bottom-color: #6dbb8b; -} -.section-header.greenery:hover > a::before, -.section-header.greenery.active > a::before { - color: #6dbb8b; -} -.section-header.active.community { - border-bottom-color: #65b7ff; -} -.section-header.community:hover > a::before, -.section-header.community.active > a::before { - color: #65b7ff; -} -.section-header.active.planning { - border-bottom-color: #a1a3a9; -} -.section-header.planning:hover > a::before, -.section-header.planning.active > a::before { - color: #a1a3a9; -} -.section-header.active.like { - border-bottom-color: #9c896d; -} -.section-header.like:hover > a::before, -.section-header.like.active > a::before { - color: #9c896d; -} .section-header > a::before { display: block; diff --git a/app/src/frontend/styles/colours.css b/app/src/frontend/styles/colours.css index 23ccbbec..91a9f189 100644 --- a/app/src/frontend/styles/colours.css +++ b/app/src/frontend/styles/colours.css @@ -52,3 +52,43 @@ .pale-brown { background-color: #918e6e; } + +/** + * Category colours + */ +.background-location { + background-color: #edc40b; +} +.background-use { + background-color: #f0ee0c; +} +.background-type { + background-color: #ff9100; +} +.background-age { + background-color: #ee5f63; +} +.background-size { + background-color: #ee91bf; +} +.background-construction { + background-color: #aa7fa7; +} +.background-team { + background-color: #6f879c; +} +.background-sustainability { + background-color: #5ec232; +} +.background-greenery { + background-color: #6dbb8b; +} +.background-community { + background-color: #65b7ff; +} +.background-planning { + background-color: #a1a3a9; +} +.background-like { + background-color: #9c896d; +}