Verified Commit bf0ea395 authored by Sandro Lutz's avatar Sandro Lutz
Browse files

Improve teams page

parent a433fedd
......@@ -120,10 +120,26 @@ const Image = ({
)
}
if (type === 'fluid') {
return <Img className={className} fluid={src} alt={alt} {...props} />
return (
<Img
className={[classes.root, className].join(' ')}
style={{ paddingBottom: `${ratio}%` }}
fluid={src}
alt={alt}
{...props}
/>
)
}
if (type === 'fixed') {
return <Img className={className} fixed={src} alt={alt} {...props} />
return (
<Img
className={[classes.root, className].join(' ')}
style={{ paddingBottom: `${ratio}%` }}
fixed={src}
alt={alt}
{...props}
/>
)
}
return null
}
......
......@@ -12,6 +12,7 @@ const TranslatedContent = ({
parseMarkdown,
noEscape,
noHint,
typographyProps,
...props
}) => {
const intl = useIntl()
......@@ -41,6 +42,7 @@ const TranslatedContent = ({
<div {...props}>
{!noHint && hint}
<Typography
{...typographyProps}
dangerouslySetInnerHTML={{
__html: parseMarkdown && message ? marked(message) : message,
}}
......@@ -50,6 +52,8 @@ const TranslatedContent = ({
}
TranslatedContent.propTypes = {
/** Additional properties for the typography child component */
typographyProps: PropTypes.object,
/** Content for all available languages */
content: PropTypes.object.isRequired,
/** Specifies to parse markdown */
......@@ -68,4 +72,8 @@ TranslatedContent.propTypes = {
noHint: PropTypes.bool,
}
TranslatedContent.defaultProps = {
typographyProps: {},
}
export default TranslatedContent
......@@ -73,12 +73,13 @@ const TeamCard = ({ team, className, ...props }) => {
<TranslatedContent
className={classes.description}
content={team.description}
parseMarkdown
/>
</CardContent>
<CardActions className={classes.actionArea}>
{team.contact &&
team.contact.map((item, index) => {
const isMultiLangLabel = item.label && !('_' in item.label)
const isMultiLangLabel = item.label && item.label._ === null
const ItemIcon = contactIconMapping[item.icon]
return (
<a
......@@ -96,7 +97,7 @@ const TeamCard = ({ team, className, ...props }) => {
content={item.label}
/>
) : (
<Typography className={classes.actionLabel} variant="body2">
<Typography className={classes.actionLabel} variant="body1">
{item.label._}
</Typography>
)}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment