From 94d158c59e56a459361ff3d4464dc86e6e34d4e9 Mon Sep 17 00:00:00 2001 From: Tom Russell Date: Wed, 14 Aug 2019 12:22:44 +0100 Subject: [PATCH] Pull out categories.css --- app/src/frontend/building/categories.css | 27 +++ app/src/frontend/building/categories.tsx | 246 ++++++++++++----------- app/src/frontend/pages/about.css | 28 --- app/src/frontend/pages/about.tsx | 52 +---- app/src/frontend/styles/forms.css | 14 -- 5 files changed, 157 insertions(+), 210 deletions(-) create mode 100644 app/src/frontend/building/categories.css diff --git a/app/src/frontend/building/categories.css b/app/src/frontend/building/categories.css new file mode 100644 index 00000000..17ce1a25 --- /dev/null +++ b/app/src/frontend/building/categories.css @@ -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; +} diff --git a/app/src/frontend/building/categories.tsx b/app/src/frontend/building/categories.tsx index 70e567f4..645a9262 100644 --- a/app/src/frontend/building/categories.tsx +++ b/app/src/frontend/building/categories.tsx @@ -4,104 +4,120 @@ import PropTypes from 'prop-types'; import Sidebar from './sidebar'; +import './categories.css' + const Categories = (props) => ( - - - - - - - - - - - - + ) @@ -111,32 +127,26 @@ Categories.propTypes = { } const Category = (props) => ( -
-
- -

{props.title}

-
- -
-
+
  • + +

    {props.title}

    +

    {props.desc}

    +
    + + More info + +
  • ) Category.propTypes = { title: PropTypes.string, + desc: PropTypes.string, slug: PropTypes.string, help: PropTypes.string, inactive: PropTypes.bool, diff --git a/app/src/frontend/pages/about.css b/app/src/frontend/pages/about.css index d2e99145..9adfec0a 100644 --- a/app/src/frontend/pages/about.css +++ b/app/src/frontend/pages/about.css @@ -52,31 +52,3 @@ .carousel.active .carousel-content li.current { 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; -} diff --git a/app/src/frontend/pages/about.tsx b/app/src/frontend/pages/about.tsx index 5a4baa9b..1d3f98ea 100644 --- a/app/src/frontend/pages/about.tsx +++ b/app/src/frontend/pages/about.tsx @@ -2,6 +2,7 @@ import React from 'react'; import SupporterLogos from '../components/supporter-logos'; import './about.css'; +import Categories from '../building/categories'; const AboutPage = () => (
    @@ -71,56 +72,7 @@ const AboutPage = () => ( research.

    -
      -
    1. -

      Location

      -

      Where is it?

      -
    2. -
    3. -

      Use

      -

      How is it used?

      -
    4. -
    5. -

      Type

      -

      How was it first used?

      -
    6. -
    7. -

      Age

      -

      When was it built?

      -
    8. -
    9. -

      Size

      -

      How big is it?

      -
    10. -
    11. -

      Construction

      -

      How is it built?

      -
    12. -
    13. -

      Design/Build

      -

      Who built it?

      -
    14. -
    15. -

      Street Front

      -

      How does it relate to the street?

      -
    16. -
    17. -

      Greenery

      -

      Is it near a tree or park?

      -
    18. -
    19. -

      Protection

      -

      Is it designated?

      -
    20. -
    21. -

      Demolitions

      -

      How many rebuilds on the site?

      -
    22. -
    23. -

      Like Me?

      -

      Do you like it?

      -
    24. -
    +
    diff --git a/app/src/frontend/styles/forms.css b/app/src/frontend/styles/forms.css index 96c28fb6..4a8d61a8 100644 --- a/app/src/frontend/styles/forms.css +++ b/app/src/frontend/styles/forms.css @@ -41,17 +41,3 @@ form .btn { margin-right: 0; 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; - } -}