Skip to content

Commit 84fe6b0

Browse files
author
David Silva
committed
Small improvements to challenge/single component
1 parent c65a6ca commit 84fe6b0

File tree

2 files changed

+16
-12
lines changed

2 files changed

+16
-12
lines changed

src/components/challenges/single.js

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class SingleChallenge extends Component {
1818
<div>
1919
<TintedHeader title={challenge.title} subtitle={ challenge.body.short_description } />
2020
<section className="container">
21-
<div className="content challenge">
21+
<div style={{ maxWidth: '800px', width: '92%', marginLeft: 'auto', marginRight: 'auto', marginTop: '60px', marginBottom: '120px' }}>
2222
<div className="ticket-data row pricing">
2323
<div className="col-sm-6 plan">
2424
<ul className="features">
@@ -36,8 +36,9 @@ class SingleChallenge extends Component {
3636
<strong>Type:</strong> { challenge.head.challenge_type }
3737
</li>
3838
<li>
39-
<i className="icon-user" />
40-
<strong>Asigned to:</strong> Me
39+
<i className="icon-tags" />
40+
<strong>Tags:&nbsp;</strong>
41+
<Tags tags={ challenge.tags } />
4142
</li>
4243
</ul>
4344
</div>
@@ -62,13 +63,6 @@ class SingleChallenge extends Component {
6263
</ul>
6364
</div>
6465
</div>
65-
<div className="row tags">
66-
<p>
67-
<i className="icon-tags" />
68-
<strong>Tags:</strong>
69-
<Tags tags={ challenge.tags } />
70-
</p>
71-
</div>
7266
<a className="anchor" id="description" />
7367
<div className="grey-box">
7468
<h2>Description</h2>
@@ -97,6 +91,16 @@ class SingleChallenge extends Component {
9791
Submit Answer <i className="icon icon-right-1" />
9892
</Link>
9993
</div>
94+
<h2>Extra Points</h2>
95+
<div className="extra-points">
96+
<a className="anchor" id="extra-points" />
97+
{challenge.body.extra_points &&
98+
<ReactMarkdown source={challenge.body.extra_points} />
99+
}
100+
{!challenge.body.extra_points &&
101+
<p>The requirements are complete as is.</p>
102+
}
103+
</div>
100104
<a className="anchor" id="technical" />
101105
<h2>Technical Notes</h2>
102106
<div className="technical-notes">
@@ -108,7 +112,7 @@ class SingleChallenge extends Component {
108112
<div className="source">
109113
{challenge.source.map((s, key) => (
110114
<p key={ key }>
111-
<strong>{s.name}</strong>
115+
<strong>{s.name}:&nbsp;</strong>
112116
<a href={s.url}>{ s.url }</a>
113117
</p>
114118
))}

src/components/misc/tags.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class Tags extends Component {
1111
return(
1212
<span>
1313
{tags.map((t, key) => {
14-
return <span key={ key } className="tag blue-bg">{ t }</span>;
14+
return <span key={ key } className="tag blue-bg" style={{ marginRight: '5px', marginBottom: '5px', display: 'inline-block' }}>{ t }</span>;
1515
})}
1616
</span>
1717
);

0 commit comments

Comments
 (0)