Skip to content

Commit

Permalink
[DEV-1278]: uniform footer (#606)
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeAtUqido authored Feb 9, 2024
1 parent 0c33e93 commit 013a47f
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 11 deletions.
5 changes: 5 additions & 0 deletions .changeset/neat-experts-wave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"nextjs-website": patch
---

[DEV-1278]: uniform footer design
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import TimerSharp from '@mui/icons-material/TimerSharp';
import TrendingUp from '@mui/icons-material/TrendingUp';
import Twitter from '@mui/icons-material/Twitter';
import VpnKey from '@mui/icons-material/VpnKey';
import { MediumIcon } from '@pagopa/mui-italia/dist/icons/MediumIcon';

export const ICON_MAP = {
AccountBalance: AccountBalance,
Expand All @@ -37,6 +38,7 @@ export const ICON_MAP = {
LinkedIn: LinkedIn,
LiveHelp: LiveHelp,
MarkEmailRead: MarkEmailRead,
Medium: MediumIcon,
MenuBook: MenuBook,
MessageRounded: MessageRounded,
Payment: Payment,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ type IconName = keyof typeof ICON_MAP;
const IconWrapper = ({
icon,
isSvg = false,
color = 'primary.main',
size = 40,
color = 'text.primary',
size = 35,
}: IconWrapperProps) => {
if (isSvg) {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ const SiteFooter = ({
href: 'https://www.instagram.com/pagopaspa/',
icon: 'Instagram',
},
{
href: 'https://medium.com/pagopa-spa',
icon: 'Medium',
},
],
links: [
{
Expand Down Expand Up @@ -161,6 +165,7 @@ const SiteFooter = ({

const legalInfo = t.rich('legalInfo', {
strong: (chunks) => <strong>{chunks}</strong>,
br: () => <br></br>,
}) as string;

const cookiePreferenceLink: FooterLinksType = {
Expand Down
18 changes: 11 additions & 7 deletions apps/nextjs-website/src/editorialComponents/Footer/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Box, Container } from '@mui/material';
import { Box, Container, Stack } from '@mui/material';
import { FundedByNextGenerationEU } from '@/editorialComponents/FundedByNextGenerationEU';
import { type Generic } from '../types/components';
import { FooterColumn } from './components/FooterColumn';
Expand Down Expand Up @@ -28,14 +28,15 @@ export const Footer = ({
borderColor='divider'
borderTop='1px'
component='footer'
px={{ xs: 2, sm: 4, md: 8 }}
px={{ xs: 2, sm: 4, md: 20 }}
sx={{ backgroundColor: 'background.paper' }}
>
<Container
maxWidth={false}
sx={{
py: 8,
display: 'flex',
alignItems: 'stretch',
justifyContent: 'space-between',
flexDirection: { xs: 'column', sm: 'row' },
gap: 4,
Expand All @@ -48,12 +49,15 @@ export const Footer = ({
display='flex'
flexDirection='column'
alignItems={{ sm: 'flex-start', xs: 'center' }}
justifyContent='space-between'
>
<FooterColumn
data={followUs}
icons={followUs.socialLinks as FooterColumnIcon[]}
/>
{!!langProps?.languages?.length && <LangSwitch {...langProps} />}
<Stack display='flex' alignItems={{ xs: 'center', sm: 'start' }}>
<FooterColumn
data={followUs}
icons={followUs.socialLinks as FooterColumnIcon[]}
/>
{!!langProps?.languages?.length && <LangSwitch {...langProps} />}
</Stack>
{showFundedByNextGenerationEULogo && (
<FundedByNextGenerationEU size={180} />
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ export const FooterColumn = ({
icons,
}: FooterColumnProps) => (
<Stack spacing={2} display='flex' alignItems={{ xs: 'center', sm: 'start' }}>
{data?.title && <Typography variant='overline'>{data.title}</Typography>}
{data?.title && (
<Typography variant='overline' fontSize='body2.fontSize'>
{data.title}
</Typography>
)}

{companyLink && (
<LinkMui
Expand Down Expand Up @@ -67,6 +71,7 @@ export const FooterColumn = ({
<li key={i}>
<LinkMui
aria-label={ariaLabel}
fontSize='body2.fontSize'
component={'a'}
href={href}
onClick={onClick}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export const FundedByNextGenerationEU = ({
role='img'
aria-labelledby='logo-next-genEU-titleID'
sx={{
mt: { xs: 5 },
width: size,
/* If the color variant is set,
the following property is ignored */
Expand Down
2 changes: 1 addition & 1 deletion apps/nextjs-website/src/messages/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@
"languages": {
"it": "Italiano"
},
"legalInfo": "<strong>PagoPA S.p.A.</strong> - Società per azioni con socio unico - Capitale sociale di euro 1,000,000 interamente versato - Sede legale in Roma, Piazza Colonna 370, <br />CAP 00187 - N. di iscrizione a Registro Imprese di Roma, CF e P.IVA 15376371009",
"legalInfo": "<strong>PagoPA S.p.A.</strong> - Società per azioni con socio unico - Capitale sociale di euro 1,000,000 interamente versato - Sede legale in Roma, Piazza Colonna 370, <br></br>CAP 00187 - N. di iscrizione a Registro Imprese di Roma, CF e P.IVA 15376371009",
"followUs": {
"links": {
"accessibility": {
Expand Down

0 comments on commit 013a47f

Please sign in to comment.