Skip to content
This repository was archived by the owner on Jun 28, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
minor style changes
  • Loading branch information
mmahalwy committed Jan 18, 2017
commit 20311a348ac27e337b997aa609fb00660ca7c1cc
23 changes: 1 addition & 22 deletions src/components/GlobalNav/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import Link from 'react-router/lib/Link';
import Navbar from 'react-bootstrap/lib/Navbar';
import Nav from 'react-bootstrap/lib/Nav';

import LocaleFormattedMessage from 'components/LocaleFormattedMessage';
import LocaleSwitcher from 'components/LocaleSwitcher';

import debug from 'helpers/debug';
Expand Down Expand Up @@ -59,27 +58,6 @@ class GlobalNav extends Component {

return rightControls || [
<LocaleSwitcher />,
<li>
<a
href="https://quran.zendesk.com/hc/en-us/articles/210090626-Development-help"
target="_blank"
rel="noopener noreferrer"
data-metrics-event-name="IndexHeader:Link:Developer"
>
<LocaleFormattedMessage
id="nav.developers"
defaultMessage="Developers"
/>
</a>
</li>,
<li>
<a href="https://quran.zendesk.com/hc/en-us" data-metrics-event-name="IndexHeader:Link:Contact">
<LocaleFormattedMessage
id="nav.contactUs"
defaultMessage="Contact Us"
/>
</a>
</li>,
user ?
<li>
<Link to="/profile" data-metrics-event-name="IndexHeader:Link:Profile">
Expand Down Expand Up @@ -111,6 +89,7 @@ class GlobalNav extends Component {
<li>
<Link to="/"><i className="ss-icon ss-home" /></Link>
</li>
<LocaleSwitcher className="visible-xs-inline-block" />
{
leftControls &&
leftControls.map(((control, index) => React.cloneElement(control, { key: index })))
Expand Down
19 changes: 18 additions & 1 deletion src/components/GlobalSidebar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ class GlobalSidebar extends Component {
>
<Navbar static fluid>
<NavbarHeader>
<p className="navbar-text">
<p // eslint-disable-line
className="navbar-text"
onClick={() => handleOpen(false)}
>
<LocaleFormattedMessage id="setting.title" defaultMessage="Quran" />
</p>
</NavbarHeader>
Expand Down Expand Up @@ -93,6 +96,20 @@ class GlobalSidebar extends Component {
/>
</Link>
</li>
<li>
<a
href="https://quran.zendesk.com/hc/en-us/articles/210090626-Development-help"
target="_blank"
rel="noopener noreferrer"
data-metrics-event-name="IndexHeader:Link:Developer"
>
<i className="ss-icon ss-laptop vertical-align-middle" />{' '}
<LocaleFormattedMessage
id="nav.developers"
defaultMessage="Developers"
/>
</a>
</li>
<li>
<a href="http://legacy.quran.com" data-metrics-event-name="Sidebar:Link:Legacy">
<i className="ss-icon ss-alert vertical-align-middle" />{' '}
Expand Down
9 changes: 8 additions & 1 deletion src/components/LocaleSwitcher/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
/* global window */
import React, { Component } from 'react';
import React, { PropTypes, Component } from 'react';
import cookie from 'react-cookie';
import NavDropdown from 'react-bootstrap/lib/NavDropdown';
import MenuItem from 'react-bootstrap/lib/MenuItem';
import { locales, defaultLocale } from '../../config';

export default class LocaleSwitcher extends Component {
static propTypes = {
className: PropTypes.string
};

state = {
currentLocale: defaultLocale,
};
Expand Down Expand Up @@ -48,10 +52,13 @@ export default class LocaleSwitcher extends Component {
}

render() {
const { className } = this.props;

return (
<NavDropdown
active={false}
id="site-language-dropdown"
className={className}
title={locales[this.state.currentLocale]}
>
{this.renderList()}
Expand Down
19 changes: 4 additions & 15 deletions src/styles/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,6 @@ a:hover{
text-decoration: none;
}

.surah-body{
.left-side{
width: 16.6666666%;
height: 100vh;
float: left;
display: block;
position: fixed;
top: 0px;

@media (max-width: $screen-sm-max) {
display: none;
}
}
}

.form-control:focus{
box-shadow: none;
-webkit-box-shadow: none;
Expand Down Expand Up @@ -188,6 +173,10 @@ li em{

// NOTE: This is for dropdown in navbar on mobile
@media(max-width: $screen-sm){
.navbar-nav{
margin-bottom: 0px;
margin-top: 5px;
}
.navbar-nav .open .dropdown-menu{
position: absolute;;
float: left;
Expand Down