diff --git a/src/components/molecules/Hero/Hero.tsx b/src/components/molecules/Hero/Hero.tsx index d037be9..daf1578 100644 --- a/src/components/molecules/Hero/Hero.tsx +++ b/src/components/molecules/Hero/Hero.tsx @@ -24,18 +24,25 @@ const Hero = (props: { scrollTarget?: React.ForwardedRef }) = wrap: 'wrap', }}> ({ maxWidth: '95%', marginRight: '1%', - padding: { xs: '3em', md: '6em' }, - textAlign: { xs: 'center', md: 'right' }, - display: 'flex', - flexDirection: { xs: 'column', md: 'row' }, justifyContent: 'center', alignItems: 'center', gap: '3em', - }}> + + [theme.breakpoints.down('sm')]: { + flexDirection: 'column', + textAlign: 'center', + padding: '3em', + }, + [theme.breakpoints.up('sm')]: { + flexDirection: 'row', + textAlign: 'right', + padding: '6em', + }, + })}> {/*

Michele Tartari

diff --git a/src/components/molecules/ProjectSpotlight/ProjectSpotlight.tsx b/src/components/molecules/ProjectSpotlight/ProjectSpotlight.tsx index 2f03439..2c4a52f 100644 --- a/src/components/molecules/ProjectSpotlight/ProjectSpotlight.tsx +++ b/src/components/molecules/ProjectSpotlight/ProjectSpotlight.tsx @@ -1,8 +1,9 @@ import React from 'react' import { ParallaxBanner, ParallaxProvider } from 'react-scroll-parallax' -import { Box, Grid, IconButton, Typography, useTheme } from '@mui/material' +import { Box, Grid2 as Grid, IconButton, Typography, useTheme } from '@mui/material' import { ExpandMore } from '@mui/icons-material' -import { useViewport } from '../../utils/viewport' + +import { useViewport } from 'components/utils/viewport/index.js' type AnchorType = 'left' | 'top' | 'right' | 'bottom' @@ -18,13 +19,11 @@ type Props = { } const Description = (props: Props) => { - const theme = useTheme() - switch (props.anchor) { case 'bottom': return ( ({ width: '100%', display: 'flex', alignItems: 'center', @@ -39,13 +38,13 @@ const Description = (props: Props) => { borderTopWidth: theme.spacing(0.5), borderTopColor: theme.palette.primary.main, p: `${theme.spacing(7)} ${theme.spacing(5)} ${theme.spacing(5.5)} ${theme.spacing(5)}`, - }}> + })}> - + {props.title} {props.caption} - + {props.children} @@ -54,7 +53,7 @@ const Description = (props: Props) => { case 'top': return ( ({ display: 'flex', position: 'absolute', bgcolor: 'background.default', @@ -67,13 +66,13 @@ const Description = (props: Props) => { borderBottomColor: theme.palette.primary.main, p: `${theme.spacing(5)} ${theme.spacing(5)} ${theme.spacing(3)} ${theme.spacing(5)}`, // p: '5.1em 3.1em 3.1em 3.1em', - }}> + })}> - + {props.title} {props.caption} - + {props.children} @@ -82,7 +81,7 @@ const Description = (props: Props) => { case 'right': return ( ({ height: '102%', width: '28em', position: 'absolute', @@ -93,9 +92,9 @@ const Description = (props: Props) => { // borderLeftWidth: '0.35em', borderLeftStyle: 'solid', borderLeftColor: theme.palette.primary.main, - p: `${theme.spacing(3)} ${theme.spacing(5)} ${theme.spacing(5)} ${theme.spacing(5)}`, + p: `${theme.spacing(10)} ${theme.spacing(5)} ${theme.spacing(5)} ${theme.spacing(5)}`, // p: '5.1em 3.1em 3.1em 3.1em', - }}> + })}> {props.title} {props.caption} {props.children} @@ -104,7 +103,7 @@ const Description = (props: Props) => { case 'left': return ( ({ height: '102%', width: '28em', position: 'absolute', @@ -115,9 +114,9 @@ const Description = (props: Props) => { // borderLeftWidth: '0.35em', borderRightStyle: 'solid', borderRightColor: theme.palette.primary.main, - p: `${theme.spacing(3)} ${theme.spacing(5)} ${theme.spacing(5)} ${theme.spacing(5)}`, + p: `${theme.spacing(10)} ${theme.spacing(5)} ${theme.spacing(5)} ${theme.spacing(5)}`, // p: '5.1em 3.1em 3.1em 3.1em', - }}> + })}> {props.title} {props.caption} {props.children} @@ -166,9 +165,8 @@ const DesktopComponent = React.forwardRef((props, ref) }) const MobileComponent = React.forwardRef((props, ref) => { - const theme = useTheme() return ( - <> + ((props, ref) src={props.mobileImage ?? props.image} /> ({ + mt: theme.spacing(-1.05), borderTopStyle: 'solid', borderTopWidth: theme.spacing(0.5), borderTopColor: theme.palette.primary.main, p: `${theme.spacing(7)} ${theme.spacing(5)} ${theme.spacing(5.5)} ${theme.spacing(5)}`, - }}> - - - {props.title} - {props.caption} - - - {props.children} - - + })}> + {props.title} + {props.caption} + {props.children} - + ) }) diff --git a/src/components/pages/MainPage/MainPage.tsx b/src/components/pages/MainPage/MainPage.tsx index bce7836..7950659 100644 --- a/src/components/pages/MainPage/MainPage.tsx +++ b/src/components/pages/MainPage/MainPage.tsx @@ -18,7 +18,7 @@ const MainPage = () => { return ( - + {/* 1 IIT - Linfa */}