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

Simple refactorizations (v2). #838

Merged
merged 2 commits into from
Jul 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
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
195 changes: 156 additions & 39 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,26 @@ const environment = {
}[process.env.NODE_ENV || 'development'];

const title = "Al-Qur'an al-Kareem - القرآن الكريم";
const description =
'The Quran translated into many languages in a simple and easy interface.';
const description = 'The Quran translated into many languages in a simple and easy interface.';
const keywords = [
'القران الكريم',
'قران كريم',
'القرآن',
'قران',
'quran',
'qur\'an',
'koran',
'kareem',
'surah',
'yasin',
'yaseen',
'kahf',
'mulk',
'rahman',
'muslim',
'islam',
'Allah'
].join(', ');
const locales = {
en: 'English',
ar: 'العربية',
Expand All @@ -28,24 +46,43 @@ const config = {
sentryClient: process.env.SENTRY_KEY_CLIENT,
sentryServer: process.env.SENTRY_KEY_SERVER,
facebookAppId: process.env.FACEBOOK_APP_ID,
// Supported locales
locales,
defaultLocale: 'en',
app: {
head: {
titleTemplate: `%s - ${title}`,
meta: [
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of the changes below are simply to make the file look more consistent, and future metadata additions would follow that one style.

{ charset: 'utf-8' },
{ 'http-equiv': 'Content-Type', content: 'text/html; charset=utf-8' },
{ 'http-equiv': 'Content-Language', content: 'EN; AR' },
{ name: 'description', content: description },
{
charset: 'utf-8'
},
{
'http-equiv': 'Content-Type',
content: 'text/html; charset=utf-8'
},
{
'http-equiv': 'Content-Language',
content: 'EN; AR'
},
{
name: 'description',
content: description
},
{
name: 'keywords',
content: "quran, koran, qur'an, kareem, قران, القرآن, قران كريم, القران الكريم, surah, yasin, yaseen, kahf, mulk, rahman, muslim, islam, Allah"
}, // eslint-disable-line max-l en
{ name: 'Charset', content: 'UTF-8' },
{ name: 'Distribution', content: 'Global' },
{ name: 'Rating', content: 'General' },
content: keywords
},
{
name: 'Charset',
content: 'UTF-8'
},
{
name: 'Distribution',
content: 'Global'
},
{
name: 'Rating',
content: 'General'
},
{
name: 'viewport',
content: 'width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no'
Expand All @@ -54,40 +91,106 @@ const config = {
name: 'google-site-verification',
content: 'ehFz7FvmL7V9MzP40F8_kLABhCzqGzMDMrCnUP44Too'
},
{ name: 'theme-color', content: '#004f54' },
{ property: 'og:site_name', content: title },
{
name: 'theme-color',
content: '#004f54'
},
{
property: 'og:site_name',
content: title
},
{
property: 'og:image',
content: 'https://quran.com/images/thumbnail.png'
},
{ property: 'og:locale', content: 'en_US' },
{ property: 'og:title', content: title },
{ property: 'og:description', content: description },
{ property: 'og:url', content: 'https://quran.com' },
{ property: 'og:type', content: 'website' },
{ name: 'twitter:card', content: 'summary' },
{ name: 'twitter:title', content: title },
{ name: 'twitter:description', content: description },
{
property: 'og:locale',
content: 'en_US'
},
{
property: 'og:title',
content: title
},
{
property: 'og:description',
content: description
},
{
property: 'og:url',
content: 'https://quran.com'
},
{
property: 'og:type',
content: 'website'
},
{
name: 'twitter:card',
content: 'summary'
},
{
name: 'twitter:title',
content: title
},
{
name: 'twitter:description',
content: description
},
{
name: 'twitter:image',
content: 'https://quran.com/images/thumbnail.png'
},
{ name: 'twitter:image:width', content: '200' },
{ name: 'twitter:image:height', content: '200' },
{
name: 'twitter:image:width',
content: '200'
},
{
name: 'twitter:image:height',
content: '200'
},
{
name: 'google-play-app',
content: 'app-id=com.quran.labs.androidquran'
},
{ name: 'apple-itunes-app', content: 'app-id=1118663303' },
{ name: 'mobile-web-app-capable', content: 'yes' },
{ name: 'apple-mobile-web-app-capable', content: 'yes' },
{ name: 'apple-mobile-web-app-title', content: title },
{ name: 'apple-mobile-web-app-status-bar-style', content: 'black' },
{ name: 'application-name', content: 'Al-Quran - القرآن الكريم' },
{ name: 'msapplication-TileColor', content: '#004f54' },
{ name: 'msapplication-tooltip', content: description },
{ name: 'msapplication-starturl', content: 'https://quran.com' },
{ name: 'msapplication-navbutton-color', content: '#004f54' },
{
name: 'apple-itunes-app',
content: 'app-id=1118663303'
},
{
name: 'mobile-web-app-capable',
content: 'yes'
},
{
name: 'apple-mobile-web-app-capable',
content: 'yes'
},
{
name: 'apple-mobile-web-app-title',
content: title
},
{
name: 'apple-mobile-web-app-status-bar-style',
content: 'black'
},
{
name: 'application-name',
content: 'Al-Quran - القرآن الكريم'
},
{
name: 'msapplication-TileColor',
content: '#004f54'
},
{
name: 'msapplication-tooltip',
content: description
},
{
name: 'msapplication-starturl',
content: 'https://quran.com'
},
{
name: 'msapplication-navbutton-color',
content: '#004f54'
},
{
name: 'msapplication-square70x70logo',
content: '/mstitle-70x70.jpg'
Expand All @@ -106,7 +209,10 @@ const config = {
}
],
link: [
{ rel: 'manifest', href: 'manifest.json' },
{
rel: 'manifest',
href: '/manifest.json'
},
{
rel: 'search',
type: 'application/opensearchdescription+xml',
Expand Down Expand Up @@ -136,9 +242,20 @@ const config = {
href: '/favicon-16x16.png',
sizes: '16x16'
},
{ rel: 'mask-icon', href: '/safari-pinned-tab.svg', color: '#004f54' },
{ rel: 'shortcut icon', href: '/favicon.ico', type: 'image/x-icon' },
{ rel: 'apple-touch-icon', href: 'apple-touch-icon.png' },
{
rel: 'mask-icon',
href: '/safari-pinned-tab.svg',
color: '#004f54'
},
{
rel: 'shortcut icon',
type: 'image/x-icon',
href: '/favicon.ico'
},
{
rel: 'apple-touch-icon',
href: '/apple-touch-icon.png'
},
{
rel: 'apple-touch-icon',
sizes: '57x57',
Expand Down Expand Up @@ -191,7 +308,7 @@ const config = {
},
...Object.keys(locales).map(key => ({
rel: 'alternate',
hreflang: key,
hrefLang: key,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently hreflang is a typo..?

href: `https://quran.com?local=${key}`
}))
],
Expand Down
30 changes: 15 additions & 15 deletions src/containers/About/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,27 @@ export default () => (
<div className="row">
<div className="col-md-8 col-md-offset-2">
<h4 className="source-sans">
The Noble Quran is the central
The Noble Qur&apos;an is the central
religious text of Islam. Muslims believe the Qur’an is the
book of Divine guidance and direction for mankind, and
consider the original Arabic text the final revelation of
Allah (God).[<a href="en.wikipedia.org/wiki/Quran">1</a>]
All translations of the original Arabic text
are thus interpretations of the original meanings and should
be embraced as such. For more information about the Noble
Quran, you may visit its <a href="https://en.wikipedia.org/wiki/Quran">Wikipedia article.</a>
Qur&apos;an, you may visit its <a href="https://en.wikipedia.org/wiki/Quran">Wikipedia article.</a>
</h4>
</div>
</div>
<div className="row">
<div className="col-md-8 col-md-offset-2">
<h3>MECCAN SURAHS</h3>
<h4 className="source-sans">
The Meccan suras are the chronologically earlier chapters
(suras) of the Quran that were, according to Islamic
The Meccan Surahs are the chronologically earlier chapters
(Surahs) of the Qur&apos;an that were, according to Islamic
tradition, revealed anytime before the migration of the
Islamic prophet Muhammed and his followers from Mecca to
Medina (Hijra). The Medinan suras are those revelations that
Medina (Hijra). The Medinan Surahs are those revelations that
occurred after the move to the city of that name.
</h4>
</div>
Expand All @@ -39,10 +39,10 @@ export default () => (
<div className="col-md-8 col-md-offset-2">
<h3>MEDINAN SURAHS</h3>
<h4 className="source-sans">
The Medinan suras or Medinan chapters of the Quran are the
latest 24 suras that, according to Islamic tradition, were
revealed at Medina after Muhammad&apos;s hijra from Mecca. These
suras were revealed by Allah when the Muslim community was
The Medinan Surahs or Medinan Chapters of the Qur&apos;an are the
latest 24 Surahs that, according to Islamic tradition, were
revealed at Medina after Muhammad&apos;s Hijra from Mecca. These
Surahs were revealed by Allah when the Muslim community was
larger and more developed, as opposed to their minority position
in Mecca.
</h4>
Expand All @@ -53,10 +53,10 @@ export default () => (
<h3>BROWSING SURAHS ON THIS WEBSITE</h3>
<h4 className="source-sans">
We have redesigned the website with a user friendly approach in
mind. To browse through the surahs, click on the button
(shown left) in the READ & LISTEN page and navigate surah by
mind. To browse through the Surahs, click on the button
(shown left) in the READ & LISTEN page and navigate Surah by
title or by page. In future iterations, we will be integrating
more search and audio features inshaAllah. If you have any
more search and audio features, ان شاء الله. If you have any
suggestions on how we can make the website a better experience
please do not hesitate to <a href="https://quran.zendesk.com/hc/en-us">contact us</a>.
</h4>
Expand All @@ -70,10 +70,10 @@ export default () => (
possible with the will of Allah (Glory be unto Him) and with the
help of the open source Muslim community online. Data sources
include <a href="http://www.tanzil.info">Tanzil</a>,
<a href="http://www.qurancomplex.com"> QuranComplex</a>,
<a href="https://github.com/cpfair/quran-align">Colin Fair&apos;s work on audio segments</a>,
<a href="http://www.qurancomplex.com"> Qur&apos;anComplex</a>,
<a href="https://github.com/cpfair/quran-align"> Colin Fair&apos;s work on audio segments</a>,
<a href="http://www.zekr.org"> Zekr</a> and
<a href="http://www.al-quran.info"> Online Quran Project</a>.
<a href="http://www.al-quran.info"> Online Qur&apos;an Project</a>.
Special thanks to the
<a href="http://elmohafez.com"> Elmohafez team</a> for word by
word timing files.
Expand Down
20 changes: 15 additions & 5 deletions src/containers/AyatulKursi/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ const TopOptions = Loadable({
});

const title = 'Ayatul Kursi';

const description =
'Ayatul Kursi is verse 255 of the second chapter, surah Baqarah of the Holy Quran, Surah al-Baqarah (The Chapter of the Cow). It is also known as the Throne Verse.';
const description = 'Ayatul Kursi is verse 255 of the second chapter, ' +
'Surah al-Baqarah (The Chapter of the Cow), in the ' +
'Holy Quran. It is also known as the Throne Verse.';

class AyatulKursi extends Component {
state = {
Expand Down Expand Up @@ -109,7 +109,13 @@ class AyatulKursi extends Component {
}

renderLines() {
const { lines, options, currentVerse, isPlaying, actions } = this.props;
const {
lines,
options,
currentVerse,
isPlaying,
actions
} = this.props;
const keys = Object.keys(lines);

return (
Expand All @@ -125,7 +131,11 @@ class AyatulKursi extends Component {
}

render() {
const { chapter, verses, options } = this.props; // eslint-disable-line no-shadow
const {
chapter,
verses,
options
} = this.props; // eslint-disable-line no-shadow
debug('component:AyatulKursi', 'Render');

return (
Expand Down
Loading