Pull out categories.css
This commit is contained in:
parent
1c265b828d
commit
94d158c59e
27
app/src/frontend/building/categories.css
Normal file
27
app/src/frontend/building/categories.css
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
/**
|
||||||
|
* Data categories
|
||||||
|
*/
|
||||||
|
.data-category-list {
|
||||||
|
padding: 0;
|
||||||
|
text-align: center;
|
||||||
|
list-style: none;
|
||||||
|
margin: 0 -0.75em;
|
||||||
|
}
|
||||||
|
.data-category-list li {
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: bottom;
|
||||||
|
width: 9em;
|
||||||
|
height: 9em;
|
||||||
|
margin: 0.375em;
|
||||||
|
padding: 0.1em;
|
||||||
|
}
|
||||||
|
.data-category-list .category {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 1.5em;
|
||||||
|
margin: 1.4em 0 0.5em;
|
||||||
|
}
|
||||||
|
.data-category-list .description {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 1em;
|
||||||
|
margin: 0;
|
||||||
|
}
|
@ -4,10 +4,14 @@ import PropTypes from 'prop-types';
|
|||||||
|
|
||||||
import Sidebar from './sidebar';
|
import Sidebar from './sidebar';
|
||||||
|
|
||||||
|
import './categories.css'
|
||||||
|
|
||||||
const Categories = (props) => (
|
const Categories = (props) => (
|
||||||
<Sidebar>
|
<Sidebar>
|
||||||
|
<nav><ol className="data-category-list">
|
||||||
<Category
|
<Category
|
||||||
title="Location"
|
title="Location"
|
||||||
|
desc="Where's the building?"
|
||||||
slug="location"
|
slug="location"
|
||||||
help="https://pages.colouring.london/location"
|
help="https://pages.colouring.london/location"
|
||||||
inactive={false}
|
inactive={false}
|
||||||
@ -16,6 +20,7 @@ const Categories = (props) => (
|
|||||||
/>
|
/>
|
||||||
<Category
|
<Category
|
||||||
title="Land Use"
|
title="Land Use"
|
||||||
|
desc="What's it used for?"
|
||||||
slug="use"
|
slug="use"
|
||||||
help="https://pages.colouring.london/use"
|
help="https://pages.colouring.london/use"
|
||||||
inactive={true}
|
inactive={true}
|
||||||
@ -24,6 +29,7 @@ const Categories = (props) => (
|
|||||||
/>
|
/>
|
||||||
<Category
|
<Category
|
||||||
title="Type"
|
title="Type"
|
||||||
|
desc="Building type"
|
||||||
slug="type"
|
slug="type"
|
||||||
help="https://pages.colouring.london/buildingtypology"
|
help="https://pages.colouring.london/buildingtypology"
|
||||||
inactive={true}
|
inactive={true}
|
||||||
@ -32,6 +38,7 @@ const Categories = (props) => (
|
|||||||
/>
|
/>
|
||||||
<Category
|
<Category
|
||||||
title="Age"
|
title="Age"
|
||||||
|
desc="Age and history"
|
||||||
slug="age"
|
slug="age"
|
||||||
help="https://pages.colouring.london/age"
|
help="https://pages.colouring.london/age"
|
||||||
inactive={false}
|
inactive={false}
|
||||||
@ -40,6 +47,7 @@ const Categories = (props) => (
|
|||||||
/>
|
/>
|
||||||
<Category
|
<Category
|
||||||
title="Size & Shape"
|
title="Size & Shape"
|
||||||
|
desc="Form and scale"
|
||||||
slug="size"
|
slug="size"
|
||||||
help="https://pages.colouring.london/shapeandsize"
|
help="https://pages.colouring.london/shapeandsize"
|
||||||
inactive={false}
|
inactive={false}
|
||||||
@ -48,6 +56,7 @@ const Categories = (props) => (
|
|||||||
/>
|
/>
|
||||||
<Category
|
<Category
|
||||||
title="Construction"
|
title="Construction"
|
||||||
|
desc="Methods and materials"
|
||||||
slug="construction"
|
slug="construction"
|
||||||
help="https://pages.colouring.london/construction"
|
help="https://pages.colouring.london/construction"
|
||||||
inactive={true}
|
inactive={true}
|
||||||
@ -56,6 +65,7 @@ const Categories = (props) => (
|
|||||||
/>
|
/>
|
||||||
<Category
|
<Category
|
||||||
title="Team"
|
title="Team"
|
||||||
|
desc="Builder and designer"
|
||||||
slug="team"
|
slug="team"
|
||||||
help="https://pages.colouring.london/team"
|
help="https://pages.colouring.london/team"
|
||||||
inactive={true}
|
inactive={true}
|
||||||
@ -64,6 +74,7 @@ const Categories = (props) => (
|
|||||||
/>
|
/>
|
||||||
<Category
|
<Category
|
||||||
title="Sustainability"
|
title="Sustainability"
|
||||||
|
desc="Performance"
|
||||||
slug="sustainability"
|
slug="sustainability"
|
||||||
help="https://pages.colouring.london/sustainability"
|
help="https://pages.colouring.london/sustainability"
|
||||||
inactive={true}
|
inactive={true}
|
||||||
@ -72,6 +83,7 @@ const Categories = (props) => (
|
|||||||
/>
|
/>
|
||||||
<Category
|
<Category
|
||||||
title="Greenery"
|
title="Greenery"
|
||||||
|
desc="Green context"
|
||||||
slug="greenery"
|
slug="greenery"
|
||||||
help="https://pages.colouring.london/greenery"
|
help="https://pages.colouring.london/greenery"
|
||||||
inactive={true}
|
inactive={true}
|
||||||
@ -80,6 +92,7 @@ const Categories = (props) => (
|
|||||||
/>
|
/>
|
||||||
<Category
|
<Category
|
||||||
title="Community"
|
title="Community"
|
||||||
|
desc="Public asset?"
|
||||||
slug="community"
|
slug="community"
|
||||||
help="https://pages.colouring.london/community"
|
help="https://pages.colouring.london/community"
|
||||||
inactive={false}
|
inactive={false}
|
||||||
@ -88,6 +101,7 @@ const Categories = (props) => (
|
|||||||
/>
|
/>
|
||||||
<Category
|
<Category
|
||||||
title="Planning"
|
title="Planning"
|
||||||
|
desc="Special controls?"
|
||||||
slug="planning"
|
slug="planning"
|
||||||
help="https://pages.colouring.london/planning"
|
help="https://pages.colouring.london/planning"
|
||||||
inactive={true}
|
inactive={true}
|
||||||
@ -95,13 +109,15 @@ const Categories = (props) => (
|
|||||||
building_id={props.building_id}
|
building_id={props.building_id}
|
||||||
/>
|
/>
|
||||||
<Category
|
<Category
|
||||||
title="Like Me!"
|
title="Like Me?"
|
||||||
|
desc="Adds to the city?"
|
||||||
slug="like"
|
slug="like"
|
||||||
help="https://pages.colouring.london/likeme"
|
help="https://pages.colouring.london/likeme"
|
||||||
inactive={false}
|
inactive={false}
|
||||||
mode={props.mode}
|
mode={props.mode}
|
||||||
building_id={props.building_id}
|
building_id={props.building_id}
|
||||||
/>
|
/>
|
||||||
|
</ol></nav>
|
||||||
</Sidebar>
|
</Sidebar>
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -111,8 +127,7 @@ Categories.propTypes = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const Category = (props) => (
|
const Category = (props) => (
|
||||||
<section className={(props.inactive? 'inactive ': '') + 'data-section legend'}>
|
<li className={`category-block ${props.slug}`}>
|
||||||
<header className={`section-header ${props.mode} ${props.slug}`}>
|
|
||||||
<NavLink
|
<NavLink
|
||||||
to={`/${props.mode}/${props.slug}/building/${props.building_id}.html`}
|
to={`/${props.mode}/${props.slug}/building/${props.building_id}.html`}
|
||||||
title={
|
title={
|
||||||
@ -120,23 +135,18 @@ const Category = (props) => (
|
|||||||
'Coming soon… Click the ? for more info.'
|
'Coming soon… Click the ? for more info.'
|
||||||
: 'Show on map'
|
: 'Show on map'
|
||||||
}>
|
}>
|
||||||
<h3 className="h3">{props.title}</h3>
|
<h3 className="category">{props.title}</h3>
|
||||||
|
<p className="description">{props.desc}</p>
|
||||||
</NavLink>
|
</NavLink>
|
||||||
<nav className="icon-buttons">
|
|
||||||
{
|
|
||||||
props.help?
|
|
||||||
<a className="icon-button help" href={props.help}>
|
<a className="icon-button help" href={props.help}>
|
||||||
Info
|
More info
|
||||||
</a>
|
</a>
|
||||||
: null
|
</li>
|
||||||
}
|
|
||||||
</nav>
|
|
||||||
</header>
|
|
||||||
</section>
|
|
||||||
)
|
)
|
||||||
|
|
||||||
Category.propTypes = {
|
Category.propTypes = {
|
||||||
title: PropTypes.string,
|
title: PropTypes.string,
|
||||||
|
desc: PropTypes.string,
|
||||||
slug: PropTypes.string,
|
slug: PropTypes.string,
|
||||||
help: PropTypes.string,
|
help: PropTypes.string,
|
||||||
inactive: PropTypes.bool,
|
inactive: PropTypes.bool,
|
||||||
|
@ -52,31 +52,3 @@
|
|||||||
.carousel.active .carousel-content li.current {
|
.carousel.active .carousel-content li.current {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Data categories
|
|
||||||
*/
|
|
||||||
.data-category-list {
|
|
||||||
padding: 0;
|
|
||||||
text-align: center;
|
|
||||||
list-style: none;
|
|
||||||
margin: 0 -0.75em;
|
|
||||||
}
|
|
||||||
.data-category-list li {
|
|
||||||
display: inline-block;
|
|
||||||
vertical-align: bottom;
|
|
||||||
width: 9em;
|
|
||||||
height: 9em;
|
|
||||||
margin: 0.375em;
|
|
||||||
padding: 0.1em;
|
|
||||||
}
|
|
||||||
.data-category-list .category {
|
|
||||||
text-align: center;
|
|
||||||
font-size: 1.5em;
|
|
||||||
margin: 1.4em 0 0.5em;
|
|
||||||
}
|
|
||||||
.data-category-list .description {
|
|
||||||
text-align: center;
|
|
||||||
font-size: 1em;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
@ -2,6 +2,7 @@ import React from 'react';
|
|||||||
|
|
||||||
import SupporterLogos from '../components/supporter-logos';
|
import SupporterLogos from '../components/supporter-logos';
|
||||||
import './about.css';
|
import './about.css';
|
||||||
|
import Categories from '../building/categories';
|
||||||
|
|
||||||
const AboutPage = () => (
|
const AboutPage = () => (
|
||||||
<article>
|
<article>
|
||||||
@ -71,56 +72,7 @@ const AboutPage = () => (
|
|||||||
research.
|
research.
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
<ol className="data-category-list">
|
<Categories building_id={2503371} mode="view" />
|
||||||
<li className="bold-yellow">
|
|
||||||
<h3 className="category">Location</h3>
|
|
||||||
<p className="description">Where is it?</p>
|
|
||||||
</li>
|
|
||||||
<li className="bright-yellow">
|
|
||||||
<h3 className="category">Use</h3>
|
|
||||||
<p className="description">How is it used?</p>
|
|
||||||
</li>
|
|
||||||
<li className="bold-orange">
|
|
||||||
<h3 className="category">Type</h3>
|
|
||||||
<p className="description">How was it first used?</p>
|
|
||||||
</li>
|
|
||||||
<li className="red">
|
|
||||||
<h3 className="category">Age</h3>
|
|
||||||
<p className="description">When was it built?</p>
|
|
||||||
</li>
|
|
||||||
<li className="pastel-pink">
|
|
||||||
<h3 className="category">Size</h3>
|
|
||||||
<p className="description">How big is it?</p>
|
|
||||||
</li>
|
|
||||||
<li className="pastel-purple">
|
|
||||||
<h3 className="category">Construction</h3>
|
|
||||||
<p className="description">How is it built?</p>
|
|
||||||
</li>
|
|
||||||
<li className="blue-grey">
|
|
||||||
<h3 className="category">Design/Build</h3>
|
|
||||||
<p className="description">Who built it?</p>
|
|
||||||
</li>
|
|
||||||
<li className="bright-green">
|
|
||||||
<h3 className="category">Street Front</h3>
|
|
||||||
<p className="description">How does it relate to the street?</p>
|
|
||||||
</li>
|
|
||||||
<li className="pastel-green">
|
|
||||||
<h3 className="category">Greenery</h3>
|
|
||||||
<p className="description">Is it near a tree or park?</p>
|
|
||||||
</li>
|
|
||||||
<li className="bright-blue">
|
|
||||||
<h3 className="category">Protection</h3>
|
|
||||||
<p className="description">Is it designated?</p>
|
|
||||||
</li>
|
|
||||||
<li className="pale-grey">
|
|
||||||
<h3 className="category">Demolitions</h3>
|
|
||||||
<p className="description">How many rebuilds on the site?</p>
|
|
||||||
</li>
|
|
||||||
<li className="pale-brown">
|
|
||||||
<h3 className="category">Like Me?</h3>
|
|
||||||
<p className="description">Do you like it?</p>
|
|
||||||
</li>
|
|
||||||
</ol>
|
|
||||||
</div>
|
</div>
|
||||||
<hr/>
|
<hr/>
|
||||||
<div className="main-col">
|
<div className="main-col">
|
||||||
|
@ -41,17 +41,3 @@ form .btn {
|
|||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
.btn.btn-half {
|
|
||||||
width: 100%;
|
|
||||||
margin-bottom: 0.25rem;
|
|
||||||
}
|
|
||||||
@media (min-width: 768px) {
|
|
||||||
.btn.btn-half {
|
|
||||||
width: 49%;
|
|
||||||
margin-left: 0;
|
|
||||||
margin-right: 2%;
|
|
||||||
}
|
|
||||||
.btn.btn-half:nth-child(2n) {
|
|
||||||
margin-right: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user