-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Migrate Footer styles * Update footer links * Remove unused translations from footer, fix footer links * Add title abobe footer link groups * Update footer links * Fix footer links translations * Fix translation typo * Style footer titles * Fix responsive styles for Footer
- Loading branch information
1 parent
267d257
commit 810a26c
Showing
10 changed files
with
243 additions
and
174 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
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
This file was deleted.
Oops, something went wrong.
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,61 @@ | ||
import { Container, Grid, lighten, Typography } from '@mui/material' | ||
import { styled } from '@mui/system' | ||
|
||
import theme from 'common/theme' | ||
|
||
export const Root = styled(Container)(() => ({ | ||
display: 'flex', | ||
justifyContent: 'center', | ||
textAlign: 'left', | ||
backgroundColor: theme.palette.primary.dark, | ||
color: lighten(theme.palette.primary.main, 0.75), | ||
|
||
'& a': { | ||
color: lighten(theme.palette.primary.main, 0.75), | ||
|
||
'&:hover': { | ||
color: lighten(theme.palette.primary.main, 0.55), | ||
}, | ||
}, | ||
})) | ||
|
||
export const FooterWrapper = styled(Grid)(() => ({ | ||
margin: theme.spacing(5), | ||
})) | ||
|
||
export const FooterLinksWrapper = styled(Grid)(() => ({ | ||
margin: theme.spacing(6, 0, 3, 0), | ||
|
||
[theme.breakpoints.up('sm')]: { | ||
marginTop: 0, | ||
}, | ||
|
||
[theme.breakpoints.up('md')]: { | ||
display: 'inline-flex', | ||
gap: theme.spacing(1), | ||
}, | ||
})) | ||
|
||
export const FooterLinkTitle = styled(Typography)(() => ({ | ||
fontWeight: 600, | ||
fontSize: theme.typography.pxToRem(16), | ||
marginBottom: theme.spacing(1), | ||
paddingBottom: theme.spacing(0.5), | ||
width: 'fit-content', | ||
borderBottom: `2px solid ${lighten(theme.palette.primary.main, 0.4)}`, | ||
})) | ||
|
||
export const FooterLink = styled(Grid)(() => ({ | ||
padding: theme.spacing(0.5, 0), | ||
})) | ||
|
||
export const Copyright = styled(Grid)(() => ({ | ||
borderTop: `2px solid ${lighten(theme.palette.primary.main, 0.4)}`, | ||
paddingTop: theme.spacing(3), | ||
})) | ||
|
||
export const SocialIconsWrapper = styled(Grid)(() => ({ | ||
display: 'flex', | ||
gap: theme.spacing(1), | ||
marginTop: theme.spacing(2), | ||
})) |
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,22 @@ | ||
import { useTranslation } from 'next-i18next' | ||
|
||
import { LogoSocialIcons } from './LogoSocialIcons' | ||
import { FooterLinks } from './FooterLinks' | ||
|
||
import { Copyright, FooterWrapper, Root } from './Footer.styled' | ||
|
||
export default function Footer() { | ||
const { t } = useTranslation() | ||
|
||
return ( | ||
<Root maxWidth={false} disableGutters> | ||
<FooterWrapper container maxWidth="xl"> | ||
<LogoSocialIcons /> | ||
<FooterLinks /> | ||
<Copyright item xs={12}> | ||
{t('components.footer.copyrights')} | ||
</Copyright> | ||
</FooterWrapper> | ||
</Root> | ||
) | ||
} |
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,34 @@ | ||
import { useTranslation } from 'next-i18next' | ||
import Link from 'next/link' | ||
|
||
import { Grid } from '@mui/material' | ||
|
||
import ExternalLink from 'components/common/ExternalLink' | ||
import { footerLinks } from './helpers/FooterData' | ||
|
||
import { FooterLink, FooterLinksWrapper, FooterLinkTitle } from './Footer.styled' | ||
|
||
export const FooterLinks = () => { | ||
const { t } = useTranslation() | ||
|
||
return ( | ||
<FooterLinksWrapper item xs={12} sm={4} md={7}> | ||
{footerLinks.map((data, index) => ( | ||
<Grid container key={index} item xs={12} md={3} direction="column" mb={3}> | ||
<FooterLinkTitle>{t(data.title)}</FooterLinkTitle> | ||
{data.links.map(({ label, href, external }, linkIndex) => ( | ||
<FooterLink key={linkIndex}> | ||
{external ? ( | ||
<ExternalLink href={href}>{t(label)}</ExternalLink> | ||
) : ( | ||
<Link href={href}> | ||
<a>{t(label)}</a> | ||
</Link> | ||
)} | ||
</FooterLink> | ||
))} | ||
</Grid> | ||
))} | ||
</FooterLinksWrapper> | ||
) | ||
} |
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,25 @@ | ||
import Link from 'next/link' | ||
import { useRouter } from 'next/router' | ||
|
||
import { Grid } from '@mui/material' | ||
|
||
import { routes } from 'common/routes' | ||
import PodkrepiLogo from 'components/brand/PodkrepiLogo' | ||
import { SocialIcons } from './SocialIcons' | ||
|
||
export const LogoSocialIcons = () => { | ||
const { locale } = useRouter() | ||
|
||
return ( | ||
<Grid item xs={12} sm={8} md={5} container direction="column"> | ||
<Grid item> | ||
<Link href={routes.index}> | ||
<a> | ||
<PodkrepiLogo locale={locale} size="large" variant="fixed" /> | ||
</a> | ||
</Link> | ||
</Grid> | ||
<SocialIcons /> | ||
</Grid> | ||
) | ||
} |
Oops, something went wrong.