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 361
Simple refactorizations (v2). #838
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: 'العربية', | ||
|
@@ -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: [ | ||
{ 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' | ||
|
@@ -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' | ||
|
@@ -106,7 +209,10 @@ const config = { | |
} | ||
], | ||
link: [ | ||
{ rel: 'manifest', href: 'manifest.json' }, | ||
{ | ||
rel: 'manifest', | ||
href: '/manifest.json' | ||
}, | ||
{ | ||
rel: 'search', | ||
type: 'application/opensearchdescription+xml', | ||
|
@@ -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', | ||
|
@@ -191,7 +308,7 @@ const config = { | |
}, | ||
...Object.keys(locales).map(key => ({ | ||
rel: 'alternate', | ||
hreflang: key, | ||
hrefLang: key, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Apparently |
||
href: `https://quran.com?local=${key}` | ||
})) | ||
], | ||
|
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.