Skip to content

Commit

Permalink
fix: merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
fustroli committed Jan 30, 2022
2 parents ade1b52 + 61ee8fd commit 54269f8
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 21 deletions.
1 change: 1 addition & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ module.exports = {
'180.earth',
'purecatamphetamine.github.io',
],
disableStaticImages: true,
},
};
15 changes: 10 additions & 5 deletions src/components/PageWrapper.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Box } from '@mui/material';
import { Box, useMediaQuery, useTheme } from '@mui/material';
import clsx from 'clsx';
import { useRouter } from 'next/router';
import { makeStyles } from 'models/makeStyles';
Expand Down Expand Up @@ -29,17 +29,22 @@ const useStyles = makeStyles()((theme) => ({
export default function PageWrapper({ children, className, ...otherProps }) {
const { classes } = useStyles();
const router = useRouter();
const theme = useTheme();
const isMobileScreen = useMediaQuery(theme.breakpoints.down('md'));

const onBackHandler = () => {
router.back();
};

return (
<Box className={classes.pageContainer}>
<Box className={classes.top}>
<BackButton onBackHandler={onBackHandler} />
<SearchButton />
</Box>
{isMobileScreen || (
<Box className={classes.top}>
<BackButton onBackHandler={onBackHandler} />
<SearchButton />
</Box>
)}

<Box className={clsx(classes.main, className)} {...otherProps}>
{children}
</Box>
Expand Down
28 changes: 24 additions & 4 deletions src/components/TreeSpeciesCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ const useStyles = makeStyles()((theme) => ({
countBox: {
background: theme.palette.textLight.main,
color: theme.palette.common.white,
padding: theme.spacing(5),
padding: theme.spacing(6, 8),
[theme.breakpoints.down('md')]: {
padding: theme.spacing(5.75, 7.5),
},
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
Expand All @@ -33,14 +36,31 @@ function TreeSpeciesCard(props) {

return (
<Card className={classes.root} elevation={0}>
<Box ml={5}>
<Typography variant="h5" sx={{ color: 'textPrimary.main' }}>
<Box ml={6}>
<Typography
variant="h5"
sx={{
color: 'textPrimary.main',
fontFamily: 'Lato',
fontWeight: 600,
}}
>
{name}
</Typography>
</Box>
<Box className={classes.countBox}>
<Typography variant="body1">Count:</Typography>
<Typography variant="h5" sx={{ fontSize: 28 }}>
<Typography
variant="h3"
sx={{
fontFamily: 'Lato',
fontWeight: 700,
fontSize: [24, 32],
letterSpacing: '0.04em',
lineHeight: ['29px', '38px'],
mt: [1, 2],
}}
>
{count}
</Typography>
</Box>
Expand Down
22 changes: 11 additions & 11 deletions src/components/common/CustomCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ const useStyles = makeStyles()((theme) => ({
flexDirection: 'row',
alignItems: 'center',
borderRadius: theme.spacing(2),
marginTop: theme.spacing(6),
marginBottom: theme.spacing(6),
cursor: 'pointer',
},
avatar: {
Expand Down Expand Up @@ -61,9 +59,7 @@ function CustomCard(props) {
: theme.palette.background.greenGradient,
}}
>
<CardMedia
sx={{ padding: { xs: theme.spacing(2), md: theme.spacing(4) } }}
>
<CardMedia sx={{ padding: [theme.spacing(4, 3), theme.spacing(6)] }}>
<Avatar
className={classes.avatar}
sx={{
Expand All @@ -77,14 +73,18 @@ function CustomCard(props) {
</Avatar>
</CardMedia>
<CardContent className={classes.cardContent}>
<Typography
variant="body1"
color="textSecondary"
sx={{ fontSize: { xs: 12, md: 16 } }}
>
<Typography variant="body1" color="textSecondary">
{title}
</Typography>
<Typography variant="h2" sx={{ fontSize: { xs: 16, sm: 24, md: 36 } }}>
<Typography
variant="h2"
sx={{
fontSize: [16, 36],
fontFamily: 'Lato',
lineHeight: ['19.2px', '43.2px'],
letterSpacing: ['0.02em', 0],
}}
>
{text}
</Typography>
</CardContent>
Expand Down
5 changes: 4 additions & 1 deletion src/components/common/DataTag.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ function DataTag({ data, location }) {
) : (
<CalendarToday sx={{ fontSize: '1.25rem' }} />
)}
<Typography variant="body1" sx={{ fontWeight: 700 }}>
<Typography
variant="body1"
sx={{ fontWeight: 700, lineHeight: ['16.8px', '22.5px'] }}
>
{!location && `Planter since`} {data}
</Typography>
</Stack>
Expand Down
11 changes: 11 additions & 0 deletions src/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,17 @@ const theme = createTheme(colorTheme, {
lineHeight: '14.4px',
},
},
body2: {
fontFamily: 'Lato',
fontSize: '20px',
lineHeight: '28px',
letterSpacing: '0.04em',
[colorTheme.breakpoints.down('md')]: {
fontSize: '16px',
lineHeight: '23.2px',
letterSpacing: '0.02em',
},
},
caption: {
fontFamily: 'Lato',
fontSize: '12px',
Expand Down

0 comments on commit 54269f8

Please sign in to comment.