Skip to content
Snippets Groups Projects
Commit a58d255c authored by Sivert Kronen Hatteberg's avatar Sivert Kronen Hatteberg
Browse files

New footer

parent dbe6db61
No related branches found
No related tags found
1 merge request!174Updated header and footer
{ {
"footerInfo": "This is a footer namespace value", "applicationTitle": "Guest Service",
"contactSectionHeader": "Need help?", "link": {
"contactHelp": "Contact", "terms": {
"contactHelpMail": "Contact", "header": "TERMS",
"responsibleOrganizationHeader": "Maintained by" "ITRules": "IT Rules",
"privacy": "Privacy Policy"
},
"help": {
"header": "HELP AND CONTACT",
"contact": "Contact Helpdesk",
"doc": "Documentation"
},
"responsibleOrganization": {
"header": "RESPONSIBLE FOR THIS SERVICE"
}
}
} }
{ {
"footerInfo": "Verdi i namespace footer", "applicationTitle": "Gjestetjenesten",
"contactSectionHeader": "Trenger du hjelp?", "link": {
"contactHelp": "Kontakt", "terms": {
"contactHelpMail": "Kontaktveileder", "header": "VILKÅR",
"responsibleOrganizationHeader": "Ansvarlig for denne tjenesten" "ITRules": "IT-Reglementet",
"privacy": "Personvern"
},
"help": {
"header": "HJELP OG KONTAKT",
"contact": "Kontakt helpdesk",
"doc": "Dokumentasjon"
},
"responsibleOrganization": {
"header": "ANSVARLIG FOR DENNE TJENESTEN"
}
}
} }
{ {
"footerInfo": "Verdi i namespace footer", "applicationTitle": "Gjestetjenesten",
"contactSectionHeader": "Treng du hjelp?", "link": {
"contactHelp": "Kontakt", "terms": {
"contactHelpMail": "Kontaktrettleiar", "header": "VILKÅR",
"responsibleOrganizationHeader": "Ansvarleg for denne tenesta" "ITRules": "IT-Reglementet",
"privacy": "Personvern"
},
"help": {
"header": "HJELP OG KONTAKT",
"contact": "Kontakt helpdesk",
"doc": "Dokumentasjon"
},
"responsibleOrganization": {
"header": "ANSVARLEG FOR DENNE TJENESTA"
}
}
} }
declare global { declare global {
/* tslint:disable */ /* tslint:disable */
interface Window { interface Window {
ENV: any ENV: any
} }
} }
/* Locate the client environment */ /* Locate the client environment */
...@@ -21,14 +21,25 @@ export const appInst: string = env.REACT_APP_INST as string ...@@ -21,14 +21,25 @@ export const appInst: string = env.REACT_APP_INST as string
/* Theming */ /* Theming */
export const appTheme: string = env.REACT_APP_THEME export const appTheme: string = env.REACT_APP_THEME
? (env.REACT_APP_THEME as string) ? (env.REACT_APP_THEME as string)
: 'default' : 'default'
/* Show warning in the footer about this being a staging/test system */ /* Show warning in the footer about this being a staging/test system */
export const appStagingWarning: boolean = export const appStagingWarning: boolean =
env.REACT_APP_STAGING_WARNING === 'true' env.REACT_APP_STAGING_WARNING === 'true'
/* Footer content */ /* Footer content */
export const appTechnicalSupportLink: string = env.REACT_APP_SUPPORT_URL as string export const appTechnicalSupportLink: string =
export const reponsibleOrganization: string = env.REACT_APP_RESPONSIBLE_ORGANIZATION as string env.REACT_APP_SUPPORT_URL as string
export const responsibleOrganizationLink: string = env.REACT_APP_RESPONSIBLE_ORGANIZATION_LINK as string export const responsibleOrganization: string =
env.REACT_APP_RESPONSIBLE_ORGANIZATION as string
export const responsibleOrganizationLink: string =
env.REACT_APP_RESPONSIBLE_ORGANIZATION_LINK as string
export const ITRulesLink: string = env.REACT_APP_IT_RULES_LINK as string
export const privacyPolicyLink: string =
env.REACT_APP_PRIVACY_POLICY_LINK as string
export const helpLink: string = env.REACT_APP_HELP_LINK as string
export const documentationLink: string =
env.REACT_APP_DOCUMENTATION_LINK as string
import React from 'react'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { styled } from '@mui/material/styles' import { styled } from '@mui/material/styles'
import { Link } from '@mui/material' import { Link } from '@mui/material'
import { reponsibleOrganization, responsibleOrganizationLink } from 'appConfig' import {
responsibleOrganization,
responsibleOrganizationLink,
ITRulesLink,
privacyPolicyLink,
helpLink,
documentationLink,
} from 'appConfig'
import { getFooterLogo } from './logos' import { getFooterLogo } from './logos'
const FooterWrapper = styled('footer')(({ theme }) => ({ const FooterWrapper = styled('footer')({
background: theme.palette.primary.main,
height: 'fit-content', height: 'fit-content',
padding: '0rem 3.5rem', padding: '0',
marginTop: 'auto', marginTop: 'auto',
})
const InfoSection = styled('div')(({ theme }) => ({
display: 'flex',
flexDirection: 'column',
background: theme.greg.footerLinkBgColor,
padding: '2rem 2rem 4rem 2rem',
})) }))
const FooterSection = styled('section')({ const FooterHeader = styled('div')({
paddingLeft: '1rem', fontSize: '2rem',
color: 'white',
padding: '1rem 0 2rem 0',
}) })
const ContentContainer = styled('div')(({ theme }) => ({ const LinkContainer = styled('div')({
display: 'flex',
justifyContent: 'space-between',
})
const LinkSection = styled('div')({
display: 'flex',
flexDirection: 'column',
color: 'white',
fontSize: '1rem',
})
const LinkHeader = styled('div')({
fontSize: '0.8rem',
marginBottom: '0.5rem',
})
const LogoSection = styled('div')(({ theme }) => ({
background: theme.palette.primary.main,
fontSize: '1.5rem', fontSize: '1.5rem',
color: theme.palette.primary.main, color: theme.palette.primary.main,
display: 'flex', display: 'flex',
flexWrap: 'nowrap', flexWrap: 'nowrap',
justifyContent: 'space-between', justifyContent: 'space-between',
padding: '1rem 0rem 1rem 0', padding: '1rem 0 1rem 2rem',
})) }))
const LogoContainer = styled('div')({ const LogoContainer = styled('div')({
maxWidth: '30rem', maxWidth: '15rem',
minWidth: '20rem', minWidth: '10rem',
})
const FooterHeader = styled('div')({
fontsize: '1rem',
}) })
const Footer: React.FunctionComponent = () => { function Footer() {
const { t } = useTranslation(['common', 'footer']) const { t } = useTranslation(['common', 'footer'])
return ( return (
<FooterWrapper> <FooterWrapper>
<ContentContainer> <InfoSection>
<FooterSection> <FooterHeader>{t('footer:applicationTitle')}</FooterHeader>
<LogoContainer>{getFooterLogo()}</LogoContainer>
</FooterSection> <LinkContainer>
<LinkSection>
<LinkHeader>{t('footer:link.terms.header')}</LinkHeader>
<Link href={ITRulesLink} sx={{ color: 'white' }}>
{t('footer:link.terms.ITRules')}
</Link>
<Link href={privacyPolicyLink} sx={{ color: 'white' }}>
{t('footer:link.terms.privacy')}
</Link>
</LinkSection>
<LinkSection>
<LinkHeader>{t('footer:link.help.header')}</LinkHeader>
<Link href={helpLink} sx={{ color: 'white' }}>
{t('footer:link.help.contact')}
</Link>
<Link href={documentationLink} sx={{ color: 'white' }}>
{t('footer:link.help.doc')}
</Link>
</LinkSection>
<FooterSection sx={{ paddingTop: '1rem' }}> <LinkSection>
<FooterHeader> <LinkHeader>
{t('footer:responsibleOrganizationHeader')} {t('footer:link.responsibleOrganization.header')}
</FooterHeader> </LinkHeader>
<Link <Link href={responsibleOrganizationLink} sx={{ color: 'white' }}>
href={responsibleOrganizationLink} {responsibleOrganization}
sx={{ color: 'white', fontSize: '1rem' }} </Link>
> </LinkSection>
{reponsibleOrganization} </LinkContainer>
</Link> </InfoSection>
</FooterSection> <LogoSection>
</ContentContainer> <LogoContainer>{getFooterLogo()}</LogoContainer>
</LogoSection>
</FooterWrapper> </FooterWrapper>
) )
} }
......
...@@ -14,6 +14,7 @@ declare module '@mui/material/styles' { ...@@ -14,6 +14,7 @@ declare module '@mui/material/styles' {
appMaxWidth: string appMaxWidth: string
deactivatedColor: string deactivatedColor: string
textWhite: string textWhite: string
footerLinkBgColor: string
} }
} }
...@@ -24,6 +25,7 @@ declare module '@mui/material/styles' { ...@@ -24,6 +25,7 @@ declare module '@mui/material/styles' {
appMaxWidth?: string appMaxWidth?: string
deactivatedColor?: string deactivatedColor?: string
textWhite?: string textWhite?: string
footerLinkBgColor?: string
} }
} }
} }
......
...@@ -8,6 +8,7 @@ const mainTheme: ThemeOptions = { ...@@ -8,6 +8,7 @@ const mainTheme: ThemeOptions = {
appMaxWidth: '110rem', appMaxWidth: '110rem',
deactivatedColor: '#C9C9C9', deactivatedColor: '#C9C9C9',
textWhite: 'white', textWhite: 'white',
footerLinkBgColor: '#202020', // Move to theme if UiB wants a different color
}, },
// No palette section defined here, it is up to the different institutions to define colours that override the default ones from Material UI // No palette section defined here, it is up to the different institutions to define colours that override the default ones from Material UI
components: { components: {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment