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

Commit

Permalink
Added no script warning (#527)
Browse files Browse the repository at this point in the history
* added no script warning

* fixed messaging

* minor css changes

* removed font size
  • Loading branch information
naveed-ahmad authored and mmahalwy committed Dec 16, 2016
1 parent 45acbd8 commit 75401e0
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/components/NoScriptWarning/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import React from 'react';
import Link from 'react-router/lib/Link';

import Row from 'react-bootstrap/lib/Row';
import Col from 'react-bootstrap/lib/Col';

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

const NoScriptWarning = () => (
<noscript>
<Row>
<Col md={12} className={styles.noscript_warning}>
<p> Looks like either your browser does not support Javascript or its disabled. Quran.com workes best with JavaScript enabled.
For more instruction on how to enable javascript

<Link to="http://www.enable-javascript.com/"> Click here</Link>
</p>
</Col>
</Row>
</noscript>
);

export default NoScriptWarning;
11 changes: 11 additions & 0 deletions src/components/NoScriptWarning/style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.noscript_warning {
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 1201;
text-align: center;
color: #FFF;
background-color: #AE0000;
padding: 5px 0 5px 0;
}
2 changes: 2 additions & 0 deletions src/containers/App/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import config from 'config';
import metricsConfig from 'helpers/metrics';
import { authConnect } from './connect';
import Footer from 'components/Footer';
import NoScriptWarning from 'components/NoScriptWarning';

import FontStyles from 'components/FontStyles';

Expand All @@ -41,6 +42,7 @@ class App extends Component {
<div>
<Helmet {...config.app.head} />
<FontStyles />
<NoScriptWarning />
{children}
<SmartBanner title="The Noble Quran - القرآن الكريم" button="Install"/>
<Footer />
Expand Down

0 comments on commit 75401e0

Please sign in to comment.