├── .circleci └── config.yml ├── .eslintignore ├── .eslintrc ├── .gitignore ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── LICENSE ├── README.md ├── config ├── env.js ├── jest │ ├── cssTransform.js │ └── fileTransform.js ├── paths.js ├── polyfills.js ├── webpack.config.common.js ├── webpack.config.dev.js ├── webpack.config.prod.js └── webpackDevServer.config.js ├── package-lock.json ├── package.json ├── public ├── favicon.png └── index.html ├── scripts ├── build.js ├── start.js └── test.js └── src ├── assets └── images │ ├── 404corgi.png │ ├── aboutcorgi.jpg │ ├── art │ ├── pattern-background02.png │ └── pattern-background03.png │ ├── betacorgi.png │ ├── blue-bg.jpg │ ├── challenges │ ├── 0 │ │ └── homepage.png │ └── 1 │ │ ├── desktop.png │ │ └── mobile.png │ ├── femalecodertocat.png │ ├── hero-image.jpg │ ├── homepage │ ├── 1-ticket-start.png │ ├── 3-submission-form.png │ ├── purdy-mac.png │ └── ticket.png │ ├── logo-1200.png │ ├── logo-large-hover.png │ ├── logo-large.png │ ├── logo-square-hover.png │ ├── logo-square.png │ ├── logo-text-300.png │ ├── logo-text-hover.png │ ├── logo-text.png │ ├── octo-corgi.png │ ├── team │ ├── corginson.png │ ├── david.png │ ├── iva.png │ ├── paul.png │ ├── steph.png │ ├── sydney.png │ └── tere.png │ ├── teapot.png │ └── thanks-corgi.png ├── components ├── about │ └── TeamMember.js ├── challenges │ ├── list.js │ ├── short.js │ └── single.js ├── fields │ ├── Text.js │ └── TextArea.js ├── footer │ └── index.js ├── header │ └── index.js ├── hoverImage │ └── index.js ├── learning │ └── topic.js ├── loading │ └── Large.js ├── misc │ ├── TintedHeader.js │ ├── difficulty.js │ ├── linkRenderer.js │ ├── moment.js │ └── tags.js ├── profile │ ├── Edit.js │ └── index.js └── submit │ ├── form.js │ ├── list.js │ └── single.js ├── constants ├── defaults │ └── challenge.js ├── index.js ├── utils.js └── validation.js ├── containers ├── 404 │ └── index.js ├── about │ ├── codeOfConduct.js │ ├── index.js │ └── openSource.js ├── app │ └── index.js ├── challenges │ ├── index.js │ └── single.js ├── easter │ └── index.js ├── home │ └── index.js ├── learning │ └── index.js ├── profile │ ├── Edit.js │ └── index.js ├── signup │ └── index.js └── submit │ ├── edit.js │ ├── form.js │ └── index.js ├── index.js ├── modules ├── index.js └── profile.js ├── routes.js ├── store.js ├── styles ├── _challenges.scss ├── _content.scss ├── _footer.scss ├── _forms.scss ├── _header.scss ├── _learning.scss ├── _profile.scss ├── _submit.scss ├── _utilities.scss ├── _variables.scss ├── fonts │ ├── fontello.css │ ├── fontello │ │ ├── fontello-.eot │ │ ├── fontello-circle.eot │ │ ├── fontello-circle.svg │ │ ├── fontello-circle.ttf │ │ ├── fontello-circle.woff │ │ ├── fontello-social-.eot │ │ ├── fontello-social.eot │ │ ├── fontello-social.svg │ │ ├── fontello-social.ttf │ │ ├── fontello-social.woff │ │ ├── fontello.eot │ │ ├── fontello.svg │ │ ├── fontello.ttf │ │ └── fontello.woff │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 ├── images │ ├── art │ │ ├── image-background01.jpg │ │ ├── image-background02.jpg │ │ ├── image-background03.jpg │ │ ├── image-background04.jpg │ │ ├── pattern-background01.jpg │ │ ├── pattern-background02.png │ │ ├── pattern-background03.png │ │ └── screen-container.png │ └── grabbing.png ├── main.scss └── theme │ ├── animate.min.css │ ├── aos.css │ ├── bootstrap.css │ ├── custom.css │ ├── main.css │ ├── owl.carousel.css │ ├── owl.transitions.css │ ├── purple.css │ └── red.css └── types └── index.js /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | # Javascript Node CircleCI 2.0 configuration file 2 | # 3 | # Check https://circleci.com/docs/2.0/language-javascript/ for more details 4 | # 5 | version: 2 6 | jobs: 7 | build: 8 | docker: 9 | # specify the version you desire here 10 | - image: circleci/node:7.10 11 | 12 | # Specify service dependencies here if necessary 13 | # CircleCI maintains a library of pre-built images 14 | # documented at https://circleci.com/docs/2.0/circleci-images/ 15 | # - image: circleci/mongo:3.4.4 16 | 17 | working_directory: ~/repo 18 | 19 | steps: 20 | - checkout 21 | 22 | # Download and cache dependencies 23 | - restore_cache: 24 | keys: 25 | - v1-dependencies-{{ checksum "package.json" }} 26 | # fallback to using the latest cache if no exact match is found 27 | - v1-dependencies- 28 | 29 | - run: npm install 30 | 31 | - save_cache: 32 | paths: 33 | - node_modules 34 | key: v1-dependencies-{{ checksum "package.json" }} 35 | 36 | # run tests! 37 | - run: npm run build 38 | 39 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | build 2 | node_modules 3 | coverage 4 | webpack.*.js 5 | *server.js 6 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "parser": "babel-eslint", // https://github.com/babel/babel-eslint 3 | "env": { 4 | "browser": true, 5 | "node": true, 6 | "mocha": true, 7 | "jest": true 8 | }, 9 | "globals": { 10 | "expect": true, 11 | "sinon": true, 12 | "__DEV__": true 13 | }, 14 | "rules": { 15 | "no-var": 2, // http://eslint.org/docs/rules/no-var 16 | "prefer-const": 2, // http://eslint.org/docs/rules/prefer-const 17 | 18 | /** 19 | * Variables 20 | */ 21 | "no-shadow": 2, // http://eslint.org/docs/rules/no-shadow 22 | "no-shadow-restricted-names": 2, // http://eslint.org/docs/rules/no-shadow-restricted-names 23 | "no-undef": 2, // http://eslint.org/docs/rules/no-undef 24 | "no-unused-vars": [2, { // http://eslint.org/docs/rules/no-unused-vars 25 | "vars": "local", 26 | "args": "after-used" 27 | }], 28 | "no-use-before-define": 2, // http://eslint.org/docs/rules/no-use-before-define 29 | 30 | /** 31 | * Possible errors 32 | */ 33 | "no-cond-assign": [2, "always"], // http://eslint.org/docs/rules/no-cond-assign 34 | "no-console": 0, // http://eslint.org/docs/rules/no-console 35 | "no-debugger": 1, // http://eslint.org/docs/rules/no-debugger 36 | "no-alert": 1, // http://eslint.org/docs/rules/no-alert 37 | "no-constant-condition": 1, // http://eslint.org/docs/rules/no-constant-condition 38 | "no-dupe-keys": 2, // http://eslint.org/docs/rules/no-dupe-keys 39 | "no-duplicate-case": 2, // http://eslint.org/docs/rules/no-duplicate-case 40 | "no-empty": 2, // http://eslint.org/docs/rules/no-empty 41 | "no-ex-assign": 2, // http://eslint.org/docs/rules/no-ex-assign 42 | "no-extra-boolean-cast": 0, // http://eslint.org/docs/rules/no-extra-boolean-cast 43 | "no-extra-semi": 2, // http://eslint.org/docs/rules/no-extra-semi 44 | "no-func-assign": 2, // http://eslint.org/docs/rules/no-func-assign 45 | "no-inner-declarations": 2, // http://eslint.org/docs/rules/no-inner-declarations 46 | "no-invalid-regexp": 2, // http://eslint.org/docs/rules/no-invalid-regexp 47 | "no-irregular-whitespace": 2, // http://eslint.org/docs/rules/no-irregular-whitespace 48 | "no-obj-calls": 2, // http://eslint.org/docs/rules/no-obj-calls 49 | "no-sparse-arrays": 2, // http://eslint.org/docs/rules/no-sparse-arrays 50 | "no-unreachable": 2, // http://eslint.org/docs/rules/no-unreachable 51 | "use-isnan": 2, // http://eslint.org/docs/rules/use-isnan 52 | "block-scoped-var": 2, // http://eslint.org/docs/rules/block-scoped-var 53 | 54 | /** 55 | * Best practices 56 | */ 57 | "consistent-return": 2, // http://eslint.org/docs/rules/consistent-return 58 | "curly": [2, "multi-line"], // http://eslint.org/docs/rules/curly 59 | "default-case": 2, // http://eslint.org/docs/rules/default-case 60 | "dot-notation": [2, { // http://eslint.org/docs/rules/dot-notation 61 | "allowKeywords": true 62 | }], 63 | "eqeqeq": 2, // http://eslint.org/docs/rules/eqeqeq 64 | "guard-for-in": 2, // http://eslint.org/docs/rules/guard-for-in 65 | "no-caller": 2, // http://eslint.org/docs/rules/no-caller 66 | "no-else-return": 2, // http://eslint.org/docs/rules/no-else-return 67 | "no-eq-null": 2, // http://eslint.org/docs/rules/no-eq-null 68 | "no-eval": 2, // http://eslint.org/docs/rules/no-eval 69 | "no-extend-native": 2, // http://eslint.org/docs/rules/no-extend-native 70 | "no-extra-bind": 2, // http://eslint.org/docs/rules/no-extra-bind 71 | "no-fallthrough": 2, // http://eslint.org/docs/rules/no-fallthrough 72 | "no-floating-decimal": 2, // http://eslint.org/docs/rules/no-floating-decimal 73 | "no-implied-eval": 2, // http://eslint.org/docs/rules/no-implied-eval 74 | "no-lone-blocks": 2, // http://eslint.org/docs/rules/no-lone-blocks 75 | "no-loop-func": 2, // http://eslint.org/docs/rules/no-loop-func 76 | "no-multi-str": 2, // http://eslint.org/docs/rules/no-multi-str 77 | "no-native-reassign": 2, // http://eslint.org/docs/rules/no-native-reassign 78 | "no-new": 2, // http://eslint.org/docs/rules/no-new 79 | "no-new-func": 2, // http://eslint.org/docs/rules/no-new-func 80 | "no-new-wrappers": 2, // http://eslint.org/docs/rules/no-new-wrappers 81 | "no-octal": 2, // http://eslint.org/docs/rules/no-octal 82 | "no-octal-escape": 2, // http://eslint.org/docs/rules/no-octal-escape 83 | "no-param-reassign": 2, // http://eslint.org/docs/rules/no-param-reassign 84 | "no-proto": 2, // http://eslint.org/docs/rules/no-proto 85 | "no-redeclare": 2, // http://eslint.org/docs/rules/no-redeclare 86 | "no-return-assign": 2, // http://eslint.org/docs/rules/no-return-assign 87 | "no-script-url": 2, // http://eslint.org/docs/rules/no-script-url 88 | "no-self-compare": 2, // http://eslint.org/docs/rules/no-self-compare 89 | "no-sequences": 2, // http://eslint.org/docs/rules/no-sequences 90 | "no-throw-literal": 2, // http://eslint.org/docs/rules/no-throw-literal 91 | "no-with": 2, // http://eslint.org/docs/rules/no-with 92 | "radix": 2, // http://eslint.org/docs/rules/radix 93 | "vars-on-top": 2, // http://eslint.org/docs/rules/vars-on-top 94 | "yoda": 2, // http://eslint.org/docs/rules/yoda 95 | 96 | /** 97 | * Style 98 | */ 99 | "indent": [ 100 | 2, 101 | 4, 102 | { "SwitchCase": 1 } 103 | ], // http://eslint.org/docs/rules/indent 104 | "brace-style": [ 105 | 2, 106 | "1tbs", { 107 | "allowSingleLine": true 108 | } 109 | ], // http://eslint.org/docs/rules/brace-style 110 | "quotes": [ 111 | 2, "single", "avoid-escape" // http://eslint.org/docs/rules/quotes 112 | ], 113 | "camelcase": [2, { // http://eslint.org/docs/rules/camelcase 114 | "properties": "never" 115 | }], 116 | "comma-spacing": [2, { // http://eslint.org/docs/rules/comma-spacing 117 | "before": false, 118 | "after": true 119 | }], 120 | "comma-style": [2, "last"], // http://eslint.org/docs/rules/comma-style 121 | "eol-last": 2, // http://eslint.org/docs/rules/eol-last 122 | "func-names": 1, // http://eslint.org/docs/rules/func-names 123 | "key-spacing": [2, { // http://eslint.org/docs/rules/key-spacing 124 | "beforeColon": false, 125 | "afterColon": true 126 | }], 127 | "new-cap": [0, { // http://eslint.org/docs/rules/new-cap 128 | "newIsCap": true 129 | }], 130 | "no-multiple-empty-lines": [2, { // http://eslint.org/docs/rules/no-multiple-empty-lines 131 | "max": 2 132 | }], 133 | "no-nested-ternary": 2, // http://eslint.org/docs/rules/no-nested-ternary 134 | "no-new-object": 2, // http://eslint.org/docs/rules/no-new-object 135 | "no-spaced-func": 2, // http://eslint.org/docs/rules/no-spaced-func 136 | "no-trailing-spaces": 2, // http://eslint.org/docs/rules/no-trailing-spaces 137 | "no-extra-parens": [2, "functions"], // http://eslint.org/docs/rules/no-extra-parens 138 | "no-underscore-dangle": 0, // http://eslint.org/docs/rules/no-underscore-dangle 139 | "one-var": [2, "never"], // http://eslint.org/docs/rules/one-var 140 | "padded-blocks": [2, "never"], // http://eslint.org/docs/rules/padded-blocks 141 | "semi": [2, "always"], // http://eslint.org/docs/rules/semi 142 | "semi-spacing": [2, { // http://eslint.org/docs/rules/semi-spacing 143 | "before": false, 144 | "after": true 145 | }], 146 | "space-before-blocks": 2, // http://eslint.org/docs/rules/space-before-blocks 147 | "space-before-function-paren": [2, "never"], // http://eslint.org/docs/rules/space-before-function-paren 148 | "space-infix-ops": 2, // http://eslint.org/docs/rules/space-infix-ops 149 | "spaced-comment": [2, "always", {// http://eslint.org/docs/rules/spaced-comment 150 | "exceptions": ["-", "+"], 151 | "markers": ["=", "!"] // space here to support sprockets directives 152 | }], 153 | // React 154 | "jsx-quotes": [2, "prefer-double"], 155 | "react/display-name": 0, 156 | "react/jsx-boolean-value": 1, 157 | "react/jsx-no-undef": 2, 158 | "react/jsx-sort-prop-types": 0, 159 | "react/jsx-sort-props": 0, 160 | "react/jsx-uses-react": 1, 161 | "react/jsx-uses-vars": 1, 162 | "react/no-did-mount-set-state": [2], 163 | "react/no-did-update-set-state": 2, 164 | "react/no-multi-comp": 2, 165 | "react/no-unknown-property": 2, 166 | "react/prop-types": 2, 167 | "react/react-in-jsx-scope": 2, 168 | "react/self-closing-comp": 2, 169 | "react/sort-comp": 2, 170 | "react/jsx-wrap-multilines": 2 171 | }, 172 | "plugins": [ 173 | "react" 174 | ] 175 | } 176 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | node_modules 5 | 6 | # testing 7 | coverage 8 | 9 | # production 10 | build 11 | 12 | # misc 13 | .DS_Store 14 | .env 15 | npm-debug.log 16 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | ## 0.11.2 3 | - Added pride logos 4 | 5 | ## 0.11.0 6 | 7 | - Fixed bug that prevents back button from working 8 | 9 | ## 0.11.0 10 | 11 | - #83 Creates a component that displays while waiting for data as a generic way 12 | - #103 Creates utilities to verify valid urls on dynamic inputs 13 | - #52 Removed the odd space under the header 14 | - #105 Prevents logged in users from entering /signup page 15 | - #73 adds an 'we are open source' page in /about/open-source 16 | - #114 create team member component and integrate into about container 17 | 18 | ## 0.10.3 19 | - HOTFIX: Error in profile page 20 | 21 | ## 0.10.0 22 | 23 | - Displaying projects and submissions in profile page 24 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | 3 | This code of conduct outlines expectations for participation in our open source communities, as well as steps for reporting unacceptable behavior. We are committed to providing a welcoming and inspiring community for all. People violating this code of conduct may be banned from the community. 4 | 5 | ## Our community strives to: 6 | 7 | - **Be friendly and patient:** Remember you might not be communicating in someone else's primary spoken or programming language, and others may not have your level of understanding. 8 | - **Be welcoming:** Our communities welcome and support people of all backgrounds and identities. This includes, but is not limited to members of any race, ethnicity, culture, national origin, color, immigration status, social and economic class, educational level, sex, sexual orientation, gender identity and expression, age, size, family status, political belief, religion, and mental and physical ability. 9 | - **Be respectful:** We are a world-wide community of professionals, and we conduct ourselves professionally. Disagreement is no excuse for poor behavior and poor manners. Disrespectful and unacceptable behavior includes, but is not limited to: 10 | - Violent threats or language. 11 | - Discriminatory or derogatory jokes and language. 12 | - Posting sexually explicit or violent material. 13 | - Posting, or threatening to post, people's personally identifying information ("doxing"). 14 | - Insults, especially those using discriminatory terms or slurs. 15 | - Behavior that could be perceived as sexual attention. 16 | - Advocating for or encouraging any of the above behaviors. 17 | - **Understand disagreements:** Disagreements, both social and technical, are useful learning opportunities. Seek to understand the other viewpoints and resolve differences constructively. 18 | - This code is not exhaustive or complete. It serves to capture our common understanding of a productive, collaborative environment. We expect the code to be followed in spirit as much as in the letter. 19 | 20 | ## Scope 21 | 22 | This code of conduct applies to all repos and communities for codecorgi projects regardless of whether or not the repo explicitly calls out its use of this code. The code also applies in public spaces when an individual is representing a project or its community. Examples include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. 23 | 24 | ## Reporting Code of Conduct Issues 25 | 26 | We encourage all members to resolve issues on their own whenever possible. This builds a broader and deeper understanding and ultimately a healthier interaction. In the event that an issue cannot be resolved, please report your concerns by contacting reports@codecorgi.co . Your report will be handled in accordance with the issue resolution process described in the 27 | [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/). 28 | 29 | ### In your report please include: 30 | 31 | Your contact information. 32 | 33 | Names (real, usernames or pseudonyms) of any individuals involved. If there are additional witnesses, please include them as well. 34 | 35 | Your account of what occurred, and if you believe the incident is ongoing. If there is a publicly available record (e.g. a mailing list archive or a public chat log), please include a link or attachment. 36 | 37 | Any additional information that may be helpful. 38 | 39 | All reports will be reviewed by a multi-person team and will result in a response that is deemed necessary and appropriate to the circumstances. Where additional perspectives are needed, the team may seek insight from others with relevant expertise or experience. The confidentiality of the person reporting the incident will be kept at all times. Involved parties are never part of the review team. 40 | 41 | Anyone asked to stop unacceptable behavior is expected to comply immediately. If an individual engages in unacceptable behavior, the review team may take any action they deem appropriate, including a permanent ban from the community. 42 | 43 | This code of conduct is based on the template established by the TODO Group and used by numerous other large communities (e.g., Facebook, Yahoo, Twitter, GitHub) and the Scope section from the Contributor Covenant version 1.4. 44 | 45 | "Inspired" by Microsoft's [Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). 46 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Jamie Barton 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # codecorgi 2 | 3 | Checkout our progress on [![Waffle.io](https://badge.waffle.io/corgicode/frontend-react.svg?columns=all)](https://waffle.io/corgicode/frontend-react) 4 | 5 | Frontend project for [codecorgi](codecorgi.co). 6 | 7 | Decided to open source it so that users can look at a non trivial codebase and follow development. 8 | 9 | Based on [Create React App Redux](https://github.com/notrab/create-react-app-redux.git), a minimalist React, React Router, 10 | Redux and Redux Thunk boilerplate. 11 | 12 | [![Dependency Status](https://dependencyci.com/github/corgicode/frontend-react/badge)](https://dependencyci.com/github/corgicode/frontend-react) 13 | 14 | [![Build Status](https://circleci.com/gh/corgicode/frontend-react.svg?style=shield)](https://circleci.com/gh/corgicode/frontend-react) 15 | 16 | [ ![Codeship Status](https://app.codeship.com/projects/db18c140-ec1e-0135-a24a-2abb3399b63f/status?branch=master)](https://app.codeship.com/projects/270289) 17 | 18 | * Tutorial: [Getting started with create-react-app, Redux, React Router & Redux Thunk](https://medium.com/@notrab/getting-started-with-create-react-app-redux-react-router-redux-thunk-d6a19259f71f) 19 | 20 | ## Installation 21 | 22 | ```bash 23 | git clone git@github.com:corgicode/frontend-react.git frontend 24 | cd frontend 25 | npm i 26 | ``` 27 | 28 | ## Run Locally 29 | 30 | ``` 31 | npm start 32 | ``` 33 | 34 | You need to run a copy of the backend alongside and add all the env variables for it to work proper. 35 | 36 | ## Contributing 37 | 38 | TODO :( 39 | 40 | ## Code Of Conduct 41 | 42 | Find our [code of conduct on github](CODE_OF_CONDUCT.md) 43 | -------------------------------------------------------------------------------- /config/env.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const fs = require('fs'); 4 | const path = require('path'); 5 | const paths = require('./paths'); 6 | 7 | // Make sure that including paths.js after env.js will read .env variables. 8 | delete require.cache[require.resolve('./paths')]; 9 | 10 | const NODE_ENV = process.env.NODE_ENV; 11 | if (!NODE_ENV) { 12 | throw new Error( 13 | 'The NODE_ENV environment variable is required but was not specified.' 14 | ); 15 | } 16 | 17 | // https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use 18 | const dotenvFiles = [ 19 | `${paths.dotenv}.${NODE_ENV}.local`, 20 | `${paths.dotenv}.${NODE_ENV}`, 21 | // Don't include `.env.local` for `test` environment 22 | // since normally you expect tests to produce the same 23 | // results for everyone 24 | NODE_ENV !== 'test' && `${paths.dotenv}.local`, 25 | paths.dotenv, 26 | ].filter(Boolean); 27 | 28 | // Load environment variables from .env* files. Suppress warnings using silent 29 | // if this file is missing. dotenv will never modify any environment variables 30 | // that have already been set. 31 | // https://github.com/motdotla/dotenv 32 | dotenvFiles.forEach(dotenvFile => { 33 | if (fs.existsSync(dotenvFile)) { 34 | require('dotenv').config({ 35 | path: dotenvFile, 36 | }); 37 | } 38 | }); 39 | 40 | // We support resolving modules according to `NODE_PATH`. 41 | // This lets you use absolute paths in imports inside large monorepos: 42 | // https://github.com/facebookincubator/create-react-app/issues/253. 43 | // It works similar to `NODE_PATH` in Node itself: 44 | // https://nodejs.org/api/modules.html#modules_loading_from_the_global_folders 45 | // Note that unlike in Node, only *relative* paths from `NODE_PATH` are honored. 46 | // Otherwise, we risk importing Node.js core modules into an app instead of Webpack shims. 47 | // https://github.com/facebookincubator/create-react-app/issues/1023#issuecomment-265344421 48 | // We also resolve them to make sure all tools using them work consistently. 49 | const appDirectory = fs.realpathSync(process.cwd()); 50 | process.env.NODE_PATH = (process.env.NODE_PATH || '') 51 | .split(path.delimiter) 52 | .filter(folder => folder && !path.isAbsolute(folder)) 53 | .map(folder => path.resolve(appDirectory, folder)) 54 | .join(path.delimiter); 55 | 56 | // Grab NODE_ENV and REACT_APP_* environment variables and prepare them to be 57 | // injected into the application via DefinePlugin in Webpack configuration. 58 | const REACT_APP = /^REACT_APP_/i; 59 | 60 | function getClientEnvironment(publicUrl) { 61 | const raw = Object.keys(process.env) 62 | .filter(key => REACT_APP.test(key)) 63 | .reduce( 64 | (env, key) => { 65 | env[key] = process.env[key]; 66 | return env; 67 | }, 68 | { 69 | // Useful for determining whether we’re running in production mode. 70 | // Most importantly, it switches React into the correct mode. 71 | NODE_ENV: process.env.NODE_ENV || 'development', 72 | // Useful for resolving the correct path to static assets in `public`. 73 | // For example, . 74 | // This should only be used as an escape hatch. Normally you would put 75 | // images into the `src` and `import` them in code to get their paths. 76 | PUBLIC_URL: publicUrl, 77 | } 78 | ); 79 | // Stringify all values so we can feed into Webpack DefinePlugin 80 | const stringified = { 81 | 'process.env': Object.keys(raw).reduce((env, key) => { 82 | env[key] = JSON.stringify(raw[key]); 83 | return env; 84 | }, {}), 85 | }; 86 | 87 | return { raw, stringified }; 88 | } 89 | 90 | module.exports = getClientEnvironment; 91 | -------------------------------------------------------------------------------- /config/jest/cssTransform.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // This is a custom Jest transformer turning style imports into empty objects. 4 | // http://facebook.github.io/jest/docs/tutorial-webpack.html 5 | 6 | module.exports = { 7 | process() { 8 | return 'module.exports = {};'; 9 | }, 10 | getCacheKey() { 11 | // The output is always the same. 12 | return 'cssTransform'; 13 | }, 14 | }; 15 | -------------------------------------------------------------------------------- /config/jest/fileTransform.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const path = require('path'); 4 | 5 | // This is a custom Jest transformer turning file imports into filenames. 6 | // http://facebook.github.io/jest/docs/tutorial-webpack.html 7 | 8 | module.exports = { 9 | process(src, filename) { 10 | return `module.exports = ${JSON.stringify(path.basename(filename))};`; 11 | }, 12 | }; 13 | -------------------------------------------------------------------------------- /config/paths.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const path = require('path'); 4 | const fs = require('fs'); 5 | const url = require('url'); 6 | 7 | // Make sure any symlinks in the project folder are resolved: 8 | // https://github.com/facebookincubator/create-react-app/issues/637 9 | const appDirectory = fs.realpathSync(process.cwd()); 10 | const resolveApp = relativePath => path.resolve(appDirectory, relativePath); 11 | 12 | const envPublicUrl = process.env.PUBLIC_URL; 13 | 14 | function ensureSlash(_path, needsSlash) { 15 | const hasSlash = _path.endsWith('/'); 16 | if (hasSlash && !needsSlash) { 17 | return _path.substr(_path, _path.length - 1); 18 | } else if (!hasSlash && needsSlash) { 19 | return `${_path}/`; 20 | } 21 | return _path; 22 | } 23 | 24 | const getPublicUrl = appPackageJson => 25 | envPublicUrl || require(appPackageJson).homepage; 26 | 27 | // We use `PUBLIC_URL` environment variable or "homepage" field to infer 28 | // "public path" at which the app is served. 29 | // Webpack needs to know it to put the right 37 | 38 | 39 | -------------------------------------------------------------------------------- /scripts/build.js: -------------------------------------------------------------------------------- 1 | const Promise = require('es6-promise').Promise; 2 | 3 | 4 | // Do this as the first thing so that any code reading it knows the right env. 5 | process.env.BABEL_ENV = 'production'; 6 | process.env.NODE_ENV = 'production'; 7 | 8 | // Makes the script crash on unhandled rejections instead of silently 9 | // ignoring them. In the future, promise rejections that are not handled will 10 | // terminate the Node.js process with a non-zero exit code. 11 | process.on('unhandledRejection', err => { 12 | throw err; 13 | }); 14 | 15 | // Ensure environment variables are read. 16 | require('../config/env'); 17 | 18 | const path = require('path'); 19 | const chalk = require('chalk'); 20 | const fs = require('fs-extra'); 21 | const webpack = require('webpack'); 22 | const config = require('../config/webpack.config.prod'); 23 | const paths = require('../config/paths'); 24 | const checkRequiredFiles = require('react-dev-utils/checkRequiredFiles'); 25 | const formatWebpackMessages = require('react-dev-utils/formatWebpackMessages'); 26 | const printHostingInstructions = require('react-dev-utils/printHostingInstructions'); 27 | const FileSizeReporter = require('react-dev-utils/FileSizeReporter'); 28 | const printBuildError = require('react-dev-utils/printBuildError'); 29 | 30 | const measureFileSizesBeforeBuild = 31 | FileSizeReporter.measureFileSizesBeforeBuild; 32 | const printFileSizesAfterBuild = FileSizeReporter.printFileSizesAfterBuild; 33 | const useYarn = fs.existsSync(paths.yarnLockFile); 34 | 35 | // These sizes are pretty large. We'll warn for bundles exceeding them. 36 | const WARN_AFTER_BUNDLE_GZIP_SIZE = 512 * 1024; 37 | const WARN_AFTER_CHUNK_GZIP_SIZE = 1024 * 1024; 38 | 39 | // Warn and crash if required files are missing 40 | if (!checkRequiredFiles([paths.appHtml, paths.appIndexJs])) { 41 | process.exit(1); 42 | } 43 | 44 | function copyPublicFolder() { 45 | fs.copySync(paths.appPublic, paths.appBuild, { 46 | dereference: true, 47 | filter: file => file !== paths.appHtml, 48 | }); 49 | } 50 | 51 | // Create the production build and print the deployment instructions. 52 | function build(previousFileSizes) { 53 | console.log('Creating an optimized production build...'); 54 | 55 | const compiler = webpack(config); 56 | return new Promise((resolve, reject) => { 57 | compiler.run((err, stats) => { 58 | if (err) { 59 | return reject(err); 60 | } 61 | const messages = formatWebpackMessages(stats.toJson({}, true)); 62 | if (messages.errors.length) { 63 | // Only keep the first error. Others are often indicative 64 | // of the same problem, but confuse the reader with noise. 65 | if (messages.errors.length > 1) { 66 | messages.errors.length = 1; 67 | } 68 | return reject(new Error(messages.errors.join('\n\n'))); 69 | } 70 | if ( 71 | process.env.CI && 72 | (typeof process.env.CI !== 'string' || 73 | process.env.CI.toLowerCase() !== 'false') && 74 | messages.warnings.length 75 | ) { 76 | console.log( 77 | chalk.yellow( 78 | '\nTreating warnings as errors because process.env.CI = true.\n' + 79 | 'Most CI servers set it automatically.\n' 80 | ) 81 | ); 82 | return reject(new Error(messages.warnings.join('\n\n'))); 83 | } 84 | return resolve({ 85 | stats, 86 | previousFileSizes, 87 | warnings: messages.warnings, 88 | }); 89 | }); 90 | }); 91 | } 92 | 93 | // First, read the current file sizes in build directory. 94 | // This lets us display how much they changed later. 95 | measureFileSizesBeforeBuild(paths.appBuild) 96 | .then(previousFileSizes => { 97 | // Remove all content but keep the directory so that 98 | // if you're in it, you don't end up in Trash 99 | fs.emptyDirSync(paths.appBuild); 100 | // Merge with the public folder 101 | copyPublicFolder(); 102 | // Start the webpack build 103 | return build(previousFileSizes); 104 | }) 105 | .then( 106 | ({ stats, previousFileSizes, warnings }) => { 107 | if (warnings.length) { 108 | console.log(chalk.yellow('Compiled with warnings.\n')); 109 | console.log(warnings.join('\n\n')); 110 | console.log( 111 | '\nSearch for the ' + 112 | chalk.underline(chalk.yellow('keywords')) + 113 | ' to learn more about each warning.' 114 | ); 115 | console.log( 116 | 'To ignore, add ' + 117 | chalk.cyan('// eslint-disable-next-line') + 118 | ' to the line before.\n' 119 | ); 120 | } else { 121 | console.log(chalk.green('Compiled successfully.\n')); 122 | } 123 | 124 | console.log('File sizes after gzip:\n'); 125 | printFileSizesAfterBuild( 126 | stats, 127 | previousFileSizes, 128 | paths.appBuild, 129 | WARN_AFTER_BUNDLE_GZIP_SIZE, 130 | WARN_AFTER_CHUNK_GZIP_SIZE 131 | ); 132 | console.log(); 133 | 134 | const appPackage = require(paths.appPackageJson); 135 | const publicUrl = paths.publicUrl; 136 | const publicPath = config.output.publicPath; 137 | const buildFolder = path.relative(process.cwd(), paths.appBuild); 138 | printHostingInstructions( 139 | appPackage, 140 | publicUrl, 141 | publicPath, 142 | buildFolder, 143 | useYarn 144 | ); 145 | }, 146 | err => { 147 | console.log(chalk.red('Failed to compile.\n')); 148 | printBuildError(err); 149 | process.exit(1); 150 | } 151 | ); 152 | 153 | -------------------------------------------------------------------------------- /scripts/start.js: -------------------------------------------------------------------------------- 1 | // Do this as the first thing so that any code reading it knows the right env. 2 | process.env.BABEL_ENV = 'development'; 3 | process.env.NODE_ENV = 'development'; 4 | 5 | // Makes the script crash on unhandled rejections instead of silently 6 | // ignoring them. In the future, promise rejections that are not handled will 7 | // terminate the Node.js process with a non-zero exit code. 8 | process.on('unhandledRejection', err => { 9 | throw err; 10 | }); 11 | 12 | // Ensure environment variables are read. 13 | require('../config/env'); 14 | 15 | const fs = require('fs'); 16 | const chalk = require('chalk'); 17 | const webpack = require('webpack'); 18 | const WebpackDevServer = require('webpack-dev-server'); 19 | const clearConsole = require('react-dev-utils/clearConsole'); 20 | const checkRequiredFiles = require('react-dev-utils/checkRequiredFiles'); 21 | const { 22 | choosePort, 23 | createCompiler, 24 | prepareProxy, 25 | prepareUrls, 26 | } = require('react-dev-utils/WebpackDevServerUtils'); 27 | const openBrowser = require('react-dev-utils/openBrowser'); 28 | const paths = require('../config/paths'); 29 | const config = require('../config/webpack.config.dev'); 30 | const createDevServerConfig = require('../config/webpackDevServer.config'); 31 | 32 | const useYarn = fs.existsSync(paths.yarnLockFile); 33 | const isInteractive = process.stdout.isTTY; 34 | 35 | // Warn and crash if required files are missing 36 | if (!checkRequiredFiles([paths.appHtml, paths.appIndexJs])) { 37 | process.exit(1); 38 | } 39 | 40 | // Tools like Cloud9 rely on this. 41 | const DEFAULT_PORT = parseInt(process.env.PORT, 10) || 3000; 42 | const HOST = process.env.HOST || '0.0.0.0'; 43 | 44 | // We attempt to use the default port but if it is busy, we offer the user to 45 | // run on a different port. `detect()` Promise resolves to the next free port. 46 | choosePort(HOST, DEFAULT_PORT) 47 | .then(port => { 48 | if (port === null) { 49 | // We have not found a port. 50 | return; 51 | } 52 | const protocol = process.env.HTTPS === 'true' ? 'https' : 'http'; 53 | const appName = require(paths.appPackageJson).name; 54 | const urls = prepareUrls(protocol, HOST, port); 55 | // Create a webpack compiler that is configured with custom messages. 56 | const compiler = createCompiler(webpack, config, appName, urls, useYarn); 57 | // Load proxy config 58 | const proxySetting = require(paths.appPackageJson).proxy; 59 | const proxyConfig = prepareProxy(proxySetting, paths.appPublic); 60 | // Serve webpack assets generated by the compiler over a web sever. 61 | const serverConfig = createDevServerConfig( 62 | proxyConfig, 63 | urls.lanUrlForConfig 64 | ); 65 | const devServer = new WebpackDevServer(compiler, serverConfig); 66 | // Launch WebpackDevServer. 67 | devServer.listen(port, HOST, err => { 68 | if (err) { 69 | return console.log(err); 70 | } 71 | if (isInteractive) { 72 | clearConsole(); 73 | } 74 | openBrowser(urls.localUrlForBrowser); 75 | return console.log(chalk.cyan('Starting the development server...\n')); 76 | }); 77 | 78 | ['SIGINT', 'SIGTERM'].forEach((sig) => { 79 | process.on(sig, () => { 80 | devServer.close(); 81 | process.exit(); 82 | }); 83 | }); 84 | }) 85 | .catch(err => { 86 | if (err && err.message) { 87 | console.log(err.message); 88 | } 89 | process.exit(1); 90 | }); 91 | -------------------------------------------------------------------------------- /scripts/test.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // Do this as the first thing so that any code reading it knows the right env. 4 | process.env.BABEL_ENV = 'test'; 5 | process.env.NODE_ENV = 'test'; 6 | process.env.PUBLIC_URL = ''; 7 | 8 | // Makes the script crash on unhandled rejections instead of silently 9 | // ignoring them. In the future, promise rejections that are not handled will 10 | // terminate the Node.js process with a non-zero exit code. 11 | process.on('unhandledRejection', err => { 12 | throw err; 13 | }); 14 | 15 | // Ensure environment variables are read. 16 | require('../config/env'); 17 | 18 | const jest = require('jest'); 19 | const argv = process.argv.slice(2); 20 | 21 | // Watch unless on CI or in coverage mode 22 | if (!process.env.CI && argv.indexOf('--coverage') < 0) { 23 | argv.push('--watch'); 24 | } 25 | 26 | 27 | jest.run(argv); 28 | -------------------------------------------------------------------------------- /src/assets/images/404corgi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/corgicode/frontend-react/7f365a68ec1b1a2e88749d71b3f8dcd583f08dad/src/assets/images/404corgi.png -------------------------------------------------------------------------------- /src/assets/images/aboutcorgi.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/corgicode/frontend-react/7f365a68ec1b1a2e88749d71b3f8dcd583f08dad/src/assets/images/aboutcorgi.jpg -------------------------------------------------------------------------------- /src/assets/images/art/pattern-background02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/corgicode/frontend-react/7f365a68ec1b1a2e88749d71b3f8dcd583f08dad/src/assets/images/art/pattern-background02.png -------------------------------------------------------------------------------- /src/assets/images/art/pattern-background03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/corgicode/frontend-react/7f365a68ec1b1a2e88749d71b3f8dcd583f08dad/src/assets/images/art/pattern-background03.png -------------------------------------------------------------------------------- /src/assets/images/betacorgi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/corgicode/frontend-react/7f365a68ec1b1a2e88749d71b3f8dcd583f08dad/src/assets/images/betacorgi.png -------------------------------------------------------------------------------- /src/assets/images/blue-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/corgicode/frontend-react/7f365a68ec1b1a2e88749d71b3f8dcd583f08dad/src/assets/images/blue-bg.jpg -------------------------------------------------------------------------------- /src/assets/images/challenges/0/homepage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/corgicode/frontend-react/7f365a68ec1b1a2e88749d71b3f8dcd583f08dad/src/assets/images/challenges/0/homepage.png -------------------------------------------------------------------------------- /src/assets/images/challenges/1/desktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/corgicode/frontend-react/7f365a68ec1b1a2e88749d71b3f8dcd583f08dad/src/assets/images/challenges/1/desktop.png -------------------------------------------------------------------------------- /src/assets/images/challenges/1/mobile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/corgicode/frontend-react/7f365a68ec1b1a2e88749d71b3f8dcd583f08dad/src/assets/images/challenges/1/mobile.png -------------------------------------------------------------------------------- /src/assets/images/femalecodertocat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/corgicode/frontend-react/7f365a68ec1b1a2e88749d71b3f8dcd583f08dad/src/assets/images/femalecodertocat.png -------------------------------------------------------------------------------- /src/assets/images/hero-image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/corgicode/frontend-react/7f365a68ec1b1a2e88749d71b3f8dcd583f08dad/src/assets/images/hero-image.jpg -------------------------------------------------------------------------------- /src/assets/images/homepage/1-ticket-start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/corgicode/frontend-react/7f365a68ec1b1a2e88749d71b3f8dcd583f08dad/src/assets/images/homepage/1-ticket-start.png -------------------------------------------------------------------------------- /src/assets/images/homepage/3-submission-form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/corgicode/frontend-react/7f365a68ec1b1a2e88749d71b3f8dcd583f08dad/src/assets/images/homepage/3-submission-form.png -------------------------------------------------------------------------------- /src/assets/images/homepage/purdy-mac.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/corgicode/frontend-react/7f365a68ec1b1a2e88749d71b3f8dcd583f08dad/src/assets/images/homepage/purdy-mac.png -------------------------------------------------------------------------------- /src/assets/images/homepage/ticket.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/corgicode/frontend-react/7f365a68ec1b1a2e88749d71b3f8dcd583f08dad/src/assets/images/homepage/ticket.png -------------------------------------------------------------------------------- /src/assets/images/logo-1200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/corgicode/frontend-react/7f365a68ec1b1a2e88749d71b3f8dcd583f08dad/src/assets/images/logo-1200.png -------------------------------------------------------------------------------- /src/assets/images/logo-large-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/corgicode/frontend-react/7f365a68ec1b1a2e88749d71b3f8dcd583f08dad/src/assets/images/logo-large-hover.png -------------------------------------------------------------------------------- /src/assets/images/logo-large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/corgicode/frontend-react/7f365a68ec1b1a2e88749d71b3f8dcd583f08dad/src/assets/images/logo-large.png -------------------------------------------------------------------------------- /src/assets/images/logo-square-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/corgicode/frontend-react/7f365a68ec1b1a2e88749d71b3f8dcd583f08dad/src/assets/images/logo-square-hover.png -------------------------------------------------------------------------------- /src/assets/images/logo-square.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/corgicode/frontend-react/7f365a68ec1b1a2e88749d71b3f8dcd583f08dad/src/assets/images/logo-square.png -------------------------------------------------------------------------------- /src/assets/images/logo-text-300.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/corgicode/frontend-react/7f365a68ec1b1a2e88749d71b3f8dcd583f08dad/src/assets/images/logo-text-300.png -------------------------------------------------------------------------------- /src/assets/images/logo-text-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/corgicode/frontend-react/7f365a68ec1b1a2e88749d71b3f8dcd583f08dad/src/assets/images/logo-text-hover.png -------------------------------------------------------------------------------- /src/assets/images/logo-text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/corgicode/frontend-react/7f365a68ec1b1a2e88749d71b3f8dcd583f08dad/src/assets/images/logo-text.png -------------------------------------------------------------------------------- /src/assets/images/octo-corgi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/corgicode/frontend-react/7f365a68ec1b1a2e88749d71b3f8dcd583f08dad/src/assets/images/octo-corgi.png -------------------------------------------------------------------------------- /src/assets/images/team/corginson.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/corgicode/frontend-react/7f365a68ec1b1a2e88749d71b3f8dcd583f08dad/src/assets/images/team/corginson.png -------------------------------------------------------------------------------- /src/assets/images/team/david.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/corgicode/frontend-react/7f365a68ec1b1a2e88749d71b3f8dcd583f08dad/src/assets/images/team/david.png -------------------------------------------------------------------------------- /src/assets/images/team/iva.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/corgicode/frontend-react/7f365a68ec1b1a2e88749d71b3f8dcd583f08dad/src/assets/images/team/iva.png -------------------------------------------------------------------------------- /src/assets/images/team/paul.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/corgicode/frontend-react/7f365a68ec1b1a2e88749d71b3f8dcd583f08dad/src/assets/images/team/paul.png -------------------------------------------------------------------------------- /src/assets/images/team/steph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/corgicode/frontend-react/7f365a68ec1b1a2e88749d71b3f8dcd583f08dad/src/assets/images/team/steph.png -------------------------------------------------------------------------------- /src/assets/images/team/sydney.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/corgicode/frontend-react/7f365a68ec1b1a2e88749d71b3f8dcd583f08dad/src/assets/images/team/sydney.png -------------------------------------------------------------------------------- /src/assets/images/team/tere.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/corgicode/frontend-react/7f365a68ec1b1a2e88749d71b3f8dcd583f08dad/src/assets/images/team/tere.png -------------------------------------------------------------------------------- /src/assets/images/teapot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/corgicode/frontend-react/7f365a68ec1b1a2e88749d71b3f8dcd583f08dad/src/assets/images/teapot.png -------------------------------------------------------------------------------- /src/assets/images/thanks-corgi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/corgicode/frontend-react/7f365a68ec1b1a2e88749d71b3f8dcd583f08dad/src/assets/images/thanks-corgi.png -------------------------------------------------------------------------------- /src/components/about/TeamMember.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import PropTypes from 'prop-types'; 3 | 4 | export class TeamMember extends Component { 5 | static propTypes = { 6 | title: PropTypes.string.isRequired, 7 | description: PropTypes.string.isRequired, 8 | name: PropTypes.string, 9 | image: PropTypes.string, 10 | links: PropTypes.arrayOf( 11 | PropTypes.shape({ 12 | href: PropTypes.string.isRequired, 13 | className: PropTypes.string.isRequired, 14 | }), 15 | ), 16 | } 17 | static defaultProps = { 18 | links: [], 19 | } 20 | 21 | render() { 22 | return ( 23 |
24 |
25 | 26 |
27 |
28 |

29 | {this.props.name} 30 | {this.props.title} 31 |

32 |

33 | {this.props.description} 34 |

35 |
    36 | {this.props.links.map((l, key) => ( 37 |
  • 38 | 39 | 40 | 41 |
  • 42 | ))} 43 |
44 |
45 |
46 | ); 47 | } 48 | } 49 | 50 | export default TeamMember; 51 | -------------------------------------------------------------------------------- /src/components/challenges/list.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { ChallengesType } from '../../types'; 3 | import TintedHeader from '../misc/TintedHeader'; 4 | import ChallengeShort from './short.js'; 5 | 6 | class ChallengesList extends Component { 7 | static propTypes = { 8 | challenges: ChallengesType, 9 | } 10 | 11 | render() { 12 | const { challenges } = this.props; 13 | challenges.sort((a, b) => parseInt(a.attributes.number, 10) < parseInt(b.attributes.number, 10)); 14 | return( 15 |
16 | 17 |
18 |
19 | {challenges.map((c, key) => )} 20 |
21 |
22 |
23 | ); 24 | } 25 | } 26 | 27 | export default ChallengesList; 28 | -------------------------------------------------------------------------------- /src/components/challenges/short.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { ChallengeType } from '../../types'; 3 | import { Link } from 'react-router-dom'; 4 | import DifficultyStars from '../misc/difficulty'; 5 | import Tags from '../misc/tags'; 6 | 7 | class ChallengeShort extends Component { 8 | static propTypes = { 9 | challenge: ChallengeType, 10 | } 11 | 12 | render() { 13 | const { challenge } = this.props; 14 | return( 15 |
16 |
17 |

18 | 19 | Challenge {challenge.number}: 20 | {challenge.title} 21 | 22 |

23 |
    24 |
  • 25 | Difficulty: 26 | 27 |
  • 28 |
  • 29 | 30 | Resolution: Unresolved
  • 31 |
  • 32 | 33 | Priority: { challenge.head.priority } 34 |
  • 35 |
36 |

{challenge.body.short_description && challenge.body.short_description }

37 |

{!challenge.body.short_description && challenge.body.description }

38 |

39 | 40 | Tags: 41 | 42 |

43 | Details 44 | 45 | Submit Answer 46 | 47 |
48 |
49 | ); 50 | } 51 | } 52 | 53 | export default ChallengeShort; 54 | -------------------------------------------------------------------------------- /src/components/challenges/single.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { ChallengeType } from '../../types'; 3 | import TintedHeader from '../misc/TintedHeader'; 4 | import DifficultyStars from '../misc/difficulty'; 5 | import Tags from '../misc/tags'; 6 | import Moment from '../misc/moment'; 7 | import ReactMarkdown from 'react-markdown'; 8 | import { Link } from 'react-router-dom'; 9 | import { ensureUrl } from '../../constants/utils'; 10 | import linkRenderer from '../misc/linkRenderer'; 11 | 12 | class SingleChallenge extends Component { 13 | static propTypes = { 14 | challenge: ChallengeType, 15 | } 16 | 17 | render() { 18 | const { challenge } = this.props; 19 | return( 20 |
21 | 22 |
23 |
24 |
25 |
26 |
    27 |
  • 28 | 29 | Owner: {challenge.head.owner} 30 |
  • 31 |
  • 32 | 33 | Difficulty: 34 | 35 |
  • 36 |
  • 37 | 38 | Type: { challenge.head.challenge_type } 39 |
  • 40 |
  • 41 | 42 | Tags:  43 | 44 |
  • 45 |
46 |
47 |
48 |
    49 |
  • 50 | 51 | Date Created: 52 |
  • 53 |
  • 54 | 55 | Priority: {challenge.head.priority} 56 |
  • 57 |
  • 58 | 59 | Status: { challenge.head.status } 60 |
  • 61 |
  • 62 | 63 | Resolution: { challenge.head.resolution } 64 |
  • 65 |
66 |
67 |
68 | 69 |
70 |

Description

71 |
72 | 73 |
74 |
75 |

Attachments

76 |
77 | 90 |
91 |
92 |
93 | 94 | Submit Answer 95 | 96 |
97 |

Extra Points

98 | 107 | 108 |

Technical Notes

109 |
110 | 111 |

When you're done, push to your repo and submit your answer.

112 |
113 |
114 |

Source:

115 |
123 | 124 |

Procedure:

125 |
126 | 127 |

Look at our help section for more information about this.

128 |
129 |
130 |

Coding

131 |
132 | {challenge.coding && } 133 | {!challenge.coding && 134 |
135 |

To create your answer follow this steps:

136 |
    137 |
  1. Fork 138 | the repo to your account, or download the zip file
  2. 139 |
  3. Solve the ticket
  4. 140 |
  5. Commit your code
  6. 141 |
  7. Push your changes
  8. 142 |
  9. Publish your version in Github Pages or 143 | Firebase Hosting
  10. 144 |
  11. Submit your response
  12. 145 |
146 |
147 | } 148 |
149 | 150 |

Troubleshooting | Help

151 |
152 |

If you have need clarification with the project, files, or description, open an issue on github.

153 |

For questions with the platform, email us at support@codecorgi.co

154 |

For help with github or coding, consult our Learning and Resources page, 155 | where you will find information and links to tutorials and other content.

156 |
157 |
158 | 159 | Submit Answer 160 | 161 |
162 |
163 |
164 |
165 | ); 166 | } 167 | } 168 | 169 | export default SingleChallenge; 170 | -------------------------------------------------------------------------------- /src/components/fields/Text.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { PropTypes } from 'prop-types'; 3 | 4 | class TextField extends Component { 5 | static propTypes = { 6 | label: PropTypes.string, 7 | meta: PropTypes.object.isRequired, 8 | input: PropTypes.object.isRequired, 9 | placeholder: PropTypes.string, 10 | } 11 | 12 | render() { 13 | const { label, meta, input, placeholder } = this.props; 14 | return( 15 |
16 | 20 | 27 | {/* 28 | {meta.error && meta.touched && {meta.error}}  29 | */} 30 |
31 | ); 32 | } 33 | } 34 | 35 | export default TextField; 36 | -------------------------------------------------------------------------------- /src/components/fields/TextArea.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { PropTypes } from 'prop-types'; 3 | 4 | class TextArea extends Component { 5 | static propTypes = { 6 | label: PropTypes.string, 7 | meta: PropTypes.object.isRequired, 8 | input: PropTypes.object.isRequired, 9 | placeholder: PropTypes.string, 10 | } 11 | 12 | render() { 13 | const { label, meta, input, placeholder } = this.props; 14 | return( 15 |
16 | 20 |