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

Commit 75401e0

Browse files
naveed-ahmadmmahalwy
authored andcommitted
Added no script warning (#527)
* added no script warning * fixed messaging * minor css changes * removed font size
1 parent 45acbd8 commit 75401e0

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import React from 'react';
2+
import Link from 'react-router/lib/Link';
3+
4+
import Row from 'react-bootstrap/lib/Row';
5+
import Col from 'react-bootstrap/lib/Col';
6+
7+
const styles = require('./style.scss');
8+
9+
const NoScriptWarning = () => (
10+
<noscript>
11+
<Row>
12+
<Col md={12} className={styles.noscript_warning}>
13+
<p> Looks like either your browser does not support Javascript or its disabled. Quran.com workes best with JavaScript enabled.
14+
For more instruction on how to enable javascript
15+
16+
<Link to="http://www.enable-javascript.com/"> Click here</Link>
17+
</p>
18+
</Col>
19+
</Row>
20+
</noscript>
21+
);
22+
23+
export default NoScriptWarning;
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.noscript_warning {
2+
position: fixed;
3+
top: 0;
4+
left: 0;
5+
width: 100%;
6+
z-index: 1201;
7+
text-align: center;
8+
color: #FFF;
9+
background-color: #AE0000;
10+
padding: 5px 0 5px 0;
11+
}

src/containers/App/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import config from 'config';
1616
import metricsConfig from 'helpers/metrics';
1717
import { authConnect } from './connect';
1818
import Footer from 'components/Footer';
19+
import NoScriptWarning from 'components/NoScriptWarning';
1920

2021
import FontStyles from 'components/FontStyles';
2122

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

0 commit comments

Comments
 (0)