11 |
12 |
13 |
33 |
34 |
41 |
--------------------------------------------------------------------------------
/src/registerServiceWorker.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable no-console */
2 |
3 | import { register } from 'register-service-worker';
4 |
5 | if (process.env.NODE_ENV === 'production') {
6 | register(`${process.env.BASE_URL}service-worker.js`, {
7 | ready() {
8 | console.log(
9 | 'App is being served from cache by a service worker.\nFor more details, visit https://goo.gl/AFskqB'
10 | );
11 | },
12 | registered() {
13 | console.log('Service worker has been registered.');
14 | },
15 | cached() {
16 | console.log('Content has been cached for offline use.');
17 | },
18 | updatefound() {
19 | console.log('New content is downloading.');
20 | },
21 | updated() {
22 | console.log('New content is available; please refresh.');
23 | },
24 | offline() {
25 | console.log('No internet connection found. App is running in offline mode.');
26 | },
27 | error(error) {
28 | console.error('Error during service worker registration:', error);
29 | },
30 | });
31 | }
32 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 Coding Garden Community
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 |
--------------------------------------------------------------------------------
/src/components/Layout/NavBar/NavMenuItem.vue:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
15 |
60 |
61 |
105 |
--------------------------------------------------------------------------------
/deploy.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | function usage() {
4 | echo "Usage: $(basename "$0") [option...] {development|staging|production}" >&2
5 | echo
6 | echo " Coding Garden Community App frontend deployment script"
7 | echo " Deploys the frontend to the specified environment on now.sh"
8 | echo
9 | echo " -h, --help Show this message"
10 | echo " -n, --now-token Specify the now token. (or set environment variable \$NOW_TOKEN)"
11 | echo " -e, --node-env Specify the node environemt. (or set environment variable \$NODE_ENV)"
12 | echo " -a, --alias Specify the deploy alias. (or set environment variable \$DEPLOY_ALIAS)"
13 | echo
14 |
15 | exit 1
16 | }
17 |
18 | while :
19 | do
20 | case "$1" in
21 | -h|--help)
22 | usage
23 | exit 0
24 | ;;
25 | -n|--now-token)
26 | # TODO: validate input length and chars
27 | NOW_TOKEN="$2"
28 | shift 2
29 | ;;
30 | -e|--node-env)
31 | # TODO: validate input length and chars
32 | NODE_ENV="$2"
33 | shift 2
34 | ;;
35 | -a|--alias)
36 | # TODO: validate input length and chars
37 | DEPLOY_ALIAS="$2"
38 | shift 2
39 | ;;
40 | --)
41 | shift
42 | break
43 | ;;
44 | -*)
45 | echo "Error: Unknown option: $1" >&2
46 | echo
47 | usage
48 | exit 1
49 | ;;
50 | *)
51 | break
52 | ;;
53 | esac
54 | done
55 |
56 | if [ -z "$NOW_TOKEN" ]; then
57 | echo "Error: NOW_TOKEN is not set via environment variable or as argument"
58 | echo
59 | usage
60 | exit 1
61 | fi
62 |
63 | if [ "$1" ]; then
64 | env=$1
65 | elif [ -n "$TRAVIS_BRANCH" ]; then
66 | case "$TRAVIS_BRANCH" in
67 | develop)
68 | env=development
69 | ;;
70 | master)
71 | env=production
72 | ;;
73 | *)
74 | echo "Missing or invalid environment."
75 | usage
76 | exit 1
77 | ;;
78 | esac
79 | fi
80 |
81 | case "$env" in
82 | development)
83 | if [ -z "$NODE_ENV" ]; then
84 | NODE_ENV=development
85 | fi
86 | if [ -z "$DEPLOY_ALIAS" ]; then
87 | DEPLOY_ALIAS=web-dev.codinggarden.community
88 | fi
89 | ;;
90 | production)
91 | if [ -z "$NODE_ENV" ]; then
92 | NODE_ENV=production
93 | fi
94 | if [ -z "$DEPLOY_ALIAS" ]; then
95 | DEPLOY_ALIAS=codinggarden.community
96 | fi
97 | ;;
98 | *)
99 | echo "Missing or invalid environment."
100 | usage
101 | exit 1
102 | ;;
103 | esac
104 |
105 | if [ -z "$NOW_TOKEN" ]; then
106 | echo "Error: NOW_TOKEN is not set via environment variable or as argument"
107 | echo
108 | usage
109 | exit 1
110 | fi
111 |
112 | echo "Deploying to $env environment with alias $DEPLOY_ALIAS"
113 |
114 | DEPLOYMENT_URL=$(npx now --token "$NOW_TOKEN" deploy -e NODE_ENV="$NODE_ENV")
115 | npx now --token "$NOW_TOKEN" alias $DEPLOYMENT_URL $DEPLOY_ALIAS
--------------------------------------------------------------------------------
/src/components/Layout/NavBar/NavBar.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
Community App
16 |
17 |
18 |
19 |
20 |
43 |
44 |
128 |
--------------------------------------------------------------------------------
/cypress/fixtures/faq.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "type": "faq",
4 | "id": "5d6768dcb5febb1658bd0ea3",
5 | "attributes": {
6 | "question": "What break timer do you use?",
7 | "answer": "It's called Time Out by Dejal. It is only available for Mac. For Windows, checkout Eye Leo. I have it setup for a 10 second micro break every 10 minutes and a 5 minute break every 60 minutes.",
8 | "createdAt": "2019-08-29T05:55:40.100Z",
9 | "updatedAt": "2019-08-29T05:55:40.100Z"
10 | }
11 | },
12 | {
13 | "type": "faq",
14 | "id": "5d6768dcb5febb1658bd0ea4",
15 | "attributes": {
16 | "question": "Will the livestream be available as a video?",
17 | "answer": "Yes! Every livestream is immediately available to watch after the stream is over. The URL is will be the same. Longer streams take time to process, but will show up on the Coding Garden videos page after a few hours.",
18 | "createdAt": "2019-08-29T05:55:40.101Z",
19 | "updatedAt": "2019-08-29T05:55:40.101Z"
20 | }
21 | },
22 | {
23 | "type": "faq",
24 | "id": "5d6768dcb5febb1658bd0ea5",
25 | "attributes": {
26 | "question": "What code editor do you use?",
27 | "answer": "In my earlier videos I used Atom. Now I use VS Code. I have lots of plugins and settings that make VS Code behave the way it does. Checkout the vscode-settings repo on github to see all of the plugins and settings I use.",
28 | "createdAt": "2019-08-29T05:55:40.101Z",
29 | "updatedAt": "2019-08-29T05:55:40.101Z"
30 | }
31 | },
32 | {
33 | "type": "faq",
34 | "id": "5d6768dcb5febb1658bd0ea6",
35 | "attributes": {
36 | "question": "What theme do you use in VS Code?",
37 | "answer": "For VS Code I use Seti-Monokai. In my older videos where I am using Atom, I use Brahalla Syntax.",
38 | "createdAt": "2019-08-29T05:55:40.101Z",
39 | "updatedAt": "2019-08-29T05:55:40.101Z"
40 | }
41 | },
42 | {
43 | "type": "faq",
44 | "id": "5d6768dcb5febb1658bd0ea7",
45 | "attributes": {
46 | "question": "What keyboard do you use?",
47 | "answer": "An inexpensive mechanical keyboard from Amazon. Check it out here: https://amzn.to/2EwYmSd",
48 | "createdAt": "2019-08-29T05:55:40.101Z",
49 | "updatedAt": "2019-08-29T05:55:40.101Z"
50 | }
51 | },
52 | {
53 | "type": "faq",
54 | "id": "5d6768dcb5febb1658bd0ea8",
55 | "attributes": {
56 | "question": "How long have you been coding?",
57 | "answer": "Over 15 years! I started coding HTML / CSS websites as a kid. Learned Java, C, C++ in college. Wrote C# / .NET desktop applications for a while. Started learning modern web technologies in my spare time, and taught JavaScript full stack web development for 3+ years.",
58 | "createdAt": "2019-08-29T05:55:40.101Z",
59 | "updatedAt": "2019-08-29T05:55:40.101Z"
60 | }
61 | },
62 | {
63 | "type": "faq",
64 | "id": "5d6768dcb5febb1658bd0ea9",
65 | "attributes": {
66 | "question": "What's the best way to contact you?",
67 | "answer": "Join the discord. https://coding.garden/discord",
68 | "createdAt": "2019-08-29T05:55:40.101Z",
69 | "updatedAt": "2019-08-29T05:55:40.101Z"
70 | }
71 | },
72 | {
73 | "type": "faq",
74 | "id": "5d6768dcb5febb1658bd0eaa",
75 | "attributes": {
76 | "question": "How do you add emojis in VS Code?",
77 | "answer": "This is a feature of Mac OS X. Press CTRL+CMD+Space to bring up the emoji menu! On Windows 10 you can use CTRL+Period",
78 | "createdAt": "2019-08-29T05:55:40.101Z",
79 | "updatedAt": "2019-08-29T05:55:40.102Z"
80 | }
81 | }
82 | ]
83 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [](https://opensource.org/licenses/MIT)    
2 |
3 | # Coding Garden Community App Frontend
4 |
5 | This repository contains the source files of the
6 | Coding Garden Community App Frontend. For more information about Community App
7 | please visit the [App Wiki](https://github.com/CodingGardenCommunity/app-wiki/wiki).
8 |
9 | ## Opening/Serving the Frontend locally:
10 |
11 | > **REMEMBER:** If you find yourself in some trouble going through this, reach out to us directly on our [Discord server](https://discord.gg/bPBuk3N).
12 |
13 | ### Prerequisites
14 |
15 | 1. **NodeJS:**
16 | Please install [NodeJS >= 10.15.0](https://nodejs.org/en/download/). Which automatically installs NPM. If you already have them, you're good to go. ✔
17 |
18 | 1. **EditorConfig:**
19 | Please visit [EditorConfig](https://editorconfig.org/) -> `Download a Plugin` section and scroll through to see if you need to install an additional Plugin/Extension for your code editor or IDE. If your IDE needs one, you should be able to find a link to that plugin/extension on that page.
20 |
21 | This prerequisite is directly related to the [`.editorconfig`](https://github.com/CodingGardenCommunity/app-frontend/blob/develop/.editorconfig) file in the root directory of this project.
22 |
23 | **_More About EditorConfig:_**
24 | EditorConfig helps maintain consistent coding styles for multiple developers working on the same project across various editors and IDEs. The EditorConfig project consists of a file format for defining coding styles and a collection of text editor plugins that enable editors to read the file format and adhere to defined styles. EditorConfig files are easily readable and they work nicely with version control systems.
25 |
26 | ---
27 |
28 | Once you have the [Prerequisites](#prerequisites) covered:
29 |
30 | 1. [Clone](https://help.github.com/articles/cloning-a-repository/) this repository from GitHub onto your local computer.
31 |
32 | ```sh
33 | $ git clone https://github.com/CodingGardenCommunity/app-frontend.git
34 | ```
35 |
36 | 1. Navigate into the project folder and install all of its necessary dependencies with npm.
37 |
38 | ```sh
39 | $ cd app-frontend
40 | $ npm install
41 | ```
42 |
43 | 1. To make sure everything is setup properly, run tests.
44 |
45 | ```sh
46 | $ npm run ci
47 | ```
48 |
49 | If all tests pass, we can safely conclude that setup is complete and its working as expected. 🙌 Wooh!!
50 | If not, don't worry. We are together on this!! Reach out to us directly on our [Discord server](https://discord.gg/bPBuk3N).
51 |
52 | 1. Once that's done, tap your back even if it feels awkward. You are ready to start contributing 😃
53 | You can run -
54 |
55 | ```sh
56 | $ npm run serve
57 | ```
58 |
59 | to start the local development server.
60 |
61 | You can now visit to view the frontend of the application.
62 |
63 | Further, checkout [package.json](https://github.com/CodingGardenCommunity/app-frontend/blob/develop/package.json) file to learn about (more) available scripts/commands.
64 |
65 | Happy coding! 🥂
66 |
--------------------------------------------------------------------------------
/patches/cypress+3.4.1.patch:
--------------------------------------------------------------------------------
1 | diff --git a/node_modules/cypress/lib/exec/spawn.js b/node_modules/cypress/lib/exec/spawn.js
2 | index ed13727..12e3439 100644
3 | --- a/node_modules/cypress/lib/exec/spawn.js
4 | +++ b/node_modules/cypress/lib/exec/spawn.js
5 | @@ -13,8 +13,8 @@ var state = require('../tasks/state');
6 | var xvfb = require('./xvfb');
7 |
8 | var _require = require('../errors'),
9 | - throwFormErrorText = _require.throwFormErrorText,
10 | - errors = _require.errors;
11 | + throwFormErrorText = _require.throwFormErrorText,
12 | + errors = _require.errors;
13 |
14 | var isXlibOrLibudevRe = /^(?:Xlib|libudev)/;
15 | var isHighSierraWarningRe = /\*\*\* WARNING/;
16 | @@ -23,7 +23,7 @@ var isRenderWorkerRe = /\.RenderWorker-/;
17 | var GARBAGE_WARNINGS = [isXlibOrLibudevRe, isHighSierraWarningRe, isRenderWorkerRe];
18 |
19 | var isGarbageLineWarning = function isGarbageLineWarning(str) {
20 | - return _.some(GARBAGE_WARNINGS, function (re) {
21 | + return _.some(GARBAGE_WARNINGS, function(re) {
22 | return re.test(str);
23 | });
24 | };
25 | @@ -82,16 +82,16 @@ module.exports = {
26 | dev: false,
27 | env: process.env,
28 | detached: false,
29 | - stdio: getStdio(needsXvfb)
30 | + stdio: getStdio(needsXvfb),
31 | });
32 |
33 | var spawn = function spawn() {
34 | var overrides = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
35 |
36 | - return new Promise(function (resolve, reject) {
37 | + return new Promise(function(resolve, reject) {
38 | _.defaults(overrides, {
39 | onStderrData: false,
40 | - electronLogging: false
41 | + electronLogging: false,
42 | });
43 |
44 | if (options.dev) {
45 | @@ -102,7 +102,7 @@ module.exports = {
46 | }
47 |
48 | var onStderrData = overrides.onStderrData,
49 | - electronLogging = overrides.electronLogging;
50 | + electronLogging = overrides.electronLogging;
51 |
52 | var envOverrides = util.getEnvOverrides();
53 | var electronArgs = _.clone(args);
54 | @@ -135,31 +135,51 @@ module.exports = {
55 |
56 | var child = cp.spawn(executable, electronArgs, stdioOptions);
57 |
58 | - child.on('close', resolve);
59 | - child.on('error', reject);
60 | + // child.on('close', resolve);
61 | + // child.on('error', reject);
62 | +
63 | + // if stdio options is set to 'pipe', then
64 | + // we should set up pipes:
65 | + // process STDIN (read stream) => child STDIN (writeable)
66 | + // child STDOUT => process STDOUT
67 | + // child STDERR => process STDERR with additional filtering
68 | + if (child.stdin) {
69 | + debug('piping process STDIN into child STDIN');
70 | + process.stdin.pipe(child.stdin);
71 | + }
72 | +
73 | + if (child.stdout) {
74 | + debug('piping child STDOUT to process STDOUT');
75 | + child.stdout.pipe(process.stdout);
76 | + }
77 |
78 | child.stdin && child.stdin.pipe(process.stdin);
79 | child.stdout && child.stdout.pipe(process.stdout);
80 |
81 | // if this is defined then we are manually piping for linux
82 | // to filter out the garbage
83 | - child.stderr && child.stderr.on('data', function (data) {
84 | - var str = data.toString();
85 |
86 | - // bail if this is warning line garbage
87 | - if (isGarbageLineWarning(str)) {
88 | - return;
89 | - }
90 | + // child.stderr &&
91 | + if (child.stderr) {
92 | + debug('piping child STDERR to process STDERR');
93 | + child.stderr.on('data', function(data) {
94 | + var str = data.toString();
95 |
96 | - // if we have a callback and this explictly returns
97 | - // false then bail
98 | - if (onStderrData && onStderrData(str) === false) {
99 | - return;
100 | - }
101 | + // bail if this is warning line garbage
102 | + if (isGarbageLineWarning(str)) {
103 | + return;
104 | + }
105 |
106 | - // else pass it along!
107 | - process.stderr.write(data);
108 | - });
109 | + // if we have a callback and this explictly returns
110 | + // false then bail
111 | + if (onStderrData && onStderrData(str) === false) {
112 | + return;
113 | + }
114 | +
115 | + // else pass it along!
116 | + process.stderr.write(data);
117 | + });
118 | + }
119 |
120 | // https://github.com/cypress-io/cypress/issues/1841
121 | // In some versions of node, it will throw on windows
122 | @@ -167,7 +187,7 @@ module.exports = {
123 | // into the child process. unpiping does not seem
124 | // to have any effect. so we're just catching the
125 | // error here and not doing anything.
126 | - process.stdin.on('error', function (err) {
127 | + process.stdin.on('error', function(err) {
128 | if (err.code === 'EPIPE') {
129 | return;
130 | }
131 | @@ -182,7 +202,10 @@ module.exports = {
132 | };
133 |
134 | var spawnInXvfb = function spawnInXvfb() {
135 | - return xvfb.start().then(userFriendlySpawn).finally(xvfb.stop);
136 | + return xvfb
137 | + .start()
138 | + .then(userFriendlySpawn)
139 | + .finally(xvfb.stop);
140 | };
141 |
142 | var userFriendlySpawn = function userFriendlySpawn(linuxWithDisplayEnv) {
143 | @@ -208,19 +231,21 @@ module.exports = {
144 | if (!debugElectron.enabled) {
145 | return false;
146 | }
147 | - }
148 | + },
149 | });
150 | }
151 |
152 | - return spawn(overrides).then(function (code) {
153 | - if (code !== 0 && brokenGtkDisplay) {
154 | - util.logBrokenGtkDisplayWarning();
155 | + return spawn(overrides)
156 | + .then(function(code) {
157 | + if (code !== 0 && brokenGtkDisplay) {
158 | + util.logBrokenGtkDisplayWarning();
159 |
160 | - return spawnInXvfb();
161 | - }
162 | + return spawnInXvfb();
163 | + }
164 |
165 | - return code;
166 | - }).catch(throwFormErrorText(errors.unexpected));
167 | + return code;
168 | + })
169 | + .catch(throwFormErrorText(errors.unexpected));
170 | };
171 |
172 | if (needsXvfb) {
173 | @@ -233,5 +258,5 @@ module.exports = {
174 | var linuxWithDisplayEnv = util.isPossibleLinuxWithIncorrectDisplay();
175 |
176 | return userFriendlySpawn(linuxWithDisplayEnv);
177 | - }
178 | + },
179 | };
180 |
--------------------------------------------------------------------------------
/public/img/icons/safari-pinned-tab.svg:
--------------------------------------------------------------------------------
1 |
2 |
4 |
150 |
--------------------------------------------------------------------------------