This repository has been archived by the owner on Jun 28, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 362
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
294 additions
and
79 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
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
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
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
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,76 @@ | ||
import React, { PropTypes } from 'react'; | ||
import LinkContainer from 'react-router-bootstrap/lib/LinkContainer'; | ||
import Navbar from 'react-bootstrap/lib/Navbar'; | ||
import Nav from 'react-bootstrap/lib/Nav'; | ||
import NavDropdown from 'react-bootstrap/lib/NavDropdown'; | ||
import MenuItem from 'react-bootstrap/lib/MenuItem'; | ||
import NavItem from 'react-bootstrap/lib/NavItem'; | ||
import Image from 'react-bootstrap/lib/Image'; | ||
const Header = Navbar.Header; | ||
const Collapse = Navbar.Collapse; | ||
const Toggle = Navbar.Toggle; | ||
import { connect } from 'react-redux'; | ||
|
||
const styles = require('./style.scss'); | ||
|
||
export const QuranNav = ({ user }) => ( | ||
<Navbar inverse fluid className={styles.nav}> | ||
<Header> | ||
<Toggle /> | ||
</Header> | ||
<Collapse> | ||
<Nav /> | ||
<Nav pullRight> | ||
<LinkContainer to="/apps" data-metrics-event-name="IndexHeader:Link:Mobile"> | ||
<NavItem> | ||
Mobile | ||
</NavItem> | ||
</LinkContainer> | ||
<NavItem href="https://quran.zendesk.com/hc/en-us/articles/210090626-Development-help" target="_blank" data-metrics-event-name="IndexHeader:Link:Developer"> | ||
Developers | ||
</NavItem> | ||
<NavItem href="http://legacy.quran.com" data-metrics-event-name="IndexHeader:Link:Legacy"> | ||
Legacy Quran.com | ||
</NavItem> | ||
<LinkContainer to="/donations" data-metrics-event-name="IndexHeader:Link:Contribute"> | ||
<NavItem> | ||
Contribute | ||
</NavItem> | ||
</LinkContainer> | ||
<NavItem href="https://quran.zendesk.com/hc/en-us" data-metrics-event-name="IndexHeader:Link:Contact"> | ||
Contact us | ||
</NavItem> | ||
{ | ||
user && | ||
<NavDropdown | ||
title={ | ||
<span className={styles.name}> | ||
<Image src={user.image} className={styles.image} circle /> | ||
{user.firstName} | ||
</span> | ||
} | ||
id="user-dropdown" | ||
> | ||
<LinkContainer | ||
to="/profile" | ||
data-metrics-event-name="IndexHeader:Link:Profile" | ||
> | ||
<MenuItem eventKey={3.1}>Profile</MenuItem> | ||
</LinkContainer> | ||
<MenuItem eventKey={3.3}>Logout</MenuItem> | ||
</NavDropdown> | ||
} | ||
</Nav> | ||
</Collapse> | ||
</Navbar> | ||
); | ||
|
||
QuranNav.propTypes = { | ||
user: PropTypes.object | ||
}; | ||
|
||
export default connect( | ||
state => ({ | ||
user: state.auth.user | ||
}) | ||
)(QuranNav); |
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,27 @@ | ||
$navbar-height: 40px; | ||
.nav { | ||
min-height: $navbar-height; | ||
border-radius: 0px; | ||
margin-bottom: 0px; | ||
|
||
:global(.navbar-nav > li > a) { | ||
padding-top: ($navbar-height - 20) / 2; | ||
padding-bottom: ($navbar-height - 20) / 2; | ||
} | ||
|
||
&.transparent{ | ||
background: transparent; | ||
} | ||
} | ||
|
||
.name{ | ||
padding-left: 25px; | ||
} | ||
|
||
.image{ | ||
width: 30px; | ||
position: absolute; | ||
left: 5px; | ||
top: 50%; | ||
transform: translateY(-50%); | ||
} |
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,45 @@ | ||
import React, { Component, PropTypes } from 'react'; | ||
import Helmet from 'react-helmet'; | ||
import { connect } from 'react-redux'; | ||
import Grid from 'react-bootstrap/lib/Grid'; | ||
import Row from 'react-bootstrap/lib/Row'; | ||
import Col from 'react-bootstrap/lib/Col'; | ||
import Image from 'react-bootstrap/lib/Image'; | ||
|
||
import QuranNav from 'components/QuranNav'; | ||
|
||
const styles = require('./style.scss'); | ||
|
||
@connect( | ||
state => ({ | ||
user: state.auth.user | ||
}) | ||
) | ||
export default class Profile extends Component { | ||
static propTypes = { | ||
user: PropTypes.object | ||
}; | ||
|
||
something() {} | ||
render() { | ||
const { user } = this.props; | ||
|
||
return ( | ||
<div> | ||
<Helmet title="The Noble Quran - القرآن الكريم" titleTemplate="%s" /> | ||
<QuranNav /> | ||
<div className={styles.header} /> | ||
<Grid> | ||
<Row> | ||
<Col md={12} className="text-center"> | ||
<Image src={`${user.image}?type=large`} circle className={styles.image} /> | ||
<h2> | ||
{user.name} | ||
</h2> | ||
</Col> | ||
</Row> | ||
</Grid> | ||
</div> | ||
); | ||
} | ||
} |
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,13 @@ | ||
@import '../../styles/variables.scss'; | ||
|
||
.header{ | ||
background: $brand-primary; | ||
height: 7rem; | ||
padding-top: 15px; | ||
} | ||
|
||
.image{ | ||
margin: -70px auto 40px; | ||
display: block; | ||
height: 10rem; | ||
} |
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
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
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
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
Oops, something went wrong.