diff --git a/src/client/components/perspectives/sampo/Main.js b/src/client/components/perspectives/sampo/Main.js index 56db65f0af0c1f00990609dd13ea8b22a175a7af..6210ed970427e271f1e8b519d3f73bca451aa9ea 100644 --- a/src/client/components/perspectives/sampo/Main.js +++ b/src/client/components/perspectives/sampo/Main.js @@ -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 + } } } })} diff --git a/src/configs/portalConfig.json b/src/configs/portalConfig.json index 6618e1812715cee957a6aa32d3be84c9ac2c4bc9..d680ae912b23cf02304330bd24930c43b1b08093 100644 --- a/src/configs/portalConfig.json +++ b/src/configs/portalConfig.json @@ -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": {