mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-12 13:28:36 +03:00
show full text in cards, hide dynamic fields
This commit is contained in:
@@ -129,24 +129,29 @@ class Card extends React.Component {
|
||||
renderHeader() {
|
||||
return (
|
||||
<div className="card-collapsed">
|
||||
<div className="card-row">
|
||||
<div className="card-column">
|
||||
{this.renderTimestamp()}
|
||||
{this.renderLocation()}
|
||||
</div>
|
||||
{this.renderCategory()}
|
||||
{/* {this.renderCategory()} */}
|
||||
<br/>
|
||||
{this.renderSummary()}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
renderContent() {
|
||||
return (
|
||||
<div className="card-bottomhalf">
|
||||
{this.renderTags()}
|
||||
{this.renderSource()}
|
||||
{this.renderNarrative()}
|
||||
</div>
|
||||
);
|
||||
if (this.state.isHighlighted) {
|
||||
return (
|
||||
<div className="card-bottomhalf">
|
||||
{this.renderTags()}
|
||||
{this.renderSource()}
|
||||
{this.renderNarrative()}
|
||||
</div>
|
||||
)
|
||||
} else {
|
||||
return <div classname="card-bottomhalf"></div>
|
||||
}
|
||||
}
|
||||
|
||||
renderCaret() {
|
||||
@@ -163,7 +168,7 @@ class Card extends React.Component {
|
||||
<li className='event-card'>
|
||||
{this.renderHeader()}
|
||||
{this.renderContent()}
|
||||
{/* {this.renderCaret()} */}
|
||||
{this.renderCaret()}
|
||||
</li>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -5,13 +5,12 @@ import copy from '../../js/data/copy.json';
|
||||
const CardSummary = ({ language, description, isHighlighted }) => {
|
||||
|
||||
const summary = copy[language].cardstack.description;
|
||||
const descriptionText = (isHighlighted) ? description : `${description.substring(0, 40)}...`;
|
||||
|
||||
return (
|
||||
<div className="card-row summary">
|
||||
<div className="card-cell">
|
||||
<h4>{summary}</h4>
|
||||
<p>{descriptionText}</p>
|
||||
<p>{description}</p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user