Skip to content

Commit

Permalink
Improving appearance of home page and dashboard for mobile devices.
Browse files Browse the repository at this point in the history
  • Loading branch information
krulis-martin committed Oct 3, 2024
1 parent ef54de6 commit 585c034
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/components/Users/UsersName/usersName.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
vertical-align: bottom;
}

@media (max-width: 767px) {
.wrapper {
white-space: initial;
}
}

.avatar {
margin-right: 8px;
vertical-align: text-top;
Expand Down
12 changes: 12 additions & 0 deletions src/containers/App/recodex.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@
* these styles tend to cover other ReCodEx-specific situations.
*/

@media (max-width: 767px) {
:root {
font-size: 85%;
}
}

@media (max-width: 575px) {
:root {
font-size: 70%;
}
}

/*
* Additional text modifications
*/
Expand Down
4 changes: 3 additions & 1 deletion src/pages/Home/Home.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import { isSupervisorRole } from '../../components/helpers/usersRoles.js';
import { getConfigVar, URL_PATH_PREFIX } from '../../helpers/config.js';
import { getLocalizedName, getLocalizedDescription } from '../../helpers/localizedData.js';

import * as styles from './Home.less';

const BASIC_HTML = {
strong: content => <strong>{content}</strong>,
em: content => <em>{content}</em>,
Expand All @@ -37,7 +39,7 @@ const Home = ({ effectiveRole, instance = null, intl: { locale } }) => (
<hr />
<Row>
<Col lg={12} xl={6}>
<Image src={`${URL_PATH_PREFIX}/public/logo.png`} className="text-center m-5" />
<Image src={`${URL_PATH_PREFIX}/public/logo.png`} className={styles.logo} />
</Col>
<Col lg={12} xl={6}>
<div className="m-5">
Expand Down
16 changes: 16 additions & 0 deletions src/pages/Home/Home.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
img.logo {
text-align: center;
margin: 3rem;
}

@media (max-width: 767px) {
img.logo {
max-width: calc(100vw - 4rem);
margin: 1rem;
}
}

@media (max-width: 575px) {
max-width: calc(100vw - 2rem);
margin: 0;
}

0 comments on commit 585c034

Please sign in to comment.