Skip to content

Commit

Permalink
Updated footer with extra column and text
Browse files Browse the repository at this point in the history
  • Loading branch information
akeldamas committed Oct 20, 2023
1 parent 1e2384b commit e0036f5
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
15 changes: 14 additions & 1 deletion apps/rda/src/config/footer.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Footer } from '@dans-framework/layout/src/types';
import rdaImage from './images/logo_tiger.png';

const footer = {
const footer: Footer = {
top: [
{
header: {
Expand Down Expand Up @@ -103,6 +104,18 @@ const footer = {
}
]
},
{
header: "RDA Tiger",
freetext: {
en: "The RDA Tiger Project is supporting the use of this application through engagement with RDA Groups and members."
},
links: [
{
name: "Contact RDA TIGER",
link: "",
}
]
},
{
image: {
src: rdaImage,
Expand Down
14 changes: 7 additions & 7 deletions packages/layout/src/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const Footer = ({top, bottom}: FooterType) => {
}}
>
<Container>
<Grid container columns={4} spacing={2}>
<Grid container columns={5} spacing={2}>
{top.map( (item, i) =>
<Grid xs={4} sm={2} md={1} key={`footer-${i}`}>
<FooterContent {...item} />
Expand Down Expand Up @@ -64,6 +64,12 @@ const FooterContent = ({ header, links, freetext, image }: FooterContent) => {
{header &&
<Typography variant="h6">{lookupLanguageString(header, i18n.language)}</Typography>
}
{image && <img src={image.src} alt={image.alt} />}
{freetext &&
<Box sx={{a: {color: 'primary.main', textDecoration: 'none'}}}>
{parse(lookupLanguageString(freetext, i18n.language) || '')}
</Box>
}
{links && links.map( (link, j) =>
<Link href={link.link} underline="none" target="_blank" key={`link-${j}`} sx={{ display: 'flex', alignItems: 'center'}}>
{link.icon && link.icon === 'twitter' && <TwitterIcon sx={{mr: 1}} fontSize="small" />}
Expand All @@ -72,12 +78,6 @@ const FooterContent = ({ header, links, freetext, image }: FooterContent) => {
{lookupLanguageString(link.name, i18n.language)}
</Link>
)}
{image && <img src={image.src} alt={image.alt} />}
{freetext &&
<Box sx={{a: {color: 'primary.main', textDecoration: 'none'}}}>
{parse(lookupLanguageString(freetext, i18n.language) || '')}
</Box>
}
</Stack>
);
}
Expand Down

0 comments on commit e0036f5

Please sign in to comment.