Feature/misc ui fixes (#449)

* Re-style category links, remove More button

* Fix colour, order and text of categories

* Increase legend max height
This commit is contained in:
mz8i 2019-10-02 16:28:11 +01:00 committed by GitHub
parent 606a36ce6c
commit e7b7e3fe67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 28 additions and 44 deletions

View File

@ -26,7 +26,9 @@
text-decoration: none; text-decoration: none;
} }
.data-category-list .category-link { .data-category-list .category-link {
display: block; display: flex;
justify-content: center;
align-items: center;
padding: 0.1em; padding: 0.1em;
width: 100%; width: 100%;
height: 100%; height: 100%;
@ -36,32 +38,14 @@
.data-category-list .category-link:focus { .data-category-list .category-link:focus {
color: #222; color: #222;
} }
.data-category-list .help {
position: absolute;
bottom: 0.75rem;
right: 0.75rem;
color: #222;
}
.data-category-list .help:hover,
.data-category-list .help:active,
.data-category-list .help:focus {
color: #000;
background-color: rgba(37, 10, 10, 0.3);
}
.data-category-list .help::before {
content: "\f05a";
font-family: FontAwesome;
margin-right: 0.25rem;
}
.data-category-list .category { .data-category-list .category {
text-align: center; text-align: center;
font-size: 1.5em; font-size: 1.4em;
margin: 1.4em 0 0.5em; margin: 0 0 0.5em;
} }
.data-category-list .description { .data-category-list .description {
text-align: center; text-align: center;
font-size: 1em; font-size: 0.9em;
margin: 0 0 1em; margin: 0;
} }

View File

@ -35,7 +35,7 @@ const Categories = (props) => (
/> />
<Category <Category
title="Age" title="Age"
desc="Age and history" desc="Age & history"
slug="age" slug="age"
help="https://pages.colouring.london/age" help="https://pages.colouring.london/age"
inactive={false} inactive={false}
@ -44,7 +44,7 @@ const Categories = (props) => (
/> />
<Category <Category
title="Size &amp; Shape" title="Size &amp; Shape"
desc="Form and scale" desc="Form & scale"
slug="size" slug="size"
help="https://pages.colouring.london/shapeandsize" help="https://pages.colouring.london/shapeandsize"
inactive={false} inactive={false}
@ -53,22 +53,13 @@ const Categories = (props) => (
/> />
<Category <Category
title="Construction" title="Construction"
desc="Methods and materials" desc="Methods & materials"
slug="construction" slug="construction"
help="https://pages.colouring.london/construction" help="https://pages.colouring.london/construction"
inactive={true} inactive={true}
mode={props.mode} mode={props.mode}
building_id={props.building_id} building_id={props.building_id}
/> />
<Category
title="Team"
desc="Builder and designer"
slug="team"
help="https://pages.colouring.london/team"
inactive={true}
mode={props.mode}
building_id={props.building_id}
/>
<Category <Category
title="Streetscape" title="Streetscape"
desc="Environment" desc="Environment"
@ -78,6 +69,15 @@ const Categories = (props) => (
mode={props.mode} mode={props.mode}
building_id={props.building_id} building_id={props.building_id}
/> />
<Category
title="Team"
desc="Builder & designer"
slug="team"
help="https://pages.colouring.london/team"
inactive={true}
mode={props.mode}
building_id={props.building_id}
/>
<Category <Category
title="Sustainability" title="Sustainability"
desc="Performance" desc="Performance"
@ -136,12 +136,11 @@ const Category = (props) => {
'Coming soon… Click more info for details.' 'Coming soon… Click more info for details.'
: 'View/Edit Map' : 'View/Edit Map'
}> }>
<h3 className="category">{props.title}</h3> <div className="category-title-container">
<p className="description">{props.desc}</p> <h3 className="category">{props.title}</h3>
<p className="description">{props.desc}</p>
</div>
</NavLink> </NavLink>
<a className="icon-button help" href={props.help}>
More
</a>
</li> </li>
); );
} }

View File

@ -8,7 +8,8 @@
z-index: 1000; z-index: 1000;
min-width: 12rem; min-width: 12rem;
max-height: 50%; max-height: 60%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;

View File

@ -74,13 +74,13 @@
.background-construction { .background-construction {
background-color: #aa7fa7; background-color: #aa7fa7;
} }
.background-team { .background-streetscape {
background-color: #6f879c; background-color: #6f879c;
} }
.background-sustainability { .background-team {
background-color: #5ec232; background-color: #5ec232;
} }
.background-streetscape { .background-sustainability {
background-color: #6dbb8b; background-color: #6dbb8b;
} }
.background-community { .background-community {