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

do not always load bismillah #515

Merged
merged 2 commits into from
Dec 2, 2016
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
5 changes: 4 additions & 1 deletion src/components/SurahInfo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@ import Col from 'react-bootstrap/lib/Col';
const style = require('./style.scss');

const SurahInfo = ({ surah, isShowingSurahInfo, onClose }) => {
// So we don't need to load images and files unless needed
if (!isShowingSurahInfo) return <noscript />;

const html = require(`./htmls/${surah.id}.html.js`); // eslint-disable-line global-require

return (
<Col xs={12} className={`${style.container} ${isShowingSurahInfo ? style.show : ''}`}>
<Col xs={12} className={`${style.container} ${style.show}`}>
<div
className={`${style.close} ss-delete`}
onClick={() => onClose({isShowingSurahInfo: !isShowingSurahInfo})}
Expand Down
6 changes: 0 additions & 6 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,6 @@ module.exports = Object.assign({
"logo": "https://quran.com/images/thumbnail.png"
}`
}
],
style: [
{cssText: `@font-face {font-family: 'bismillah';
src: url('//quran-1f14.kxcdn.com/fonts/ttf/bismillah.ttf') format('truetype')}
.bismillah{font-family: 'bismillah'; font-size: 36px !important; color: #000; padding: 25px 0px;}` // eslint-disable-line max-len
}
]
}
}
Expand Down
13 changes: 10 additions & 3 deletions src/containers/Surah/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -422,9 +422,16 @@ class Surah extends Component {
}]
}`
}]}
style={[{
cssText: `.text-arabic{font-size: ${options.fontSize.arabic}rem;} .text-translation{font-size: ${options.fontSize.translation}rem;}` // eslint-disable-line max-len
}]}
style={[
{
cssText: `.text-arabic{font-size: ${options.fontSize.arabic}rem;} .text-translation{font-size: ${options.fontSize.translation}rem;}` // eslint-disable-line max-len
Copy link
Contributor

@thabti thabti Dec 2, 2016

Choose a reason for hiding this comment

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

Wasn't aware we are doing inline style(JSCSS). I guess it works better for increasing front-size.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's a ghetto way of doing it :)

},
{
cssText: `@font-face {font-family: 'bismillah';
src: url('//quran-1f14.kxcdn.com/fonts/ttf/bismillah.ttf') format('truetype')}
.bismillah{font-family: 'bismillah'; font-size: 36px !important; color: #000; padding: 25px 0px;}` // eslint-disable-line max-len
}
]}
/>
<Header surah={surah} handleToggleSidebar={() => this.setState({sidebarOpen: true})} />
<Sidebar
Expand Down