Skip to content
Snippets Groups Projects
Commit a25a2d0c authored by Jonas Braathen's avatar Jonas Braathen
Browse files

Change title and description, make app title link to the front page

parent f69514cb
No related branches found
No related tags found
1 merge request!62Various smaller changes
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
}, },
"fnr": "National identity number", "fnr": "National identity number",
"header": { "header": {
"applicationTitleShort": "GREG", "applicationTitle": "Guest Registration",
"applicationTitleLong": "Guest Registration", "applicationDescription": "Registration service for guests",
"selectLanguage": "Select language" "selectLanguage": "Select language"
}, },
"loading": "Loading...", "loading": "Loading...",
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
}, },
"fnr": "Fødselsnummer", "fnr": "Fødselsnummer",
"header":{ "header":{
"applicationTitleShort": "GREG", "applicationTitle": "Gjesteregistrering",
"applicationTitleLong": "Gjesteregistrering", "applicationDescription": "Registreringstjeneste for gjester",
"selectLanguage": "Velg språk" "selectLanguage": "Velg språk"
}, },
"loading": "Laster...", "loading": "Laster...",
......
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
}, },
"fnr": "National identity number", "fnr": "National identity number",
"header":{ "header":{
"applicationTitleShort": "GREG", "applicationTitle": "Gjesteregistrering",
"applicationTitleLong": "Gjesteregistrering", "applicationDescription": "Registreringsteneste for gjester",
"selectLanguage": "Velg språk" "selectLanguage": "Velg språk"
}, },
"loading": "Lastar...", "loading": "Lastar...",
......
import React from 'react' import React from 'react'
import { Link } from 'react-router-dom'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import LogoBar from '../../components/logobars/LogoBar' import LogoBar from '../../components/logobars/LogoBar'
import LanguageSelector from '../../components/languageselector' import LanguageSelector from '../../components/languageselector'
const MainWrapper = styled.div` const MainWrapper = styled.div`
color: ${({ theme }) => theme.page.headerColor}; color: ${({ theme }) => theme.page.headerColor};
background-color: ${({ theme }) => theme.page.headerBackgroundColor}; background-color: ${({ theme }) => theme.page.headerBackgroundColor};
...@@ -14,8 +14,9 @@ const Main = styled.div` ...@@ -14,8 +14,9 @@ const Main = styled.div`
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin: 0 auto; margin: 0 auto;
max-width: ${props => props.theme.appMaxWidth}; max-width: ${(props) => props.theme.appMaxWidth};
padding: ${props => `0.5rem ${props.theme.horizontalPadding} 1rem ${props.theme.horizontalPadding}`}; padding: ${(props) =>
`0.5rem ${props.theme.horizontalPadding} 1rem ${props.theme.horizontalPadding}`};
` `
const Menu = styled.ul` const Menu = styled.ul`
...@@ -33,15 +34,15 @@ const TitleBox = styled.div` ...@@ -33,15 +34,15 @@ const TitleBox = styled.div`
padding-left: 3rem; padding-left: 3rem;
` `
const ShortTitle = styled.div` const Title = styled.div`
font-size: 2rem; font-size: 2rem;
` `
const LongTitle = styled.div` const Description = styled.div`
font-size: 1rem; font-size: 1rem;
` `
function Header() { const Header = () => {
const { t } = useTranslation('common') const { t } = useTranslation('common')
return ( return (
...@@ -50,12 +51,14 @@ function Header() { ...@@ -50,12 +51,14 @@ function Header() {
<MainWrapper> <MainWrapper>
<Main> <Main>
<TitleBox> <TitleBox>
<ShortTitle>{t('header.applicationTitleShort')}</ShortTitle> <Link to="/">
<LongTitle>{t('header.applicationTitleLong')}</LongTitle> <Title>{t('header.applicationTitle')}</Title>
</Link>
<Description>{t('header.applicationDescription')}</Description>
</TitleBox> </TitleBox>
<Menu> <Menu>
<MenuItem> <MenuItem>
<LanguageSelector/> <LanguageSelector />
</MenuItem> </MenuItem>
</Menu> </Menu>
</Main> </Main>
......
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