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

Adjust perspective heights

parent d232aa22
No related branches found
No related tags found
No related merge requests found
...@@ -34,14 +34,14 @@ const FacetedSearchPerspective = props => { ...@@ -34,14 +34,14 @@ const FacetedSearchPerspective = props => {
height: `calc(100% - ${layoutConfig.topBar.reducedHeight + height: `calc(100% - ${layoutConfig.topBar.reducedHeight +
layoutConfig.infoHeader.reducedHeight.height + layoutConfig.infoHeader.reducedHeight.height +
layoutConfig.infoHeader.reducedHeight.expandedContentHeight + layoutConfig.infoHeader.reducedHeight.expandedContentHeight +
getSpacing(theme, 3.5) getSpacing(theme, 5.5)
}px)` }px)`
}, },
[theme.breakpoints.up(layoutConfig.reducedHeightBreakpoint)]: { [theme.breakpoints.up(layoutConfig.reducedHeightBreakpoint)]: {
height: `calc(100% - ${layoutConfig.topBar.defaultHeight + height: `calc(100% - ${layoutConfig.topBar.defaultHeight +
layoutConfig.infoHeader.default.height + layoutConfig.infoHeader.default.height +
layoutConfig.infoHeader.default.expandedContentHeight + layoutConfig.infoHeader.default.expandedContentHeight +
getSpacing(theme, 3.5) getSpacing(theme, 4.5)
}px)` }px)`
} }
} }
...@@ -115,7 +115,7 @@ const FacetedSearchPerspective = props => { ...@@ -115,7 +115,7 @@ const FacetedSearchPerspective = props => {
sx={theme => ({ sx={theme => ({
height: 'auto', height: 'auto',
[theme.breakpoints.up(props.layoutConfig.hundredPercentHeightBreakPoint)]: { [theme.breakpoints.up(props.layoutConfig.hundredPercentHeightBreakPoint)]: {
height: `calc(100% - ${getSpacing(theme, 0.5)}px)` height: '100%'
}, },
paddingTop: '0px !important', paddingTop: '0px !important',
paddingBottom: '0px !important', paddingBottom: '0px !important',
......
...@@ -32,32 +32,7 @@ const useStyles = makeStyles(theme => ({ ...@@ -32,32 +32,7 @@ const useStyles = makeStyles(theme => ({
overflow: 'auto' overflow: 'auto'
}, },
expandedContent: props => ({ expandedContent: props => ({
'& p, ul': {
fontSize: '0.875rem !important',
...theme.typography.body1
},
'& h6': {
...theme.typography.h6,
marginTop: 0,
marginBottom: 0
},
'& p:first-child': {
marginTop: 0
},
height: props.layoutConfig.infoHeader.reducedHeight.expandedContentHeight,
[theme.breakpoints.up(props.layoutConfig.reducedHeightBreakpoint)]: {
height: props.layoutConfig.infoHeader.default.expandedContentHeight,
'& p, & ul': {
fontSize: '1rem',
...theme.typography.body1
}
},
paddingTop: 0,
paddingLeft: theme.spacing(1),
paddingBottom: theme.spacing(1),
marginBottom: theme.spacing(1),
overflow: 'auto',
display: 'block'
}) })
})) }))
...@@ -175,7 +150,36 @@ const InfoHeader = props => { ...@@ -175,7 +150,36 @@ const InfoHeader = props => {
{generateLabel()} {generateLabel()}
</Typography>} </Typography>}
</AccordionSummary> </AccordionSummary>
<AccordionDetails className={classes.expandedContent}> <AccordionDetails
// className={classes.expandedContent}
sx={theme => ({
paddingTop: 0,
paddingLeft: theme.spacing(1),
paddingBottom: theme.spacing(1),
marginBottom: theme.spacing(0),
height: props.layoutConfig.infoHeader.reducedHeight.expandedContentHeight,
overflow: 'auto',
display: 'block',
'& p, & ul': {
...theme.typography.body1,
fontSize: '0.8rem'
},
'& h6': {
...theme.typography.h6,
marginTop: 0,
marginBottom: 0
},
'& p:first-of-type': {
marginTop: 0
},
[theme.breakpoints.up(props.layoutConfig.reducedHeightBreakpoint)]: {
height: props.layoutConfig.infoHeader.default.expandedContentHeight,
'& p, & ul': {
fontSize: '1rem !important;'
}
}
})}
>
{props.pageType === 'facetResults' && intl.getHTML(`perspectives.${props.resultClass}.longDescription`)} {props.pageType === 'facetResults' && intl.getHTML(`perspectives.${props.resultClass}.longDescription`)}
{props.pageType === 'instancePage' && {props.pageType === 'instancePage' &&
<> <>
......
...@@ -35,14 +35,14 @@ const InstancePagePerspective = props => { ...@@ -35,14 +35,14 @@ const InstancePagePerspective = props => {
height: `calc(100% - ${layoutConfig.topBar.reducedHeight + height: `calc(100% - ${layoutConfig.topBar.reducedHeight +
2 * layoutConfig.infoHeader.reducedHeight.height + 2 * layoutConfig.infoHeader.reducedHeight.height +
layoutConfig.infoHeader.reducedHeight.expandedContentHeight + layoutConfig.infoHeader.reducedHeight.expandedContentHeight +
getSpacing(theme, 2.5) getSpacing(theme, 1.5)
}px)` }px)`
}, },
[theme.breakpoints.up(layoutConfig.reducedHeightBreakpoint)]: { [theme.breakpoints.up(layoutConfig.reducedHeightBreakpoint)]: {
height: `calc(100% - ${layoutConfig.topBar.defaultHeight + height: `calc(100% - ${layoutConfig.topBar.defaultHeight +
2 * layoutConfig.infoHeader.default.height + 2 * layoutConfig.infoHeader.default.height +
layoutConfig.infoHeader.default.expandedContentHeight + layoutConfig.infoHeader.default.expandedContentHeight +
getSpacing(theme, 1.5) getSpacing(theme, 0.5)
}px)` }px)`
} }
} }
......
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