Skip to content

Commit 4f9f13e

Browse files
committed
Feature: Home page added
1 parent 3aaab95 commit 4f9f13e

File tree

41 files changed

+719
-399
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+719
-399
lines changed

.eslintrc.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,21 @@ const prettierOptions = JSON.parse(
66
);
77

88
module.exports = {
9-
parser: 'babel-eslint',
9+
parser: '@babel/eslint-parser',
1010
extends: [
1111
'eslint:recommended',
1212
'plugin:react/recommended',
1313
'airbnb',
1414
'prettier',
1515
],
16-
plugins: ['prettier', 'redux-saga', 'react', 'react-hooks', 'jsx-a11y'],
16+
plugins: [
17+
'prettier',
18+
'redux-saga',
19+
'react',
20+
'react-hooks',
21+
'jsx-a11y',
22+
'@babel',
23+
],
1724
env: {
1825
jest: true,
1926
browser: true,

app/app.js

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,11 @@
88
// Needed for redux-saga es6 generator support
99
import 'react-app-polyfill/ie11';
1010
import 'react-app-polyfill/stable';
11-
// Import all the third party stuff
1211
import React from 'react';
1312
import ReactDOM from 'react-dom';
1413
import { Provider } from 'react-redux';
15-
import FontFaceObserver from 'fontfaceobserver';
16-
// Import css
17-
1814
import 'antd/dist/antd.css';
19-
// import 'scss/volt.scss';
20-
// import 'sanitize.css/sanitize.css';
21-
2215
import 'assets/sass/main.scss';
23-
2416
// Import root app
2517
import App from 'containers/App';
2618
// Import Language Provider
@@ -30,22 +22,13 @@ import LanguageProvider from 'containers/LanguageProvider';
3022
import '!file-loader?name=[name].[ext]!./images/favicon.ico';
3123
// eslint-disable-next-line import/no-webpack-loader-syntax
3224
import 'file-loader?name=.htaccess!./.htaccess'; // eslint-disable-line import/extensions
33-
import { store } from 'store';
3425
// Import i18n messages
35-
import { DEFAULT_LOCALE, translationMessages } from 'i18n';
3626
import { saveState } from 'services/persist.service';
3727
import { throttle } from 'lodash';
3828
import reportWebVitals from 'reportWebVitals';
3929
import { shouldPolyfill } from '@formatjs/intl-numberformat/should-polyfill';
40-
41-
// Observe loading of Open Sans (to remove open sans, remove the <link> tag in
42-
// the index.html file and this observer)
43-
const openSansObserver = new FontFaceObserver('Open Sans', {});
44-
45-
// When Open Sans is loaded, add a font-family using Open Sans to the body
46-
openSansObserver.load().then(() => {
47-
document.body.classList.add('fontLoaded');
48-
});
30+
import { store } from './store';
31+
import { DEFAULT_LOCALE, translationMessages } from './i18n';
4932

5033
const MOUNT_NODE = document.getElementById('app');
5134

app/assets/sass/pages/_home.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,9 @@ img{
261261
}
262262
}
263263
.truthy-help-content{
264-
// background: url('../../assets/images/helps-bg.png');
264+
// background: url('../../images/helps-bg.jpg') no-repeat center center fixed;
265+
background: url('assets/images/helps-bg.jpg') no-repeat center center fixed;
266+
background-size: cover;
265267
// height: 200px;
266268

267269
.card-inner{

app/common/HomeContent/Contributors.js

Lines changed: 0 additions & 67 deletions
This file was deleted.

app/common/HomeContent/Footer.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

app/common/HomeContent/TruthyHelps.js

Lines changed: 0 additions & 66 deletions
This file was deleted.

app/common/layout/Navbar.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import { Menu } from 'antd';
22
import { Header } from 'antd/lib/layout/layout';
33
import React from 'react';
4+
import { FormattedMessage } from 'react-intl';
5+
import { Link } from 'react-router-dom';
6+
import messages from 'containers/HomePage/messages';
47

58
function Navbar() {
69
return (
@@ -14,8 +17,16 @@ function Navbar() {
1417
defaultSelectedKeys={['1']}
1518
className="ml-auto"
1619
>
17-
<Menu.Item key="1">Home</Menu.Item>
18-
<Menu.Item key="2">Login</Menu.Item>
20+
<Menu.Item key="1">
21+
<Link className="login-form-forgot" to="/">
22+
<FormattedMessage {...messages.home} />
23+
</Link>
24+
</Menu.Item>
25+
<Menu.Item key="2">
26+
<Link className="login-form-forgot" to="/login">
27+
<FormattedMessage {...messages.login} />
28+
</Link>
29+
</Menu.Item>
1930
</Menu>
2031
</div>
2132
</div>

app/common/messages/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ export default defineMessages({
104104
defaultMessage:
105105
'Password should contain at least one lowercase letter, one uppercase letter, one numeric digit, one special character and should be minimum 6 characters and maximum upto 20 characters!!',
106106
},
107-
108107
nameLabel: {
109108
id: `${scope}.nameLabel`,
110109
defaultMessage: 'Name',

app/components/Footer/index.js

Lines changed: 37 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
import React from 'react';
22
import moment from 'moment-timezone';
33
import messages from 'components/Footer/messages';
4-
import { Button, Card, Col, Row } from '@themesberg/react-bootstrap';
54
import { FormattedMessage } from 'react-intl';
65
import GitHubButton from 'react-github-btn';
7-
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
8-
import { faCogs, faDownload } from '@fortawesome/free-solid-svg-icons';
96
import LocaleToggle from 'containers/LocaleToggle';
10-
import { Layout } from 'antd';
117
import { useLocalStorage } from 'hooks/localstorage';
8+
import { Layout, Card, Button, Row, Col } from 'antd';
9+
import { DownloadOutlined, SettingOutlined } from '@ant-design/icons';
1210

1311
const { Footer } = Layout;
1412

@@ -27,54 +25,48 @@ const FooterComponent = () => {
2725
return (
2826
<Footer>
2927
{showSettings ? (
30-
<Card className="theme-settings">
31-
<Card.Body className="pt-4">
32-
<Button
33-
className="theme-settings-close"
34-
variant="close"
35-
size="sm"
36-
aria-label="Close"
37-
onClick={() => {
38-
toggleSettings(false);
39-
}}
40-
/>
41-
<div className="d-flex justify-content-between align-items-center mb-3">
42-
<p className="m-0 mb-1 fs-7">
43-
<FormattedMessage {...messages.licenseMessage} />
44-
</p>
45-
<GitHubButton
46-
href="https://github.com/gobeam/truthy"
47-
data-size="large"
48-
data-show-count="true"
49-
aria-label="Star gobeam/truthy on GitHub"
50-
>
51-
<FormattedMessage {...messages.star} />
52-
</GitHubButton>
53-
</div>
54-
<Button
28+
<Card>
29+
<Button
30+
size="small"
31+
aria-label="Close"
32+
onClick={() => {
33+
toggleSettings();
34+
}}
35+
/>
36+
<div className="d-flex justify-content-between align-items-center mb-3">
37+
<p className="m-0 mb-1 fs-7">
38+
<FormattedMessage {...messages.licenseMessage} />
39+
</p>
40+
<GitHubButton
5541
href="https://github.com/gobeam/truthy"
56-
target="_blank"
57-
variant="primary"
58-
className="mb-3 w-100"
42+
data-size="large"
43+
data-show-count="true"
44+
aria-label="Star gobeam/truthy on GitHub"
5945
>
60-
<FontAwesomeIcon icon={faDownload} className="me-1" />
61-
<FormattedMessage {...messages.download} />
62-
</Button>
63-
</Card.Body>
46+
<FormattedMessage {...messages.star} />
47+
</GitHubButton>
48+
</div>
49+
<Button
50+
href="https://github.com/gobeam/truthy"
51+
target="_blank"
52+
type="primary"
53+
className="mb-3 w-100"
54+
>
55+
<DownloadOutlined />
56+
<FormattedMessage {...messages.download} />
57+
</Button>
6458
</Card>
6559
) : (
6660
<Card
6761
className="theme-settings theme-settings-expand"
6862
onClick={() => {
69-
toggleSettings(true);
63+
toggleSettings();
7064
}}
7165
>
72-
<Card.Body className="p-3 py-2">
73-
<span className="fw-bold h6">
74-
<FontAwesomeIcon icon={faCogs} className="me-1 fs-7" />
75-
<FormattedMessage {...messages.settings} />
76-
</span>
77-
</Card.Body>
66+
<span className="fw-bold h6">
67+
<SettingOutlined />
68+
<FormattedMessage {...messages.settings} />
69+
</span>
7870
</Card>
7971
)}
8072
<footer className="footer section py-5">
@@ -83,13 +75,13 @@ const FooterComponent = () => {
8375
<p className="mb-0 text-center text-xl-left">
8476
<FormattedMessage {...messages.copyright} /> © 2021
8577
{`${currentYear !== 2021 ? `-${currentYear}` : ''} `}
86-
<Card.Link
78+
{/* <Card.Link
8779
href="https://github.com/gobeam/truthy"
8880
target="_blank"
8981
className="text-blue text-decoration-none fw-normal"
9082
>
9183
<FormattedMessage {...messages.appName} />
92-
</Card.Link>
84+
</Card.Link> */}
9385
</p>
9486
</Col>
9587
<Col xs={12} lg={6}>

0 commit comments

Comments
 (0)