Skip to content
Snippets Groups Projects
Commit 45e0d77f authored by esikkala's avatar esikkala
Browse files

Update main page config

parent 6b8cba9d
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,8 @@ import { getSpacing } from '../../../helpers/helpers'
* A component for generating a front page for a semantic portal.
*/
const Main = props => {
const { perspectives, screenSize } = props
const { perspectives, screenSize, layoutConfig } = props
const { mainPage } = layoutConfig
let headingVariant = 'h5'
let subheadingVariant = 'body1'
let descriptionVariant = 'body1'
......@@ -47,7 +48,6 @@ const Main = props => {
return (
<Box
sx={theme => {
const { layoutConfig } = props
const defaultHeightReduction = layoutConfig.topBar.defaultHeight +
layoutConfig.footer.defaultHeight + getSpacing(theme, 2)
const reducedHeightReduction = layoutConfig.topBar.reducedHeight +
......@@ -66,16 +66,16 @@ const Main = props => {
>
<Box
sx={theme => ({
background: props.layoutConfig.mainPage.bannerBackround,
background: mainPage.bannerBackround,
backgroundRepeat: 'no-repeat',
backgroundSize: 'cover',
backgroundPosition: 'center',
height: props.layoutConfig.mainPage.bannerMobileHeight,
height: mainPage.bannerMobileHeight,
[theme.breakpoints.up('md')]: {
height: props.layoutConfig.mainPage.bannerReducedHeight
height: mainPage.bannerReducedHeight
},
[theme.breakpoints.up('xl')]: {
height: props.layoutConfig.mainPage.bannerDefaultHeight
height: mainPage.bannerDefaultHeight
},
boxShadow: '0 -15px 15px 0px #bdbdbd inset',
display: 'flex',
......@@ -101,11 +101,13 @@ const Main = props => {
<Box
sx={theme => ({
marginTop: theme.spacing(1.5),
[theme.breakpoints.up('md')]: {
display: 'flex',
'& div': {
flexGrow: 1,
width: 0
...(mainPage.wrapSubheading) && {
[theme.breakpoints.up('md')]: {
display: 'flex',
'& div': {
flexGrow: 1,
width: 0
}
}
}
})}
......
......@@ -91,7 +91,8 @@
"bannerBackround": "linear-gradient( rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45) ), url(<BANNER_IMAGE_URL)",
"bannerMobileHeight": 150,
"bannerReducedHeight": 220,
"bannerDefaultHeight": 300
"bannerDefaultHeight": 300,
"wrapSubheading": true
},
"infoHeader": {
"default": {
......
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