diff --git a/client/src/components/Supporters.js b/client/src/components/Supporters.js new file mode 100644 index 0000000000..5402d5b943 --- /dev/null +++ b/client/src/components/Supporters.js @@ -0,0 +1,57 @@ +import React, { Fragment } from 'react'; +import PropTypes from 'prop-types'; +import { Button, ProgressBar } from '@freecodecamp/react-bootstrap'; + +import FullWidthRow from '../components/helpers/FullWidthRow'; + +import './supporters.css'; + +const propTypes = { isDonating: PropTypes.bool.isRequired }; + +function Supporters({ isDonating }) { + return ( + + +

Support an open future.

+
+ +
+ +
+
+ + +

+ freeCodeCamp.org is a tiny non-profit that's helping millions of + people learn to code for free.
+ {isDonating + ? 'Thank you for supporting freeCodeCamp.org' + : 'Join 4,000 supporters. Your $5 / month donation will help ' + + 'keep tech education free and open.'} +

+
+
+ {isDonating ? null : ( + + + + )} +
+ ); +} + +Supporters.displayName = 'Supporters'; +Supporters.propTypes = propTypes; + +export default Supporters; diff --git a/client/src/components/supporters.css b/client/src/components/supporters.css new file mode 100644 index 0000000000..b44ccbf568 --- /dev/null +++ b/client/src/components/supporters.css @@ -0,0 +1,7 @@ +#supporter-progress-wrapper .progress { + height: 38px; +} + +#supporter-progress-wrapper .progress-bar { + padding-top: 8px; +} \ No newline at end of file diff --git a/client/src/pages/welcome.js b/client/src/pages/welcome.js index 81ede9a313..ff4e190b57 100644 --- a/client/src/pages/welcome.js +++ b/client/src/pages/welcome.js @@ -10,6 +10,7 @@ import Helmet from 'react-helmet'; import { Loader, Spacer } from '../components/helpers'; import CurrentChallengeLink from '../components/helpers/CurrentChallengeLink'; import Layout from '../components/layouts/Default'; +import Supporters from '../components/Supporters'; import { userSelector, userFetchStateSelector, @@ -32,7 +33,8 @@ const propTypes = { completedChallengeCount: PropTypes.number, completedProjectCount: PropTypes.number, completedCertCount: PropTypes.number, - completedLegacyCertCount: PropTypes.number + completedLegacyCertCount: PropTypes.number, + isDonating: PropTypes.bool }) }; @@ -53,7 +55,8 @@ function Welcome({ completedChallengeCount: completedChallenges = 0, completedProjectCount = 0, completedCertCount = 0, - completedLegacyCertCount: completedLegacyCerts = 0 + completedLegacyCertCount: completedLegacyCerts = 0, + isDonating } }) { if (pending && !complete) { @@ -91,6 +94,8 @@ function Welcome({ + +