diff --git a/common/app/routes/challenges/Challenge-Description.jsx b/common/app/routes/challenges/Challenge-Description.jsx new file mode 100644 index 0000000000..566684a0c0 --- /dev/null +++ b/common/app/routes/challenges/Challenge-Description.jsx @@ -0,0 +1,24 @@ +import React, { PropTypes } from 'react'; +import { Col, Row } from 'react-bootstrap'; + +import ns from './ns.json'; + +const propTypes = { + children: PropTypes.array +}; + +export default function ChallengeDescription({ children }) { + return ( + + + { children } + + + ); +} + +ChallengeDescription.displayName = 'ChallengeDescription'; +ChallengeDescription.propTypes = propTypes; diff --git a/common/app/routes/challenges/challenges.less b/common/app/routes/challenges/challenges.less index b1816a5368..87a2daa03d 100644 --- a/common/app/routes/challenges/challenges.less +++ b/common/app/routes/challenges/challenges.less @@ -38,6 +38,44 @@ } } +.@{ns}-instructions { + margin-bottom: 5px; + h4 { + margin-bottom: 0; + } + blockquote { + font-size: 90%; + font-family: @font-family-monospace !important; + color: @code-color; + background-color: #fffbe5; + border-radius: @border-radius-base; + border: 1px solid @pre-border-color; + white-space: pre; + padding: 5px 10px; + margin-bottom: 10px; + margin-top: -5px; + overflow: auto; + } + dfn { + font-family: @font-family-monospace; + color: @code-color; + background-color: @code-bg; + border-radius: @border-radius-base; + padding: 1px 5px; + } + & a, #MDN-links a { + color: #31708f; + } + & a::after, #MDN-links a::after { + font-size: 70%; + font-family: FontAwesome; + content: " \f08e"; + } + ol { + font-size: 16px; + } +} + .night { .@{ns}-instructions blockquote { background-color: #242424; diff --git a/common/app/routes/challenges/views/backend/Back-End.jsx b/common/app/routes/challenges/views/backend/Back-End.jsx index 41c32434f0..686f0a8948 100644 --- a/common/app/routes/challenges/views/backend/Back-End.jsx +++ b/common/app/routes/challenges/views/backend/Back-End.jsx @@ -8,6 +8,7 @@ import { } from 'react-bootstrap'; import ChallengeTitle from '../../Challenge-Title.jsx'; +import ChallengeDescription from '../../Challenge-Description.jsx'; import SolutionInput from '../../Solution-Input.jsx'; import TestSuite from '../../Test-Suite.jsx'; import Output from '../../Output.jsx'; @@ -120,13 +121,16 @@ export class BackEnd extends PureComponent { return ( - - { title } - { this.renderDescription(description) } + + + { title } + + + { this.renderDescription(description) } +
{ title } - - - { this.renderDescription(description) } - - + + { this.renderDescription(description) } +