From 1c82c9653f0fa66d42e50243791e5447b2d14d8a Mon Sep 17 00:00:00 2001 From: Carlos Cruz Date: Mon, 7 Feb 2022 15:19:48 +0000 Subject: [PATCH 1/3] feat: replace Links to react-router ones --- src/pages/HomePage/HomePage.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/HomePage/HomePage.js b/src/pages/HomePage/HomePage.js index 3cb60aa4..e49d5256 100644 --- a/src/pages/HomePage/HomePage.js +++ b/src/pages/HomePage/HomePage.js @@ -5,7 +5,7 @@ import Grid from '@material-ui/core/Grid'; import Typography from '@material-ui/core/Typography'; import withStyles from '@material-ui/core/styles/withStyles'; import RootRef from '@material-ui/core/RootRef'; -import Link from '@material-ui/core/Link'; +import Link from '../../components/Link'; import { Splash } from '../../ot-ui-components'; @@ -143,7 +143,7 @@ class HomePage extends Component { style={{ textAlign: 'center' }} className={classes.exampleLink} > - + {d.label} From 3fc379b39cb00f6686546798b55961bd6907fe38 Mon Sep 17 00:00:00 2001 From: Carlos Cruz Date: Wed, 9 Feb 2022 10:27:58 +0000 Subject: [PATCH 2/3] refactor: home page intro links --- src/pages/HomePage/HomePage.js | 184 +++++++++++++++++++++++++-------- 1 file changed, 139 insertions(+), 45 deletions(-) diff --git a/src/pages/HomePage/HomePage.js b/src/pages/HomePage/HomePage.js index e49d5256..8b224552 100644 --- a/src/pages/HomePage/HomePage.js +++ b/src/pages/HomePage/HomePage.js @@ -1,23 +1,26 @@ import React, { Component, Fragment } from 'react'; import { Helmet } from 'react-helmet'; +import { Grid, Box, Typography, useMediaQuery } from '@material-ui/core'; +import { useTheme, withStyles, makeStyles } from '@material-ui/core/styles'; -import Grid from '@material-ui/core/Grid'; -import Typography from '@material-ui/core/Typography'; -import withStyles from '@material-ui/core/styles/withStyles'; -import RootRef from '@material-ui/core/RootRef'; +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import { + faCircle, + faDownload, + faLaptopCode, + faQuestionCircle, + faFileAlt, + faCommentDots, +} from '@fortawesome/free-solid-svg-icons'; import Link from '../../components/Link'; - -import { Splash } from '../../ot-ui-components'; - -import HomeBox from './HomeBox'; - import Search from '../../components/Search'; -import PortalFeaturesIcon from '../../components/PortalFeaturesIcon'; import ScrollDownButton from '../../components/ScrollDownButton'; import NavBar from '../../components/NavBar/NavBar'; - import Version from '../../components/Version'; import Footer from '../../components/Footer'; +import { Splash } from '../../ot-ui-components'; + +import HomeBox from './HomeBox'; import { externalLinks, mainMenuItems } from '../../constants'; @@ -36,7 +39,7 @@ const EXAMPLES = [ }, ]; -const styles = theme => { +const containerStyles = theme => { return { highlight: { color: theme.palette.primary.main, @@ -94,9 +97,67 @@ const styles = theme => { color: theme.palette.primary.dark, }, }, + hpSection: { + marginBottom: '40px', + marginTop: '60px', + }, + linksContainer: { + marginTop: '15px', + marginBottom: '15px', + }, }; }; +const useHelpBoxStyle = makeStyles(theme => ({ + baseLink: { + whiteSpace: 'pre-wrap', + }, + helpBoxes: { + maxWidth: '120px', + textAlign: 'center', + [theme.breakpoints.down('xs')]: { + textAlign: 'left', + }, + }, +})); + +const HelpBoxPanel = ({ fai, url, label, external }) => { + const theme = useTheme(); + const xsMQ = useMediaQuery(theme.breakpoints.down('xs')); + const classes = useHelpBoxStyle(); + if (xsMQ) { + // on xsmall screens + return ( + + + +
+ + +
+
+ + + {label} + + +
+ + ); + } + return ( + + +
+ + +
+ {label} + +
+ ); +}; + class HomePage extends Component { constructor(props) { super(props); @@ -116,7 +177,7 @@ class HomePage extends Component { Open Targets Genetics - +
- - - -

- Welcome to Open Targets Genetics -

-

- Open Targets Genetics is the latest release from Open Targets, an - innovative, large-scale, multi-year, public-private partnership - that uses human genetics and genomics data for systematic drug - target identification and prioritisation. -

-

- The Portal offers three unique features to help you discover - associations between genes, variants, and traits: -

-

- + Browse and rank gene and variant associations identified by our - Locus-to-Gene (L2G) scoring pipeline -

-

- + Uncover credible sets for variant and trait associations based - on our fine mapping analyses pipeline -

-

- + Explore and compare studies from UK Biobank, FinnGen, and GWAS - Catalog using our multi-trait comparison tool -

-
- - +
+ + + + Get started with the Genetics Portal + + + + + + + + + + + + + + + + + + + + + +