Skip to content

Commit 49c8779

Browse files
committed
Make HomeScreen nicer
1 parent 04a8035 commit 49c8779

File tree

2 files changed

+44
-37
lines changed

2 files changed

+44
-37
lines changed

ui/src/screens/HomeScreen/HomeScreen.jsx

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,14 @@
1-
import _ from 'lodash';
21
import React, { Component } from 'react';
32
import ReactMarkdown from 'react-markdown';
4-
import { Link } from 'react-router-dom';
53
import rehypeRaw from 'rehype-raw';
6-
import { Navigate } from 'react-router-dom';
4+
import { Navigate, Link } from 'react-router-dom';
75
import queryString from 'query-string';
86
import { compose } from 'redux';
97
import { connect } from 'react-redux';
10-
import { defineMessages, FormattedMessage, injectIntl } from 'react-intl';
8+
import { defineMessages, injectIntl } from 'react-intl';
119

1210
import withRouter from 'app/withRouter';
13-
import {
14-
AnimatedCount,
15-
SearchBox,
16-
Category,
17-
Country,
18-
Schema,
19-
Statistics,
20-
} from 'components/common';
11+
import { AnimatedCount, SearchBox } from 'components/common';
2112
import { fetchStatistics } from 'actions/index';
2213
import { selectMetadata, selectSession, selectStatistics } from 'selectors';
2314
import Screen from 'components/Screen/Screen';
@@ -30,6 +21,10 @@ const messages = defineMessages({
3021
id: 'home.title',
3122
defaultMessage: 'Find public records and leaks',
3223
},
24+
about: {
25+
id: 'home.about',
26+
defaultMessage: 'Acerca de Cuba Investiga',
27+
},
3328
access_disabled: {
3429
id: 'home.access_disabled',
3530
defaultMessage: 'Public access temporarily disabled',
@@ -40,16 +35,20 @@ const messages = defineMessages({
4035
},
4136
count_entities: {
4237
id: 'home.counts.entities',
43-
defaultMessage: 'Public entities',
38+
defaultMessage: 'Entidades',
4439
},
4540
count_datasets: {
4641
id: 'home.counts.datasets',
47-
defaultMessage: 'Public datasets',
42+
defaultMessage: 'Conjuntos de datos',
4843
},
4944
count_countries: {
5045
id: 'home.counts.countries',
5146
defaultMessage: 'Countries & territories',
5247
},
48+
count_documents: {
49+
id: 'collection.info.documents',
50+
defaultMessage: 'Documentos',
51+
},
5352
});
5453

5554
export class HomeScreen extends Component {
@@ -106,19 +105,19 @@ export class HomeScreen extends Component {
106105
/>
107106
<div className="HomeScreen__thirds">
108107
<AnimatedCount
109-
count={statistics?.things}
108+
count={87500000}
110109
isPending={statistics.isPending}
111110
label={intl.formatMessage(messages.count_entities)}
112111
/>
113112
<AnimatedCount
114-
count={statistics?.collections}
113+
count={40}
115114
isPending={statistics.isPending}
116115
label={intl.formatMessage(messages.count_datasets)}
117116
/>
118117
<AnimatedCount
119-
count={_.size(statistics?.countries)}
118+
count={115171}
120119
isPending={statistics.isPending}
121-
label={intl.formatMessage(messages.count_countries)}
120+
label={intl.formatMessage(messages.count_documents)}
122121
/>
123122
</div>
124123
</div>
@@ -158,6 +157,14 @@ export class HomeScreen extends Component {
158157
<p className="HomeScreen__paragraph--center">
159158
<Link to="/pages/about">Más información</Link>
160159
</p>
160+
<h1 className="HomeScreen__title">
161+
{intl.formatMessage(messages.about)}
162+
</h1>
163+
<div className="HomeScreen__thirds">
164+
Cuba Investiga es una herramienta para hacer periodismo de
165+
investigación sobre Cuba.<br />
166+
<Link to="/pages/about">Más información</Link>
167+
</div>
161168
</div>
162169
</section>
163170
</div>

ui/src/screens/HomeScreen/HomeScreen.scss

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -47,25 +47,25 @@ $vertical-spacing: $aleph-grid-size * 5;
4747
vertical-align: middle;
4848
}
4949

50-
&:nth-child(even) {
51-
background-color: $dark-gray2;
52-
color: white;
53-
54-
.HomeScreen__title {
55-
color: white;
56-
}
57-
58-
b {
59-
color: white;
60-
}
61-
62-
a {
63-
color: white;
64-
}
65-
}
66-
&:nth-child(odd) {
67-
background-color: $light-gray5;
68-
}
50+
// &:nth-child(even) {
51+
// background-color: $dark-gray2;
52+
// color: white;
53+
54+
// .HomeScreen__title {
55+
// color: white;
56+
// }
57+
58+
// b {
59+
// color: white;
60+
// }
61+
62+
// a {
63+
// color: white;
64+
// }
65+
// }
66+
// &:nth-child(odd) {
67+
// background-color: $light-gray5;
68+
// }
6969
}
7070

7171
&__text-container {

0 commit comments

Comments
 (0)