From 4a3e5e230f750b8e47c524c717c3234d5a4f5ffa Mon Sep 17 00:00:00 2001 From: Conrad S Date: Thu, 16 Feb 2017 14:02:57 -0500 Subject: [PATCH 1/2] Implement side bar styling --- src/components/SideBarDetail/index.js | 106 +++++++++++++++++++++----- src/containers/Building/index.js | 6 +- 2 files changed, 90 insertions(+), 22 deletions(-) diff --git a/src/components/SideBarDetail/index.js b/src/components/SideBarDetail/index.js index b3c1706c..0876f3aa 100644 --- a/src/components/SideBarDetail/index.js +++ b/src/components/SideBarDetail/index.js @@ -1,31 +1,101 @@ import React, { PropTypes } from 'react'; -import { Link } from 'react-router'; +import { Link, browserHistory } from 'react-router'; import './styles.css'; import buildingDetailPropType from '../../containers/Building/propTypes'; +const isActive = (url) => { + if (url === browserHistory.getCurrentLocation().pathname) { + return 'active'; + } + return ''; +}; + +/* eslint-disable */ export default function SideBarDetail({ building, children }) { const rootURL = `/buildings/${building.building_id}`; return ( -
-
-
- {building.address} -
-

{building.zipcode}

-
    -
  • BBL: {building.bbl}
  • -
  • Building ID: {building.building_id}
  • -
  • Lot ID: {building.lot_id}
  • -
  • Borough: {building.borough}
  • +
    +
    + {`${building.address}, + ${building.borough}, + ${building.zipcode}`} +
    +

    + Detail for  •  later +

    +
    +
    + + + + + + + + + + + + + + + +
    BBL{building.bbl}
    Building ID{building.building_id}
    Lot ID{building.lot_id}
    +
    +
    + + +
    +
    Steve Jobs
    + steve@apple.com +
    (123) 456-7890
    +
    + +
    +
      +
    • + + + + + + + + + + + Overview + +
    • +
    • + + + + + + + + + + + Dimensions + +
    • +
    • + + + + + + + + Utilities + +
    + { children } -
    - Overview -
    - Dimensions -
    - Utilities
    ); } diff --git a/src/containers/Building/index.js b/src/containers/Building/index.js index 63b5d823..976fcf5b 100644 --- a/src/containers/Building/index.js +++ b/src/containers/Building/index.js @@ -31,10 +31,8 @@ class Building extends Component { } return ( -
    -
    - -
    +
    +
    Date: Thu, 16 Feb 2017 15:54:40 -0500 Subject: [PATCH 2/2] Remove section that has no information currently (building age, size,etc.) --- src/components/SideBarDetail/index.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/components/SideBarDetail/index.js b/src/components/SideBarDetail/index.js index 0876f3aa..bbe99903 100644 --- a/src/components/SideBarDetail/index.js +++ b/src/components/SideBarDetail/index.js @@ -20,9 +20,6 @@ export default function SideBarDetail({ building, children }) { ${building.borough}, ${building.zipcode}`} -

    - Detail for  •  later -

    @@ -55,6 +52,7 @@ export default function SideBarDetail({ building, children }) {
    • + {/* All of this SVGs will need to replaced with InlineSVG, an external library. Then we can link to files */} -- GitLab