-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: create new frontpage component and page
This commit introduces a new frontpage component (FrontV3b.tsx) and a corresponding page (v3b.tsx). The new frontpage includes various sections such as a status report, dicty info, slideshow, dicty news, latest papers, featured content, recent updates, and a coming soon section. The page is publicly accessible. This change allows for a redesigned frontpage with updated content and layout.
- Loading branch information
Showing
2 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
import { Helmet } from "react-helmet" | ||
import { Grid, Container } from "@material-ui/core" | ||
import { makeStyles, Theme } from "@material-ui/core/styles" | ||
import { | ||
RecentUpdates, | ||
ComingSoon, | ||
Featured, | ||
StatusReportContainer, | ||
} from "@dictybase/ui-frontpage" | ||
import { Slideshow } from "./Slideshow" | ||
import { LatestPapers } from "./LatestPapers" | ||
import { DictyInfo } from "./DictyInfoV3" | ||
import { DictyNewsWithAuth } from "./DictyNewsWithAuth" | ||
|
||
const useStyles = makeStyles((theme: Theme) => ({ | ||
topItem: { | ||
paddingTop: theme.spacing(1), | ||
paddingBottom: theme.spacing(1), | ||
paddingLeft: theme.spacing(1), | ||
paddingRight: theme.spacing(1), | ||
}, | ||
bottomItem: { | ||
padding: "1px 2px 1px 2px", | ||
}, | ||
main: { | ||
marginTop: theme.spacing(2), | ||
marginBottom: theme.spacing(4), | ||
[theme.breakpoints.up("xl")]: { | ||
maxWidth: "90%", | ||
}, | ||
}, | ||
})) | ||
|
||
/** This is the frontpage component that appears when the user hits the "/" route. */ | ||
|
||
const Front = () => { | ||
const classes = useStyles() | ||
|
||
return ( | ||
<Container maxWidth="xl" className={classes.main}> | ||
<Helmet> | ||
<title> | ||
dictyBase - your central resource for Dictyostelid genomics | ||
</title> | ||
<meta | ||
name="description" | ||
content="dictyBase is a central resource for Dictyostelid genomics" | ||
/> | ||
</Helmet> | ||
<Grid container justifyContent="center"> | ||
<Grid item className={classes.topItem} sm={12} md={12} xl={12}> | ||
<StatusReportContainer /> | ||
</Grid> | ||
<Grid item className={classes.topItem} xs={12} xl={12}> | ||
<DictyInfo /> | ||
</Grid> | ||
<Grid item className={classes.topItem} sm={12} md={6} xl={6}> | ||
<Slideshow /> | ||
</Grid> | ||
<Grid item className={classes.topItem} sm={12} md={6} xl={6}> | ||
<DictyNewsWithAuth /> | ||
</Grid> | ||
<Grid item className={classes.topItem} xs={12} xl={12}> | ||
<LatestPapers /> | ||
</Grid> | ||
<Grid item className={classes.topItem} xs={12} sm={4} lg={4} xl={4}> | ||
<Featured /> | ||
</Grid> | ||
<Grid item className={classes.topItem} xs={12} sm={4} lg={4} xl={4}> | ||
<RecentUpdates /> | ||
</Grid> | ||
<Grid item className={classes.topItem} xs={12} sm={4} lg={4} xl={4}> | ||
<ComingSoon text="Recent Annotations coming soon!" height="390px" /> | ||
</Grid> | ||
</Grid> | ||
</Container> | ||
) | ||
} | ||
|
||
export { Front } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { ACCESS } from "@dictybase/auth" | ||
import { Front } from "../features/Frontpage/FrontV3b" | ||
|
||
// eslint-disable-next-line unicorn/prefer-export-from, import/no-default-export | ||
export default Front | ||
export const access = ACCESS.public |