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
Show all changes
52 commits
Select commit Hold shift + click to select a range
37b5b6f
HOTFIX reading mode markers (#303)
mmahalwy May 22, 2016
bc50cd3
Default api and files (#306)
mmahalwy May 22, 2016
30d2930
Reducing bundle size (#310)
mmahalwy May 24, 2016
2dcbd22
add default segments key (#313)
May 25, 2016
b6d7c7d
transitioning to al-quran al-kareem (#314)
May 25, 2016
7c6f7f5
Fix lint issues
azizur May 7, 2016
15350a8
Update Readme.md
azizur May 7, 2016
1a1ca97
Add devDependency Status
azizur May 7, 2016
5eb61c1
Merge pull request #317 from azizur/fix-lint-issues
ahmedre May 26, 2016
edc4b42
Update Readme for new developers
azizur May 26, 2016
07baa6f
Merge pull request #318 from azizur/update-readme
ahmedre May 26, 2016
2acaf1e
Code splitting assets (#321)
mmahalwy May 27, 2016
394403e
Autocomplete pointing to v2 suggest
mmahalwy May 27, 2016
c8f9299
Merge pull request #322 from quran/fix-auto-complete
ahmedre May 27, 2016
c0c840a
HOTFIX pretty-error dep (#323)
mmahalwy May 27, 2016
e59c56b
HOTFIX Search to the right route (#324)
mmahalwy May 27, 2016
8a6918a
No segments for non-segmented reciters (#325)
mmahalwy May 27, 2016
c233869
Adding sentry (#327)
mmahalwy Jun 1, 2016
9e4aab7
CDN images for surahinfo (#328)
mmahalwy Jun 2, 2016
884f1c5
Reduce data dehydration (#329)
mmahalwy Jun 2, 2016
9a11515
Search Action on homepage (#330)
mmahalwy Jun 2, 2016
78d0bcb
Descriptions for surahs (#331)
mmahalwy Jun 2, 2016
fa2b52f
Fixed head tags (#332)
mmahalwy Jun 3, 2016
936937b
audioplayer bug fixes, or more bugs (#335)
mmahalwy Jun 12, 2016
73f233b
Add sourcemaps to prod
mmahalwy Jun 12, 2016
6a5e9b5
Remove zero padding in urls
mmahalwy Jun 13, 2016
70fbbfd
(WIP) Issue #248 (#336)
abiodun0 Jun 15, 2016
2f493f2
correct waffle url. (#338)
thabti Jun 16, 2016
0f214b0
JS error on surah click (#349)
mahboob-awan Jun 25, 2016
e6d2a8e
Add Heroku generated app.json
mmahalwy Jun 25, 2016
4d0a9be
Ramadan Todo list (#343)
mmahalwy Jun 25, 2016
8b092af
Sourcemap for sentry (#352)
mmahalwy Jun 25, 2016
bd3e55c
contribution guideline (#355)
mahboob-awan Jun 25, 2016
540950f
Heroku pipeline trials (#354)
mmahalwy Jun 25, 2016
4a61d26
Heroku push (#356)
mmahalwy Jun 25, 2016
d23a3ac
Add zendesk widget (#358)
mmahalwy Jun 25, 2016
687f0f0
Fix font artifacts
ahmedre Jul 2, 2016
b0337c4
Merge pull request #366 from quran/fontfix
ahmedre Jul 2, 2016
186867e
Update font for page 237 to fix spacing in 12:17
ahmedre Jul 2, 2016
cf6bbc6
Merge pull request #370 from quran/fix237
ahmedre Jul 2, 2016
1e10b98
Feature/341 social share (#367)
thabti Jul 3, 2016
eed2ce3
Simplify audioplayer (#360)
mmahalwy Jul 3, 2016
1a21634
Fix sentry bug (#373)
mmahalwy Jul 3, 2016
50f210d
#372 colon separated surah/ayah (#374)
thabti Jul 3, 2016
948b91b
Re-output fonts with Apple option enabled
ahmedre Jul 4, 2016
d5c5293
Merge pull request #375 from quran/applefonts
ahmedre Jul 4, 2016
2706cf7
Tooltip options for translation and transliteration (#376)
mmahalwy Jul 4, 2016
b23a80c
Reading mode single line (#377)
mmahalwy Jul 4, 2016
30a7015
- ayah's have link (discuss, maybe not needed) (#379)
thabti Jul 6, 2016
74004e3
Added Mixpanel (#384)
mmahalwy Jul 9, 2016
85c0739
Remove footer links (#385)
mmahalwy Jul 9, 2016
fb35d4f
Fix json-ld (#386)
mmahalwy Jul 9, 2016
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
Reducing bundle size (#310)
* Reducing bundle size

* rearranged files

* more rearrange and deleted unneeded files
  • Loading branch information
mmahalwy committed May 24, 2016
commit 30d2930e103b5b836d9add95ffb575da9be4b80a
31 changes: 21 additions & 10 deletions client.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
/*global document, window, $ */
require('babel-polyfill');
import 'babel-polyfill';

import React from 'react';
import ReactDOM from 'react-dom';
import reactCookie from 'react-cookie';
import { Provider } from 'react-redux';
import { Router, browserHistory } from 'react-router';
import useScroll from 'scroll-behavior/lib/useStandardScroll';
import { ReduxAsyncConnect } from 'redux-async-connect';
import Provider from 'react-redux/lib/components/Provider';
import Router from 'react-router/lib/Router';
import browserHistory from 'react-router/lib/browserHistory';
import applyRouterMiddleware from 'react-router/lib/applyRouterMiddleware';
import useScroll from 'react-router-scroll';
import { ReduxAsyncConnect } from 'redux-connect';
import { syncHistoryWithStore } from 'react-router-redux';

import debug from 'debug';

Expand All @@ -16,8 +19,8 @@ import createStore from './src/redux/create';
import routes from './src/routes';

const client = new ApiClient();
const history = useScroll(() => browserHistory)();
const store = createStore(history, client, window.__data);
const store = createStore(browserHistory, client, window.__data);
const history = syncHistoryWithStore(browserHistory, store);

window.quranDebug = debug;
window.ReactDOM = ReactDOM; // For chrome dev tool support
Expand All @@ -40,9 +43,17 @@ if (typeof window !== 'undefined') {
}

const component = (
<Router render={(props) =>
<ReduxAsyncConnect {...props} helpers={{client}} />
} history={history}>
<Router
history={history}
render={(props) => (
<ReduxAsyncConnect
{...props}
helpers={{client}}
filter={item => !item.deferred}
render={applyRouterMiddleware(useScroll())}
/>
)}
>
{routes()}
</Router>
);
Expand Down
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"babel-plugin-typecheck": "^3.8.0",
"babel-polyfill": "^6.7.4",
"babel-preset-es2015": "^6.6.0",
"babel-preset-stage-0": "^6.5.0",
"babel-preset-react": "^6.5.0",
"babel-preset-stage-0": "^6.5.0",
"babel-register": "^6.7.2",
"babel-runtime": "^6.6.1",
"body-parser": "^1.14.1",
Expand Down Expand Up @@ -63,6 +63,7 @@
"humps": "^1.0.0",
"imports-loader": "^0.6.3",
"jquery": "^2.1.4",
"js-yaml": "~3.6.0",
"json-loader": "~0.5.1",
"loopstacks": "0.0.3",
"moment": "^2.12.0",
Expand All @@ -82,26 +83,26 @@
"react-metrics": "^1.1.0",
"react-paginate": "^0.4.0",
"react-redux": "^4.4.1",
"react-router": "^2.0.1",
"react-router": "^2.4.1",
"react-router-bootstrap": "^0.20.1",
"react-router-redux": "^4.0.0",
"react-router-scroll": "^0.2.0",
"react-scroll": "^1.0.4",
"redux": "^3.3.1",
"redux-async-connect": "^1.0.0-rc4",
"redux-connect": "^2.4.0",
"sass-loader": "2.0.1",
"scroll-behavior": "^0.3.3",
"serialize-javascript": "^1.0.0",
"serve-favicon": "^2.2.1",
"sitemap": "^1.5.0",
"sjcl": "~1.0.3",
"style-loader": "^0.13.1",
"superagent": "^1.2.0",
"url": "^0.11.0",
"url-loader": "~0.5.5",
"webpack": "^1.10.3",
"webpack-isomorphic-tools": "^2.2.41",
"winston": "^1.1.2",
"sjcl": "~1.0.3",
"js-yaml": "~3.6.0"
"winston": "^1.1.2"
},
"devDependencies": {
"babel-core": "^6.7.7",
Expand Down
7 changes: 2 additions & 5 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ expressConfig(server);
import React from 'react';
import ReactDOM from 'react-dom/server';
import { match } from 'react-router';
import { ReduxAsyncConnect, loadOnServer } from 'redux-async-connect';
import { ReduxAsyncConnect, loadOnServer } from 'redux-connect';
import createHistory from 'react-router/lib/createMemoryHistory';
import { Provider } from 'react-redux';
import cookie from 'react-cookie';
Expand All @@ -18,10 +18,7 @@ import routes from './src/routes';
import ApiClient from './src/helpers/ApiClient';
import createStore from './src/redux/create';

import NotFound from 'components/NotFound';
import Errored from 'components/Error';
import ErroredMessage from 'components/ErrorMessage';
import Html from 'components/Html';
import Html from './src/helpers/Html';

import { setUserAgent } from './src/redux/modules/audioplayer';
import { setOption } from './src/redux/modules/options';
Expand Down
2 changes: 1 addition & 1 deletion src/components/Audioplayer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import Segments from './Segments';

// Helpers
import debug from '../../helpers/debug';
import scroller from '../../scripts/utils/scroller';
import scroller from '../../utils/scroller';

const style = require('./style.scss');

Expand Down
2 changes: 1 addition & 1 deletion src/components/Ayah/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable consistent-return */
import React, { Component, PropTypes } from 'react';
import { Link } from 'react-router';
import Link from 'react-router/lib/Link';
import { Element } from 'react-scroll';
import ReactDOM from 'react-dom'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Link } from 'react-router';
import Link from 'react-router/lib/Link';

class IndexHeaderNav extends React.Component {
constructor() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
import React from 'react';
import SearchInput from 'components/header/SearchInput';
import IndexHeaderNav from 'components/header/IndexHeaderNav';
import { Link } from 'react-router';
import debug from 'utils/Debug';
import React, { Component, PropTypes } from 'react';
import Link from 'react-router/lib/Link';

const logo = require('../../../../static/images/logo-lg-w.png');
import SearchInput from '../SearchInput';
import IndexHeaderNav from './Nav';

import debug from '../../helpers/debug';

const logo = require('../../../static/images/logo-lg-w.png');

export default class IndexHeader extends Component {
static propTypes = {
noSearch: PropTypes.bool
};

class IndexHeader extends React.Component {
renderSearch() {
if (this.props.noSearch) {
return null;
Expand Down Expand Up @@ -38,7 +44,3 @@ class IndexHeader extends React.Component {
);
}
}

IndexHeader.displayName = 'IndexHeader';

export default IndexHeader;
2 changes: 1 addition & 1 deletion src/components/Line/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import debug from 'utils/Debug';
import debug from '../../helpers/debug';

const styles = require('../Ayah/style.scss');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import React from 'react';
const loading = require('../../../static/images/loading.gif');

const Loader = () => (
<div className="loading" ng-hide="currentSurah.ayahs">
<div className="loading" nghide="currentSurah.ayahs">
<div className="row">
<div className="col-md-6 col-md-offset-3 text-center">
<div className="colmd6 colmdoffset3 textcenter">
<img src={loading} />
<h3>Loading...</h3>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { Component, PropTypes } from 'react';

import SwitchToggle from '../../../components/SwitchToggle';
import SwitchToggle from '../SwitchToggle';

const ReadingModeToggle = ({ onReadingModeToggle, isToggled }) => (
<div>
Expand All @@ -9,4 +9,9 @@ const ReadingModeToggle = ({ onReadingModeToggle, isToggled }) => (
</div>
);

ReadingModeToggle.propTypes = {
onReadingModeToggle: PropTypes.func.isRequired,
isToggled: PropTypes.bool.isRequired
}

export default ReadingModeToggle;
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import React from 'react';
import { PropTypes } from "react-metrics";
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { PropTypes } from 'react-metrics';
import { push } from 'react-router-redux';
import { connect } from 'react-redux';
import classNames from 'classnames';

import SearchAutocomplete from '../../../components/SearchAutocomplete';
import SearchAutocomplete from '../SearchAutocomplete';

import debug from 'utils/Debug';
import debug from '../../helpers/debug';

@connect(null, { push })
export default class SearchInput extends React.Component {
export default class SearchInput extends Component {
static contextTypes = {
metrics: PropTypes.metrics
};
Expand Down
10 changes: 4 additions & 6 deletions src/scripts/routes/About.js → src/containers/About/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from 'react';
import IndexHeader from 'components/header/IndexHeader';
import { Link } from 'react-router';
import React, { Component } from 'react';
import IndexHeader from '../../components/IndexHeader';
import Link from 'react-router/lib/Link';
import Helmet from 'react-helmet';

class About extends React.Component {
export default class About extends Component {
render() {
return (
<div>
Expand Down Expand Up @@ -82,5 +82,3 @@ class About extends React.Component {
);
}
}

export default About;
4 changes: 2 additions & 2 deletions src/containers/App/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { Component, PropTypes } from 'react';
import { metrics } from 'react-metrics';
import { connect } from 'react-redux';
import { Link } from 'react-router';
import Link from 'react-router/lib/Link';
import Helmet from 'react-helmet';

import Grid from 'react-bootstrap/lib/Grid';
Expand All @@ -10,7 +10,7 @@ import Col from 'react-bootstrap/lib/Col';

import FontStyles from '../../components/FontStyles';

import debug from 'utils/Debug';
import debug from '../../helpers/debug';
import config from '../../config';
import metricsConfig from '../../helpers/metrics';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from 'react';
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import superagent from 'superagent';

import IndexHeader from 'components/header/IndexHeader';
import IndexHeader from '../../components/IndexHeader';

export default class Contact extends React.Component {
export default class Contact extends Component {
state = {
success: false
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import IndexHeader from 'components/header/IndexHeader';
import React, { Component } from 'react';
import IndexHeader from '../../components/IndexHeader';

class Donations extends React.Component {
export default class Donations extends Component {
render() {
return (
<div className="top-section">
Expand Down Expand Up @@ -52,5 +52,3 @@ class Donations extends React.Component {
);
}
}

export default Donations;
8 changes: 4 additions & 4 deletions src/containers/Home/index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React from 'react';
import Helmet from 'react-helmet';
import IndexHeader from 'components/header/IndexHeader';
import { Link } from 'react-router';
import IndexHeader from '../../components/IndexHeader';
import Link from 'react-router/lib/Link';
import { LinkContainer } from 'react-router-bootstrap';
import { asyncConnect } from 'redux-async-connect'
import { asyncConnect } from 'redux-connect'
import { connect } from 'react-redux';
import moment from 'moment';

import debug from 'utils/Debug';
import debug from '../../helpers/debug';

import { isAllLoaded, loadAll } from '../../redux/modules/surahs';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from 'react';
import SearchInput from 'components/header/SearchInput';
import { Link } from 'react-router';
import React, { Component } from 'react';
import SearchInput from '../../../components/SearchInput';
import Link from 'react-router/lib/Link';

const logo = require('../../../../static/images/logo-lg-w.png');

class SearchHeader extends React.Component {
class Header extends Component {
render() {
return (
<div className="index-header">
Expand All @@ -24,4 +24,4 @@ class SearchHeader extends React.Component {
}
}

export default SearchHeader;
export default Header;
10 changes: 5 additions & 5 deletions src/containers/Search/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { Component, PropTypes } from 'react';
import { PropTypes as MetricsPropTypes } from "react-metrics";
import { asyncConnect } from 'redux-async-connect';
import { asyncConnect } from 'redux-connect';
import { connect } from 'react-redux';
import { Link } from 'react-router';
import Link from 'react-router/lib/Link';
import { push } from 'react-router-redux';
import Helmet from 'react-helmet';
import ReactPaginate from 'react-paginate';
Expand All @@ -12,9 +12,9 @@ import Grid from 'react-bootstrap/lib/Grid';
import Row from 'react-bootstrap/lib/Row';
import Col from 'react-bootstrap/lib/Col';

import SearchHeader from 'components/header/SearchHeader';
import Header from './Header';
import Ayah from '../../components/Ayah';
import CoreLoader from '../../scripts/components/Loader';
import CoreLoader from '../../components/Loader';

import { search } from '../../redux/modules/searchResults';

Expand Down Expand Up @@ -148,7 +148,7 @@ class Search extends Component {
__html: `.text-arabic{font-size: ${options.fontSize.arabic}rem;} .text-translation{font-size: ${options.fontSize.translation}rem;}`
}}
/>
<SearchHeader />
<Header />
{this.renderStatsBar()}
<div className="container surah-list">
<div className="row">
Expand Down
Loading