Skip to content

Commit

Permalink
feat: create new frontpage component and page
Browse files Browse the repository at this point in the history
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
ktun95 committed Feb 14, 2025
1 parent 76c8832 commit a37cff8
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 0 deletions.
80 changes: 80 additions & 0 deletions apps/dicty-frontpage/src/features/Frontpage/FrontV3b.tsx
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 }
6 changes: 6 additions & 0 deletions apps/dicty-frontpage/src/pages/v3b.tsx
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

0 comments on commit a37cff8

Please sign in to comment.