-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #75 from jacobrs/ProfileStyle
Added sidebar component
- Loading branch information
Showing
2 changed files
with
53 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#sidebar{ | ||
background-color: #fff; | ||
color: #555; | ||
text-align: center; | ||
} | ||
|
||
#sidebar ul{ | ||
list-style-type: none; | ||
background-color: #fff; | ||
width: 100%; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
#sidebar ul li a{ | ||
display: block; | ||
color: #a1a1a1; | ||
background-color: #f1f1f1; | ||
padding: 8px 16px; | ||
margin-bottom: 10px; | ||
text-decoration: none; | ||
} | ||
|
||
#sidebar ul li a:hover{ | ||
background-color: #555; | ||
color: #fff; | ||
} | ||
|
||
|
||
#circle-image{ | ||
border-radius: 50%; | ||
width: 120px; | ||
height: 120px; | ||
margin-top: 30px; | ||
} |
25 changes: 18 additions & 7 deletions
25
client/modules/User/components/UserInfoComponent/UserInfoComponent.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,31 @@ | ||
import React, { Component, PropTypes } from 'react'; | ||
|
||
import { Link } from 'react-router'; | ||
// Import Style | ||
// import styles from './UserInfoComponent.css'; | ||
import styles from './UserInfoComponent.css'; | ||
|
||
function UserInfoComponent(props) { | ||
if(Object.keys(props.users).length == 1) // wait props.users not to be null | ||
if (Object.keys(props.users).length === 1){ // wait props.users not to be null | ||
return ( | ||
<div> | ||
<h2>Welcome {props.users.user.firstName} {props.users.user.lastName}</h2> | ||
<h3>Account created {props.users.user.dateAdded}</h3> | ||
<div className="col-md-3" id={styles.sidebar}> | ||
<img className="img-circle" id={styles['circle-image']}src="https://static.independent.co.uk/s3fs-public/thumbnails/image/2015/06/15/09/jon-snow.jpg" /> | ||
<h3>{props.users.user.firstName} {props.users.user.lastName} </h3> | ||
<p>{props.users.user.email} </p> | ||
<ul> | ||
<li><Link>Course 1</Link></li> | ||
<li><Link>Course 2</Link></li> | ||
<li><Link>Course 3</Link></li> | ||
<li><Link>Course 4</Link></li> | ||
<li><Link>Course 5</Link></li> | ||
</ul> | ||
</div> | ||
); | ||
} | ||
return ( | ||
<h1>Loading</h1> | ||
) | ||
); | ||
} | ||
|
||
|
||
export default UserInfoComponent; | ||
|
||
|