Commit 50b20d88 authored by Matija Obreza's avatar Matija Obreza
Browse files

Using Markdown for titles

- Descriptor title: basic
- Cards: descriptions use firstParagraph
parent 07eee292
Pipeline #6818 passed with stages
in 7 minutes and 36 seconds
......@@ -144,7 +144,7 @@ class DisplayPage extends React.Component<IDisplayPageProps, any> {
<Grid container spacing={ 0 } className="p-10 back-gray">
<Grid item xs={ 12 } className="p-10">
<Card square>
<CardHeader title={ descriptor.title } />
<CardHeader title={ <Markdown basic source={ descriptor.title } /> } />
<CardContent>
{ descriptor.state !== PublishState.PUBLISHED && <h2>This descriptor is not yet published!</h2> }
{ descriptor.key && <h2>This descriptor is a key descriptor for access and utilization of PGR.</h2> }
......
......@@ -175,12 +175,12 @@ const DescriptorCard = ({complete = true, compact, descriptor, classes, classNam
<Card className={ `${className}` } square>
<CardHeader
title={ descriptor.uuid ?
<DescriptorLink to={ descriptor }>{ descriptor.title || 'Untitled' }</DescriptorLink>
<DescriptorLink to={ descriptor }><Markdown basic source={ descriptor.title || 'Untitled' } /></DescriptorLink>
: <Markdown basic source={ descriptor.title } /> || 'Untitled'
}
/>
<CardContent>
{ descriptor.description && <Markdown className="mb-20" rows={ displayPref.textRows } source={ descriptor.description }/> }
{ descriptor.description && <Markdown className="mb-20" firstParagraph source={ descriptor.description }/> }
{ descriptor.key && <div className="font-bold">This is a key descriptor for access and utilization of PGR.</div> }
<Grid container spacing={ 0 }>
<Grid item xs={ 12 }>
......
......@@ -72,7 +72,7 @@ class PartnerCard extends React.Component<IPartnerCardProps, any> {
subheader={ partner.createdDate && <span>Registered <PrettyDate value={ partner.createdDate } /></span> }
/>
<CardContent>
{ partner.description && <Markdown rows={ 3 } source={ partner.description } /> }
{ partner.description && <Markdown firstParagraph source={ partner.description } /> }
</CardContent>
</Card>
);
......
......@@ -12,7 +12,7 @@ const VocabularyCard = ({vocabulary, className = '', textRows = 2, t}: { vocabul
<CardHeader title={ <Link to={ `/vocabulary/${vocabulary.uuid}` }>{ vocabulary.title }</Link> } />
{ vocabulary.description &&
<CardContent>
<Markdown rows={ textRows } source={ vocabulary.description } />
<Markdown firstParagraph source={ vocabulary.description } />
</CardContent>
}
<CardActions>
......
Markdown is supported
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