Skip to content

Commit 5544575

Browse files
committed
Improving appearance of home page and dashboard for mobile devices.
1 parent ef54de6 commit 5544575

File tree

4 files changed

+37
-1
lines changed

4 files changed

+37
-1
lines changed

src/components/Users/UsersName/usersName.less

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
vertical-align: bottom;
66
}
77

8+
@media (max-width: 767px) {
9+
.wrapper {
10+
white-space: initial;
11+
}
12+
}
13+
814
.avatar {
915
margin-right: 8px;
1016
vertical-align: text-top;

src/containers/App/recodex.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,18 @@
66
* these styles tend to cover other ReCodEx-specific situations.
77
*/
88

9+
@media (max-width: 767px) {
10+
:root {
11+
font-size: 85%;
12+
}
13+
}
14+
15+
@media (max-width: 575px) {
16+
:root {
17+
font-size: 70%;
18+
}
19+
}
20+
921
/*
1022
* Additional text modifications
1123
*/

src/pages/Home/Home.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ import { isSupervisorRole } from '../../components/helpers/usersRoles.js';
2424
import { getConfigVar, URL_PATH_PREFIX } from '../../helpers/config.js';
2525
import { getLocalizedName, getLocalizedDescription } from '../../helpers/localizedData.js';
2626

27+
import * as styles from './Home.less';
28+
2729
const BASIC_HTML = {
2830
strong: content => <strong>{content}</strong>,
2931
em: content => <em>{content}</em>,
@@ -37,7 +39,7 @@ const Home = ({ effectiveRole, instance = null, intl: { locale } }) => (
3739
<hr />
3840
<Row>
3941
<Col lg={12} xl={6}>
40-
<Image src={`${URL_PATH_PREFIX}/public/logo.png`} className="text-center m-5" />
42+
<Image src={`${URL_PATH_PREFIX}/public/logo.png`} className={styles.logo} />
4143
</Col>
4244
<Col lg={12} xl={6}>
4345
<div className="m-5">

src/pages/Home/Home.less

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
img.logo {
2+
text-align: center;
3+
margin: 3rem;
4+
}
5+
6+
@media (max-width: 767px) {
7+
img.logo {
8+
max-width: calc(100vw - 4rem);
9+
margin: 1rem;
10+
}
11+
}
12+
13+
@media (max-width: 575px) {
14+
max-width: calc(100vw - 2rem);
15+
margin: 0;
16+
}

0 commit comments

Comments
 (0)