Skip to content
This repository has been archived by the owner on Jun 28, 2021. It is now read-only.

Commit

Permalink
added footer for pdf #780
Browse files Browse the repository at this point in the history
  • Loading branch information
naveed-ahmad committed May 17, 2017
1 parent ce86706 commit 218447b
Show file tree
Hide file tree
Showing 10 changed files with 54 additions and 14 deletions.
37 changes: 37 additions & 0 deletions src/components/PdfFooter/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import React from 'react';

import LocaleFormattedMessage from 'components/LocaleFormattedMessage';

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

const PdfFooter = () => (
<footer className={styles.footer}>
<div className="container">
<div className="row">
<div className="col-md-12 text-center">
<p>
<LocaleFormattedMessage
id="export.promotion"
defaultMessage="This PDF is exported from Quran.com"
/>
</p>

<p className="monserrat">
<LocaleFormattedMessage
id="nav.aboutQuranProject"
defaultMessage="QURAN.COM (ALSO KNOWN AS THE NOBLE QURAN, AL QURAN, HOLY QURAN, KORAN) IS A PRO BONO PROJECT."
/>
<LocaleFormattedMessage
id="nav.rightsReserved"
defaultMessage="All Rights Reserved"
/>.
{' '}
© 2016 Quran.com.
</p>
</div>
</div>
</div>
</footer>
);

export default PdfFooter;
Empty file.
4 changes: 3 additions & 1 deletion src/containers/App/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ class App extends Component {
const {
main,
nav,
footer,
children,
media,
footNote,
Expand Down Expand Up @@ -98,7 +99,7 @@ class App extends Component {
/>}
{children || main}
<SmartBanner title="The Noble Quran - القرآن الكريم" button="Install" />
<Footer />
{React.cloneElement(footer || <Footer />)}
{__CLIENT__ &&
<Modal
bsSize="large"
Expand Down Expand Up @@ -152,6 +153,7 @@ App.propTypes = {
children: PropTypes.element,
main: PropTypes.element,
nav: PropTypes.element,
footer: PropTypes.element,
sidebar: PropTypes.element,
footNote: customPropTypes.footNoteType,
loadingFootNote: PropTypes.bool
Expand Down
4 changes: 2 additions & 2 deletions src/locale/ar.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export default {
'ayah.media.lectureFrom': 'مشاهدة محاضرة {from}',
'ayah.bookmarked': 'إشارة مرجعية',
'ayah.bookmark': 'المرجعية',
'ayah.notFound': 'لم يتم العثور على الآية',

'search.placeholder': 'بحث',
'search.resultHeading': '{from}-{to} OF <span> {total} </span> SEARCH RESULTS FOR: <span>{query}</span>', // eslint-disable-line max-len
Expand Down Expand Up @@ -76,9 +77,8 @@ export default {
'nav.mobile': 'التليفون المحمول',
'nav.navigate': 'انتقل',
'nav.legacySite': 'الموقع القديم',
'export.promotion': 'Quran.com يتم تصدير هذا بدف من',

'login.message': 'تسجيل الدخول إلى Quran.com لتخزين كل ما تبذلونه من العناوين والملاحظات والأنشطة.',

'ayah.notFound': 'لم يتم العثور على الآية'
}
};
1 change: 1 addition & 0 deletions src/locale/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export default {
'nav.mobile': 'Mobile Apps',
'nav.navigate': 'Navigate',
'nav.legacySite': 'Legacy Quran.com',
'export.promotion': 'This PDF is exported from Quran.com',

'login.message': 'Sign in to Quran.com to store all your bookmarks, notes, and activities.'
}
Expand Down
1 change: 1 addition & 0 deletions src/locale/fr.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export default {
'nav.mobile': 'Applications Mobile',
'nav.navigate': 'Naviguer',
'nav.legacySite': 'Version précédente de Quran.com',
'export.promotion': 'Ce PDF est exporté depuis Quran.com',

'login.message': 'Identifiez-vous sur Quran.com pour enregistrer tous vos favoris, notes et activités. '
}
Expand Down
1 change: 1 addition & 0 deletions src/locale/id.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export default {
'nav.mobile': 'Aplikasi Ponsel',
'nav.navigate': 'Telusuri',
'nav.legacySite': 'Quran.com versi lama',
'export.promotion': 'PDF ini diekspor dari Quran.com',

'login.message': 'Masuk ke Quran.com untuk menyimpan semua penanda, catatan, dan aktivitas Anda.'
}
Expand Down
1 change: 1 addition & 0 deletions src/locale/tr.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export default {
'nav.mobile': 'Mobil Uygulamalar',
'nav.navigate': 'Bağlantılar', // there is no exact translation for Navigate in Turkish
'nav.legacySite': 'Eski Siteye Git Quran.com',
'export.promotion': "Bu PDF, Quran.com'dan ihraç edilmektedir.",

'login.message': "Tüm yer işaretlerinizi, notlarınızı ve etkinliklerinizi saklamak için Quran.com'a giriş yapın."
}
Expand Down
1 change: 1 addition & 0 deletions src/locale/ur.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export default {
'nav.mobile': 'موبائل',
'nav.navigate': 'تشریف لے جائیں',
'nav.legacySite': 'پرانی سائٹ',
'export.promotion': '.سے ڈاؤن لوڈ کیا گیا ہے Quran.com اس پی ڈی ایف کو.',

'login.message': 'Quran.com کرنے کیلئے سائن ان سب کو اپنے بک مارکس، نوٹوں اور سرگرمیوں کو ذخیرہ کرنے.'
}
Expand Down
18 changes: 7 additions & 11 deletions src/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,17 +149,13 @@ export default (store) => {
<Route
path="/:chapterId(/:range).pdf"
getComponents={(nextState, cb) =>
import('./containers/Pdf')
.then(module => cb(null, { main: module.default, nav: 'noscript' }))
.catch(err => console.trace(err))}
onEnter={checkValidSurah}
/>

<Route
path="/:chapterId(/:range).pdf"
getComponents={(nextState, cb) =>
import(/* webpackChunkName: "pdf" */ './containers/Pdf')
.then(module => cb(null, { main: module.default, nav: 'noscript' }))
Promise.all([
import(/* webpackChunkName: "pdf" */ './containers/Pdf'),
import(/* webpackChunkName: "pdf-footer" */ './components/PdfFooter')
])
.then(modules =>
cb(null, { main: modules[0].default, footer: modules[1].default, nav: 'noscript' })
)
.catch(err => console.trace(err))}
onEnter={checkValidSurah}
/>
Expand Down

0 comments on commit 218447b

Please sign in to comment.