Skip to content

Commit

Permalink
Styling side bar #77
Browse files Browse the repository at this point in the history
  • Loading branch information
HennecartLisa committed Jul 24, 2018
1 parent 6740dbd commit b405e56
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/components/Map.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default class OpenStreetMap extends Component {

render() {
return (
<Map className={"col m6 l9 hide-on-small-only"} center={[this.state.lat, this.state.lng]} zoom={this.state.zoom}>
<Map className={"col m6 l8 hide-on-small-only"} center={[this.state.lat, this.state.lng]} zoom={this.state.zoom}>
<TileLayer
attribution="&amp;copy <a href=&quot;http://osm.org/copyright&quot;>OpenStreetMap</a> contributors"
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
Expand Down
17 changes: 8 additions & 9 deletions src/components/Sidebar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,18 @@ export default class Sidebar extends React.Component {

render() {
let searchTitle = (this.BuildingStore.getSearchKey === "")
? "Results (" + this.BuildingStore.getFilteredBuildings.length + ")"
? this.BuildingStore.getFilteredBuildings.length + " results "
: "Results for '" + this.BuildingStore.getSearchKey + "' (" + this.renderLists().length + ")";
return (

<Col l={3} m={6} s={12}>
<div className="sidebar">

<Col l={4} m={6} s={12}>
<div className="sidebar">
{this.show()}
</div>
<div className="result">
<h4 className="result__text">{searchTitle}</h4>
</div>
</Col>
</div>
<div className="result">
<h4 className="result__text">{searchTitle}</h4>
</div>
</Col>

)
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/SidebarSearchResult.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ export default class SidebarSearchResult extends React.Component {

<h4 className="building__name">{this.Building.title}</h4>
</Col>
<img className="col m3 s12 sidebar__searchresult__thumbnail" src={this.Building.src}/>


<Col m={9} s={12}>
<span className="sidebar__searchresult__description"><p>{this.Building.description}</p></span>
</Col>

<img className="col m3 s12 sidebar__searchresult__thumbnail" src={this.Building.src}/>
<Col m={9} s={12}>
{/* {this.showAccessibilityInformation()} */}
</Col>
Expand Down
12 changes: 9 additions & 3 deletions src/css/Sidebar.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
@import url('https://fonts.googleapis.com/css?family=Montserrat');
@import url('https://fonts.googleapis.com/css?family=Open+Sans');


.row.application__content > .col:first-of-type{
height: 100%;
}

div.sidebar {
height: 100%;
margin: 0;
float: left;
background-color: #fff;
overflow: scroll;
overflow: auto;
}

div.sidebar__card {
Expand All @@ -17,9 +22,9 @@ div.sidebar__card {
.result{
position: absolute;
bottom: 0;
height:5%;
left:0;
width:100%;
background:$colorAlmostWhite;
border-top: 1px solid rgba(164, 164, 164, 0.21);;
clear:both;
padding: 0;

Expand All @@ -28,5 +33,6 @@ div.sidebar__card {
.result__text {
font-size: 10px;
font-family: 'Open Sans', sans-serif;
margin-left: 10px;

}
12 changes: 12 additions & 0 deletions src/css/SidebarBuildingDetail.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
@import url('https://fonts.googleapis.com/css?family=Montserrat');
@import url('https://fonts.googleapis.com/css?family=Open+Sans');

.search__filters__filter__caption{
font-family: 'Montserrat', sans-serif;

}

h4{
font-family: 'Montserrat', sans-serif;

}
4 changes: 4 additions & 0 deletions src/css/SidebarSearchResult.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,8 @@

hr {
border-color: rgba(164, 164, 164, 0.21);
}

.sidebar__searchresult__thumbnail{
float: right;
}

0 comments on commit b405e56

Please sign in to comment.