5 |
6 |
7 |
10 |
11 |
13 |
--------------------------------------------------------------------------------
/foodapp-finalvalidation/components/README.md:
--------------------------------------------------------------------------------
1 | # COMPONENTS
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | The components directory contains your Vue.js Components.
6 |
7 | _Nuxt.js doesn't supercharge these components._
8 |
--------------------------------------------------------------------------------
/foodapp-finalvalidation/layouts/README.md:
--------------------------------------------------------------------------------
1 | # LAYOUTS
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains your Application Layouts.
6 |
7 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/views#layouts).
8 |
--------------------------------------------------------------------------------
/foodapp-finalvalidation/layouts/default.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
22 |
23 |
52 |
--------------------------------------------------------------------------------
/foodapp-finalvalidation/middleware/README.md:
--------------------------------------------------------------------------------
1 | # MIDDLEWARE
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains your application middleware.
6 | Middleware let you define custom functions that can be run before rendering either a page or a group of pages.
7 |
8 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing#middleware).
9 |
--------------------------------------------------------------------------------
/foodapp-finalvalidation/nuxt.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | /*
3 | ** Nuxt rendering mode
4 | ** See https://nuxtjs.org/api/configuration-mode
5 | */
6 | mode: "universal",
7 | /*
8 | ** Nuxt target
9 | ** See https://nuxtjs.org/api/configuration-target
10 | */
11 | target: "static",
12 | /*
13 | ** Headers of the page
14 | ** See https://nuxtjs.org/api/configuration-head
15 | */
16 | head: {
17 | title: "Nuxt Food App",
18 | meta: [{
19 | charset: "utf-8"
20 | },
21 | {
22 | name: "viewport",
23 | content: "width=device-width, initial-scale=1"
24 | },
25 | {
26 | hid: "description",
27 | name: "description",
28 | content: "Demo of Nuxt and Vue"
29 | }
30 | ],
31 | link: [{
32 | rel: "icon",
33 | type: "image/x-icon",
34 | href: "/favicon.ico"
35 | },
36 | {
37 | rel: "stylesheet",
38 | href: "https://fonts.googleapis.com/css2?family=Mulish:wght@300&family=Poppins:wght@600&display=swap"
39 | }
40 | ]
41 | },
42 | /*
43 | ** Global CSS
44 | */
45 | css: ["~/assets/main.scss"],
46 | /*
47 | ** Plugins to load before mounting the App
48 | ** https://nuxtjs.org/guide/plugins
49 | */
50 | plugins: ["~/plugins/getfood.server.js", "~/plugins/vuelidate.js"],
51 | /*
52 | ** Auto import components
53 | ** See https://nuxtjs.org/api/configuration-components
54 | */
55 | components: true,
56 | /*
57 | ** Nuxt.js dev-modules
58 | */
59 | buildModules: [],
60 | /*
61 | ** Nuxt.js modules
62 | */
63 | modules: [],
64 | /*
65 | ** Build configuration
66 | ** See https://nuxtjs.org/api/configuration-build/
67 | */
68 | build: {}
69 | };
70 |
--------------------------------------------------------------------------------
/foodapp-finalvalidation/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "foodapp",
3 | "version": "1.0.0",
4 | "private": true,
5 | "scripts": {
6 | "dev": "nuxt",
7 | "build": "nuxt build",
8 | "start": "nuxt start",
9 | "generate": "nuxt generate"
10 | },
11 | "dependencies": {
12 | "@vue/composition-api": "^1.0.0-beta.10",
13 | "node-sass": "^4.14.1",
14 | "nuxt": "^2.14.0",
15 | "sass-loader": "^9.0.3",
16 | "uuid": "^8.3.0",
17 | "vuelidate": "^0.7.5"
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/foodapp-finalvalidation/pages/README.md:
--------------------------------------------------------------------------------
1 | # PAGES
2 |
3 | This directory contains your Application Views and Routes.
4 | The framework reads all the `*.vue` files inside this directory and creates the router of your application.
5 |
6 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing).
7 |
--------------------------------------------------------------------------------
/foodapp-finalvalidation/pages/cart.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
29 |
30 |
31 |
32 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/foodapp-problem1/components/README.md:
--------------------------------------------------------------------------------
1 | # COMPONENTS
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | The components directory contains your Vue.js Components.
6 |
7 | _Nuxt.js doesn't supercharge these components._
8 |
--------------------------------------------------------------------------------
/foodapp-problem1/layouts/README.md:
--------------------------------------------------------------------------------
1 | # LAYOUTS
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains your Application Layouts.
6 |
7 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/views#layouts).
8 |
--------------------------------------------------------------------------------
/foodapp-problem1/layouts/default.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
20 |
21 |
50 |
--------------------------------------------------------------------------------
/foodapp-problem1/middleware/README.md:
--------------------------------------------------------------------------------
1 | # MIDDLEWARE
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains your application middleware.
6 | Middleware let you define custom functions that can be run before rendering either a page or a group of pages.
7 |
8 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing#middleware).
9 |
--------------------------------------------------------------------------------
/foodapp-problem1/nuxt.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | /*
3 | ** Nuxt rendering mode
4 | ** See https://nuxtjs.org/api/configuration-mode
5 | */
6 | mode: "universal",
7 | /*
8 | ** Nuxt target
9 | ** See https://nuxtjs.org/api/configuration-target
10 | */
11 | target: "static",
12 | /*
13 | ** Headers of the page
14 | ** See https://nuxtjs.org/api/configuration-head
15 | */
16 | head: {
17 | title: "Nuxt Food App",
18 | meta: [{
19 | charset: "utf-8"
20 | },
21 | {
22 | name: "viewport",
23 | content: "width=device-width, initial-scale=1"
24 | },
25 | {
26 | hid: "description",
27 | name: "description",
28 | content: "Demo of Nuxt and Vue"
29 | }
30 | ],
31 | link: [{
32 | rel: "icon",
33 | type: "image/x-icon",
34 | href: "/favicon.ico"
35 | },
36 | {
37 | rel: "stylesheet",
38 | href: "https://fonts.googleapis.com/css2?family=Mulish:wght@300&family=Poppins:wght@600&display=swap"
39 | }
40 | ]
41 | },
42 | /*
43 | ** Global CSS
44 | */
45 | css: ["~/assets/main.scss"],
46 | /*
47 | ** Plugins to load before mounting the App
48 | ** https://nuxtjs.org/guide/plugins
49 | */
50 | plugins: [],
51 | /*
52 | ** Auto import components
53 | ** See https://nuxtjs.org/api/configuration-components
54 | */
55 | components: true,
56 | /*
57 | ** Nuxt.js dev-modules
58 | */
59 | buildModules: [],
60 | /*
61 | ** Nuxt.js modules
62 | */
63 | modules: [],
64 | /*
65 | ** Build configuration
66 | ** See https://nuxtjs.org/api/configuration-build/
67 | */
68 | build: {}
69 | };
70 |
--------------------------------------------------------------------------------
/foodapp-problem1/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "foodapp",
3 | "version": "1.0.0",
4 | "private": true,
5 | "scripts": {
6 | "dev": "nuxt",
7 | "build": "nuxt build",
8 | "start": "nuxt start",
9 | "generate": "nuxt generate"
10 | },
11 | "dependencies": {
12 | "@vue/composition-api": "^1.0.0-beta.10",
13 | "node-sass": "^4.14.1",
14 | "nuxt": "^2.14.0",
15 | "sass-loader": "^9.0.3"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/foodapp-problem1/pages/README.md:
--------------------------------------------------------------------------------
1 | # PAGES
2 |
3 | This directory contains your Application Views and Routes.
4 | The framework reads all the `*.vue` files inside this directory and creates the router of your application.
5 |
6 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing).
7 |
--------------------------------------------------------------------------------
/foodapp-problem1/pages/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/foodapp-problem1/plugins/README.md:
--------------------------------------------------------------------------------
1 | # PLUGINS
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains Javascript plugins that you want to run before mounting the root Vue.js application.
6 |
7 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/plugins).
8 |
--------------------------------------------------------------------------------
/foodapp-problem1/static/README.md:
--------------------------------------------------------------------------------
1 | # STATIC
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains your static files.
6 | Each file inside this directory is mapped to `/`.
7 | Thus you'd want to delete this README.md before deploying to production.
8 |
9 | Example: `/static/robots.txt` is mapped as `/robots.txt`.
10 |
11 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#static).
12 |
--------------------------------------------------------------------------------
/foodapp-problem1/static/dimsum-eggplant.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/building-web-apps-with-vue/569c837a70ae27014cb4d61c22c77c4efa2e0c39/foodapp-problem1/static/dimsum-eggplant.jpg
--------------------------------------------------------------------------------
/foodapp-problem1/static/dimsum-shrimp.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/building-web-apps-with-vue/569c837a70ae27014cb4d61c22c77c4efa2e0c39/foodapp-problem1/static/dimsum-shrimp.jpg
--------------------------------------------------------------------------------
/foodapp-problem1/static/dimsum-soup.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/building-web-apps-with-vue/569c837a70ae27014cb4d61c22c77c4efa2e0c39/foodapp-problem1/static/dimsum-soup.jpg
--------------------------------------------------------------------------------
/foodapp-problem1/static/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/building-web-apps-with-vue/569c837a70ae27014cb4d61c22c77c4efa2e0c39/foodapp-problem1/static/favicon.ico
--------------------------------------------------------------------------------
/foodapp-problem1/static/pizza-meat.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/building-web-apps-with-vue/569c837a70ae27014cb4d61c22c77c4efa2e0c39/foodapp-problem1/static/pizza-meat.jpg
--------------------------------------------------------------------------------
/foodapp-problem1/static/pizza-plain.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/building-web-apps-with-vue/569c837a70ae27014cb4d61c22c77c4efa2e0c39/foodapp-problem1/static/pizza-plain.jpg
--------------------------------------------------------------------------------
/foodapp-problem1/static/pizza-veggie.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/building-web-apps-with-vue/569c837a70ae27014cb4d61c22c77c4efa2e0c39/foodapp-problem1/static/pizza-veggie.jpg
--------------------------------------------------------------------------------
/foodapp-problem1/static/taco-burrito.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/building-web-apps-with-vue/569c837a70ae27014cb4d61c22c77c4efa2e0c39/foodapp-problem1/static/taco-burrito.jpg
--------------------------------------------------------------------------------
/foodapp-problem1/static/taco-quesadilla.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/building-web-apps-with-vue/569c837a70ae27014cb4d61c22c77c4efa2e0c39/foodapp-problem1/static/taco-quesadilla.png
--------------------------------------------------------------------------------
/foodapp-problem1/static/taco-taco.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/building-web-apps-with-vue/569c837a70ae27014cb4d61c22c77c4efa2e0c39/foodapp-problem1/static/taco-taco.jpg
--------------------------------------------------------------------------------
/foodapp-problem1/store/README.md:
--------------------------------------------------------------------------------
1 | # STORE
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains your Vuex Store files.
6 | Vuex Store option is implemented in the Nuxt.js framework.
7 |
8 | Creating a file in this directory automatically activates the option in the framework.
9 |
10 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/vuex-store).
11 |
--------------------------------------------------------------------------------
/foodapp-problem2/.editorconfig:
--------------------------------------------------------------------------------
1 | # editorconfig.org
2 | root = true
3 |
4 | [*]
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | charset = utf-8
9 | trim_trailing_whitespace = true
10 | insert_final_newline = true
11 |
12 | [*.md]
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/foodapp-problem2/.gitignore:
--------------------------------------------------------------------------------
1 | # Created by .ignore support plugin (hsz.mobi)
2 | ### Node template
3 | # Logs
4 | /logs
5 | *.log
6 | npm-debug.log*
7 | yarn-debug.log*
8 | yarn-error.log*
9 |
10 | # Runtime data
11 | pids
12 | *.pid
13 | *.seed
14 | *.pid.lock
15 |
16 | # Directory for instrumented libs generated by jscoverage/JSCover
17 | lib-cov
18 |
19 | # Coverage directory used by tools like istanbul
20 | coverage
21 |
22 | # nyc test coverage
23 | .nyc_output
24 |
25 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
26 | .grunt
27 |
28 | # Bower dependency directory (https://bower.io/)
29 | bower_components
30 |
31 | # node-waf configuration
32 | .lock-wscript
33 |
34 | # Compiled binary addons (https://nodejs.org/api/addons.html)
35 | build/Release
36 |
37 | # Dependency directories
38 | node_modules/
39 | jspm_packages/
40 |
41 | # TypeScript v1 declaration files
42 | typings/
43 |
44 | # Optional npm cache directory
45 | .npm
46 |
47 | # Optional eslint cache
48 | .eslintcache
49 |
50 | # Optional REPL history
51 | .node_repl_history
52 |
53 | # Output of 'npm pack'
54 | *.tgz
55 |
56 | # Yarn Integrity file
57 | .yarn-integrity
58 |
59 | # dotenv environment variables file
60 | .env
61 |
62 | # parcel-bundler cache (https://parceljs.org/)
63 | .cache
64 |
65 | # next.js build output
66 | .next
67 |
68 | # nuxt.js build output
69 | .nuxt
70 |
71 | # Nuxt generate
72 | dist
73 |
74 | # vuepress build output
75 | .vuepress/dist
76 |
77 | # Serverless directories
78 | .serverless
79 |
80 | # IDE / Editor
81 | .idea
82 |
83 | # Service worker
84 | sw.*
85 |
86 | # macOS
87 | .DS_Store
88 |
89 | # Vim swap files
90 | *.swp
91 |
--------------------------------------------------------------------------------
/foodapp-problem2/assets/README.md:
--------------------------------------------------------------------------------
1 | # ASSETS
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains your un-compiled assets such as LESS, SASS, or JavaScript.
6 |
7 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#webpacked).
8 |
--------------------------------------------------------------------------------
/foodapp-problem2/assets/headerimg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/building-web-apps-with-vue/569c837a70ae27014cb4d61c22c77c4efa2e0c39/foodapp-problem2/assets/headerimg.jpg
--------------------------------------------------------------------------------
/foodapp-problem2/components/AppFooter.vue:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/foodapp-problem2/components/AppHeader.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
14 |
15 |
16 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/foodapp-problem2/components/README.md:
--------------------------------------------------------------------------------
1 | # COMPONENTS
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | The components directory contains your Vue.js Components.
6 |
7 | _Nuxt.js doesn't supercharge these components._
8 |
--------------------------------------------------------------------------------
/foodapp-problem2/layouts/README.md:
--------------------------------------------------------------------------------
1 | # LAYOUTS
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains your Application Layouts.
6 |
7 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/views#layouts).
8 |
--------------------------------------------------------------------------------
/foodapp-problem2/layouts/default.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
22 |
23 |
52 |
--------------------------------------------------------------------------------
/foodapp-problem2/middleware/README.md:
--------------------------------------------------------------------------------
1 | # MIDDLEWARE
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains your application middleware.
6 | Middleware let you define custom functions that can be run before rendering either a page or a group of pages.
7 |
8 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing#middleware).
9 |
--------------------------------------------------------------------------------
/foodapp-problem2/nuxt.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | /*
3 | ** Nuxt rendering mode
4 | ** See https://nuxtjs.org/api/configuration-mode
5 | */
6 | mode: "universal",
7 | /*
8 | ** Nuxt target
9 | ** See https://nuxtjs.org/api/configuration-target
10 | */
11 | target: "static",
12 | /*
13 | ** Headers of the page
14 | ** See https://nuxtjs.org/api/configuration-head
15 | */
16 | head: {
17 | title: "Nuxt Food App",
18 | meta: [{
19 | charset: "utf-8"
20 | },
21 | {
22 | name: "viewport",
23 | content: "width=device-width, initial-scale=1"
24 | },
25 | {
26 | hid: "description",
27 | name: "description",
28 | content: "Demo of Nuxt and Vue"
29 | }
30 | ],
31 | link: [{
32 | rel: "icon",
33 | type: "image/x-icon",
34 | href: "/favicon.ico"
35 | },
36 | {
37 | rel: "stylesheet",
38 | href: "https://fonts.googleapis.com/css2?family=Mulish:wght@300&family=Poppins:wght@600&display=swap"
39 | }
40 | ]
41 | },
42 | /*
43 | ** Global CSS
44 | */
45 | css: ["~/assets/main.scss"],
46 | /*
47 | ** Plugins to load before mounting the App
48 | ** https://nuxtjs.org/guide/plugins
49 | */
50 | plugins: ["~/plugins/getfood.server.js"],
51 | /*
52 | ** Auto import components
53 | ** See https://nuxtjs.org/api/configuration-components
54 | */
55 | components: true,
56 | /*
57 | ** Nuxt.js dev-modules
58 | */
59 | buildModules: [],
60 | /*
61 | ** Nuxt.js modules
62 | */
63 | modules: [],
64 | /*
65 | ** Build configuration
66 | ** See https://nuxtjs.org/api/configuration-build/
67 | */
68 | build: {}
69 | };
70 |
--------------------------------------------------------------------------------
/foodapp-problem2/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "foodapp",
3 | "version": "1.0.0",
4 | "private": true,
5 | "scripts": {
6 | "dev": "nuxt",
7 | "build": "nuxt build",
8 | "start": "nuxt start",
9 | "generate": "nuxt generate"
10 | },
11 | "dependencies": {
12 | "@vue/composition-api": "^1.0.0-beta.10",
13 | "node-sass": "^4.14.1",
14 | "nuxt": "^2.14.0",
15 | "sass-loader": "^9.0.3"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/foodapp-problem2/pages/README.md:
--------------------------------------------------------------------------------
1 | # PAGES
2 |
3 | This directory contains your Application Views and Routes.
4 | The framework reads all the `*.vue` files inside this directory and creates the router of your application.
5 |
6 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing).
7 |
--------------------------------------------------------------------------------
/foodapp-problem2/pages/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/foodapp-problem2/pages/item/_id.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
34 |
35 |
37 |
--------------------------------------------------------------------------------
/foodapp-problem2/pages/restaurants.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
Restaurants
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
44 |
45 |
47 |
--------------------------------------------------------------------------------
/foodapp-problem2/plugins/README.md:
--------------------------------------------------------------------------------
1 | # PLUGINS
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains Javascript plugins that you want to run before mounting the root Vue.js application.
6 |
7 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/plugins).
8 |
--------------------------------------------------------------------------------
/foodapp-problem2/plugins/getfood.server.js:
--------------------------------------------------------------------------------
1 | export default async ({
2 | store
3 | }) => {
4 | await store.dispatch('getFoodData')
5 | }
6 |
--------------------------------------------------------------------------------
/foodapp-problem2/static/README.md:
--------------------------------------------------------------------------------
1 | # STATIC
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains your static files.
6 | Each file inside this directory is mapped to `/`.
7 | Thus you'd want to delete this README.md before deploying to production.
8 |
9 | Example: `/static/robots.txt` is mapped as `/robots.txt`.
10 |
11 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#static).
12 |
--------------------------------------------------------------------------------
/foodapp-problem2/static/dimsum-eggplant.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/building-web-apps-with-vue/569c837a70ae27014cb4d61c22c77c4efa2e0c39/foodapp-problem2/static/dimsum-eggplant.jpg
--------------------------------------------------------------------------------
/foodapp-problem2/static/dimsum-shrimp.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/building-web-apps-with-vue/569c837a70ae27014cb4d61c22c77c4efa2e0c39/foodapp-problem2/static/dimsum-shrimp.jpg
--------------------------------------------------------------------------------
/foodapp-problem2/static/dimsum-soup.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/building-web-apps-with-vue/569c837a70ae27014cb4d61c22c77c4efa2e0c39/foodapp-problem2/static/dimsum-soup.jpg
--------------------------------------------------------------------------------
/foodapp-problem2/static/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/building-web-apps-with-vue/569c837a70ae27014cb4d61c22c77c4efa2e0c39/foodapp-problem2/static/favicon.ico
--------------------------------------------------------------------------------
/foodapp-problem2/static/pizza-meat.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/building-web-apps-with-vue/569c837a70ae27014cb4d61c22c77c4efa2e0c39/foodapp-problem2/static/pizza-meat.jpg
--------------------------------------------------------------------------------
/foodapp-problem2/static/pizza-plain.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/building-web-apps-with-vue/569c837a70ae27014cb4d61c22c77c4efa2e0c39/foodapp-problem2/static/pizza-plain.jpg
--------------------------------------------------------------------------------
/foodapp-problem2/static/pizza-veggie.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/building-web-apps-with-vue/569c837a70ae27014cb4d61c22c77c4efa2e0c39/foodapp-problem2/static/pizza-veggie.jpg
--------------------------------------------------------------------------------
/foodapp-problem2/static/taco-burrito.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/building-web-apps-with-vue/569c837a70ae27014cb4d61c22c77c4efa2e0c39/foodapp-problem2/static/taco-burrito.jpg
--------------------------------------------------------------------------------
/foodapp-problem2/static/taco-quesadilla.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/building-web-apps-with-vue/569c837a70ae27014cb4d61c22c77c4efa2e0c39/foodapp-problem2/static/taco-quesadilla.png
--------------------------------------------------------------------------------
/foodapp-problem2/static/taco-taco.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/building-web-apps-with-vue/569c837a70ae27014cb4d61c22c77c4efa2e0c39/foodapp-problem2/static/taco-taco.jpg
--------------------------------------------------------------------------------
/foodapp-problem2/store/README.md:
--------------------------------------------------------------------------------
1 | # STORE
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains your Vuex Store files.
6 | Vuex Store option is implemented in the Nuxt.js framework.
7 |
8 | Creating a file in this directory automatically activates the option in the framework.
9 |
10 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/vuex-store).
11 |
--------------------------------------------------------------------------------
/foodapp-problem2/store/index.js:
--------------------------------------------------------------------------------
1 | export const state = () => ({
2 | fooddata: []
3 | });
4 |
5 | // export const getters = {
6 | // getterValue: state => {
7 | // return state.value
8 | // }
9 | // }
10 |
11 | export const mutations = {
12 | updateFoodData: (state, data) => {
13 | state.fooddata = data;
14 | }
15 | };
16 |
17 | export const actions = {
18 | async getFoodData({
19 | state,
20 | commit
21 | }) {
22 | if (state.fooddata.length) return;
23 |
24 | try {
25 | await fetch(
26 | "https://dva9vm8f1h.execute-api.us-east-2.amazonaws.com/production/restaurants", {
27 | headers: {
28 | "Content-Type": "application/json",
29 | "x-api-key": process.env.AWS_API_KEY
30 | }
31 | }
32 | )
33 | .then(response => response.json())
34 | .then(data => {
35 | commit("updateFoodData", data);
36 | });
37 | } catch (err) {
38 | console.log(err);
39 | }
40 | }
41 | };
42 |
--------------------------------------------------------------------------------
/foodapp-problem3/.editorconfig:
--------------------------------------------------------------------------------
1 | # editorconfig.org
2 | root = true
3 |
4 | [*]
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | charset = utf-8
9 | trim_trailing_whitespace = true
10 | insert_final_newline = true
11 |
12 | [*.md]
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/foodapp-problem3/.gitignore:
--------------------------------------------------------------------------------
1 | # Created by .ignore support plugin (hsz.mobi)
2 | ### Node template
3 | # Logs
4 | /logs
5 | *.log
6 | npm-debug.log*
7 | yarn-debug.log*
8 | yarn-error.log*
9 |
10 | # Runtime data
11 | pids
12 | *.pid
13 | *.seed
14 | *.pid.lock
15 |
16 | # Directory for instrumented libs generated by jscoverage/JSCover
17 | lib-cov
18 |
19 | # Coverage directory used by tools like istanbul
20 | coverage
21 |
22 | # nyc test coverage
23 | .nyc_output
24 |
25 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
26 | .grunt
27 |
28 | # Bower dependency directory (https://bower.io/)
29 | bower_components
30 |
31 | # node-waf configuration
32 | .lock-wscript
33 |
34 | # Compiled binary addons (https://nodejs.org/api/addons.html)
35 | build/Release
36 |
37 | # Dependency directories
38 | node_modules/
39 | jspm_packages/
40 |
41 | # TypeScript v1 declaration files
42 | typings/
43 |
44 | # Optional npm cache directory
45 | .npm
46 |
47 | # Optional eslint cache
48 | .eslintcache
49 |
50 | # Optional REPL history
51 | .node_repl_history
52 |
53 | # Output of 'npm pack'
54 | *.tgz
55 |
56 | # Yarn Integrity file
57 | .yarn-integrity
58 |
59 | # dotenv environment variables file
60 | .env
61 |
62 | # parcel-bundler cache (https://parceljs.org/)
63 | .cache
64 |
65 | # next.js build output
66 | .next
67 |
68 | # nuxt.js build output
69 | .nuxt
70 |
71 | # Nuxt generate
72 | dist
73 |
74 | # vuepress build output
75 | .vuepress/dist
76 |
77 | # Serverless directories
78 | .serverless
79 |
80 | # IDE / Editor
81 | .idea
82 |
83 | # Service worker
84 | sw.*
85 |
86 | # macOS
87 | .DS_Store
88 |
89 | # Vim swap files
90 | *.swp
91 |
--------------------------------------------------------------------------------
/foodapp-problem3/assets/README.md:
--------------------------------------------------------------------------------
1 | # ASSETS
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains your un-compiled assets such as LESS, SASS, or JavaScript.
6 |
7 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#webpacked).
8 |
--------------------------------------------------------------------------------
/foodapp-problem3/assets/headerimg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/building-web-apps-with-vue/569c837a70ae27014cb4d61c22c77c4efa2e0c39/foodapp-problem3/assets/headerimg.jpg
--------------------------------------------------------------------------------
/foodapp-problem3/components/AppFooter.vue:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/foodapp-problem3/components/AppHeader.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
10 |
11 |
13 |
--------------------------------------------------------------------------------
/foodapp-problem3/components/README.md:
--------------------------------------------------------------------------------
1 | # COMPONENTS
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | The components directory contains your Vue.js Components.
6 |
7 | _Nuxt.js doesn't supercharge these components._
8 |
--------------------------------------------------------------------------------
/foodapp-problem3/layouts/README.md:
--------------------------------------------------------------------------------
1 | # LAYOUTS
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains your Application Layouts.
6 |
7 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/views#layouts).
8 |
--------------------------------------------------------------------------------
/foodapp-problem3/layouts/default.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
22 |
23 |
52 |
--------------------------------------------------------------------------------
/foodapp-problem3/middleware/README.md:
--------------------------------------------------------------------------------
1 | # MIDDLEWARE
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains your application middleware.
6 | Middleware let you define custom functions that can be run before rendering either a page or a group of pages.
7 |
8 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing#middleware).
9 |
--------------------------------------------------------------------------------
/foodapp-problem3/nuxt.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | /*
3 | ** Nuxt rendering mode
4 | ** See https://nuxtjs.org/api/configuration-mode
5 | */
6 | mode: "universal",
7 | /*
8 | ** Nuxt target
9 | ** See https://nuxtjs.org/api/configuration-target
10 | */
11 | target: "static",
12 | /*
13 | ** Headers of the page
14 | ** See https://nuxtjs.org/api/configuration-head
15 | */
16 | head: {
17 | title: "Nuxt Food App",
18 | meta: [{
19 | charset: "utf-8"
20 | },
21 | {
22 | name: "viewport",
23 | content: "width=device-width, initial-scale=1"
24 | },
25 | {
26 | hid: "description",
27 | name: "description",
28 | content: "Demo of Nuxt and Vue"
29 | }
30 | ],
31 | link: [{
32 | rel: "icon",
33 | type: "image/x-icon",
34 | href: "/favicon.ico"
35 | },
36 | {
37 | rel: "stylesheet",
38 | href: "https://fonts.googleapis.com/css2?family=Mulish:wght@300&family=Poppins:wght@600&display=swap"
39 | }
40 | ]
41 | },
42 | /*
43 | ** Global CSS
44 | */
45 | css: ["~/assets/main.scss"],
46 | /*
47 | ** Plugins to load before mounting the App
48 | ** https://nuxtjs.org/guide/plugins
49 | */
50 | plugins: ["~/plugins/getfood.server.js"],
51 | /*
52 | ** Auto import components
53 | ** See https://nuxtjs.org/api/configuration-components
54 | */
55 | components: true,
56 | /*
57 | ** Nuxt.js dev-modules
58 | */
59 | buildModules: [],
60 | /*
61 | ** Nuxt.js modules
62 | */
63 | modules: [],
64 | /*
65 | ** Build configuration
66 | ** See https://nuxtjs.org/api/configuration-build/
67 | */
68 | build: {}
69 | };
70 |
--------------------------------------------------------------------------------
/foodapp-problem3/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "foodapp",
3 | "version": "1.0.0",
4 | "private": true,
5 | "scripts": {
6 | "dev": "nuxt",
7 | "build": "nuxt build",
8 | "start": "nuxt start",
9 | "generate": "nuxt generate"
10 | },
11 | "dependencies": {
12 | "@vue/composition-api": "^1.0.0-beta.10",
13 | "node-sass": "^4.14.1",
14 | "nuxt": "^2.14.0",
15 | "sass-loader": "^9.0.3",
16 | "uuid": "^8.3.0"
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/foodapp-problem3/pages/README.md:
--------------------------------------------------------------------------------
1 | # PAGES
2 |
3 | This directory contains your Application Views and Routes.
4 | The framework reads all the `*.vue` files inside this directory and creates the router of your application.
5 |
6 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing).
7 |
--------------------------------------------------------------------------------
/foodapp-problem3/pages/cart.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
29 |
30 |
31 |
32 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/foodapp-solution1/components/README.md:
--------------------------------------------------------------------------------
1 | # COMPONENTS
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | The components directory contains your Vue.js Components.
6 |
7 | _Nuxt.js doesn't supercharge these components._
8 |
--------------------------------------------------------------------------------
/foodapp-solution1/layouts/README.md:
--------------------------------------------------------------------------------
1 | # LAYOUTS
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains your Application Layouts.
6 |
7 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/views#layouts).
8 |
--------------------------------------------------------------------------------
/foodapp-solution1/layouts/default.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
22 |
23 |
52 |
--------------------------------------------------------------------------------
/foodapp-solution1/middleware/README.md:
--------------------------------------------------------------------------------
1 | # MIDDLEWARE
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains your application middleware.
6 | Middleware let you define custom functions that can be run before rendering either a page or a group of pages.
7 |
8 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing#middleware).
9 |
--------------------------------------------------------------------------------
/foodapp-solution1/nuxt.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | /*
3 | ** Nuxt rendering mode
4 | ** See https://nuxtjs.org/api/configuration-mode
5 | */
6 | mode: "universal",
7 | /*
8 | ** Nuxt target
9 | ** See https://nuxtjs.org/api/configuration-target
10 | */
11 | target: "static",
12 | /*
13 | ** Headers of the page
14 | ** See https://nuxtjs.org/api/configuration-head
15 | */
16 | head: {
17 | title: "Nuxt Food App",
18 | meta: [{
19 | charset: "utf-8"
20 | },
21 | {
22 | name: "viewport",
23 | content: "width=device-width, initial-scale=1"
24 | },
25 | {
26 | hid: "description",
27 | name: "description",
28 | content: "Demo of Nuxt and Vue"
29 | }
30 | ],
31 | link: [{
32 | rel: "icon",
33 | type: "image/x-icon",
34 | href: "/favicon.ico"
35 | },
36 | {
37 | rel: "stylesheet",
38 | href: "https://fonts.googleapis.com/css2?family=Mulish:wght@300&family=Poppins:wght@600&display=swap"
39 | }
40 | ]
41 | },
42 | /*
43 | ** Global CSS
44 | */
45 | css: ["~/assets/main.scss"],
46 | /*
47 | ** Plugins to load before mounting the App
48 | ** https://nuxtjs.org/guide/plugins
49 | */
50 | plugins: [],
51 | /*
52 | ** Auto import components
53 | ** See https://nuxtjs.org/api/configuration-components
54 | */
55 | components: true,
56 | /*
57 | ** Nuxt.js dev-modules
58 | */
59 | buildModules: [],
60 | /*
61 | ** Nuxt.js modules
62 | */
63 | modules: [],
64 | /*
65 | ** Build configuration
66 | ** See https://nuxtjs.org/api/configuration-build/
67 | */
68 | build: {}
69 | };
70 |
--------------------------------------------------------------------------------
/foodapp-solution1/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "foodapp",
3 | "version": "1.0.0",
4 | "private": true,
5 | "scripts": {
6 | "dev": "nuxt",
7 | "build": "nuxt build",
8 | "start": "nuxt start",
9 | "generate": "nuxt generate"
10 | },
11 | "dependencies": {
12 | "@vue/composition-api": "^1.0.0-beta.10",
13 | "node-sass": "^4.14.1",
14 | "nuxt": "^2.14.0",
15 | "sass-loader": "^9.0.3"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/foodapp-solution1/pages/README.md:
--------------------------------------------------------------------------------
1 | # PAGES
2 |
3 | This directory contains your Application Views and Routes.
4 | The framework reads all the `*.vue` files inside this directory and creates the router of your application.
5 |
6 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing).
7 |
--------------------------------------------------------------------------------
/foodapp-solution1/pages/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/foodapp-solution1/pages/restaurants.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
Restaurants
5 |
6 |
7 |
8 |
9 |
10 |
11 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/foodapp-solution1/plugins/README.md:
--------------------------------------------------------------------------------
1 | # PLUGINS
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains Javascript plugins that you want to run before mounting the root Vue.js application.
6 |
7 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/plugins).
8 |
--------------------------------------------------------------------------------
/foodapp-solution1/static/README.md:
--------------------------------------------------------------------------------
1 | # STATIC
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains your static files.
6 | Each file inside this directory is mapped to `/`.
7 | Thus you'd want to delete this README.md before deploying to production.
8 |
9 | Example: `/static/robots.txt` is mapped as `/robots.txt`.
10 |
11 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#static).
12 |
--------------------------------------------------------------------------------
/foodapp-solution1/static/dimsum-eggplant.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/building-web-apps-with-vue/569c837a70ae27014cb4d61c22c77c4efa2e0c39/foodapp-solution1/static/dimsum-eggplant.jpg
--------------------------------------------------------------------------------
/foodapp-solution1/static/dimsum-shrimp.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/building-web-apps-with-vue/569c837a70ae27014cb4d61c22c77c4efa2e0c39/foodapp-solution1/static/dimsum-shrimp.jpg
--------------------------------------------------------------------------------
/foodapp-solution1/static/dimsum-soup.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/building-web-apps-with-vue/569c837a70ae27014cb4d61c22c77c4efa2e0c39/foodapp-solution1/static/dimsum-soup.jpg
--------------------------------------------------------------------------------
/foodapp-solution1/static/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/building-web-apps-with-vue/569c837a70ae27014cb4d61c22c77c4efa2e0c39/foodapp-solution1/static/favicon.ico
--------------------------------------------------------------------------------
/foodapp-solution1/static/pizza-meat.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/building-web-apps-with-vue/569c837a70ae27014cb4d61c22c77c4efa2e0c39/foodapp-solution1/static/pizza-meat.jpg
--------------------------------------------------------------------------------
/foodapp-solution1/static/pizza-plain.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/building-web-apps-with-vue/569c837a70ae27014cb4d61c22c77c4efa2e0c39/foodapp-solution1/static/pizza-plain.jpg
--------------------------------------------------------------------------------
/foodapp-solution1/static/pizza-veggie.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/building-web-apps-with-vue/569c837a70ae27014cb4d61c22c77c4efa2e0c39/foodapp-solution1/static/pizza-veggie.jpg
--------------------------------------------------------------------------------
/foodapp-solution1/static/taco-burrito.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/building-web-apps-with-vue/569c837a70ae27014cb4d61c22c77c4efa2e0c39/foodapp-solution1/static/taco-burrito.jpg
--------------------------------------------------------------------------------
/foodapp-solution1/static/taco-quesadilla.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/building-web-apps-with-vue/569c837a70ae27014cb4d61c22c77c4efa2e0c39/foodapp-solution1/static/taco-quesadilla.png
--------------------------------------------------------------------------------
/foodapp-solution1/static/taco-taco.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/building-web-apps-with-vue/569c837a70ae27014cb4d61c22c77c4efa2e0c39/foodapp-solution1/static/taco-taco.jpg
--------------------------------------------------------------------------------
/foodapp-solution1/store/README.md:
--------------------------------------------------------------------------------
1 | # STORE
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains your Vuex Store files.
6 | Vuex Store option is implemented in the Nuxt.js framework.
7 |
8 | Creating a file in this directory automatically activates the option in the framework.
9 |
10 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/vuex-store).
11 |
--------------------------------------------------------------------------------
/foodapp-solution2/.editorconfig:
--------------------------------------------------------------------------------
1 | # editorconfig.org
2 | root = true
3 |
4 | [*]
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | charset = utf-8
9 | trim_trailing_whitespace = true
10 | insert_final_newline = true
11 |
12 | [*.md]
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/foodapp-solution2/.gitignore:
--------------------------------------------------------------------------------
1 | # Created by .ignore support plugin (hsz.mobi)
2 | ### Node template
3 | # Logs
4 | /logs
5 | *.log
6 | npm-debug.log*
7 | yarn-debug.log*
8 | yarn-error.log*
9 |
10 | # Runtime data
11 | pids
12 | *.pid
13 | *.seed
14 | *.pid.lock
15 |
16 | # Directory for instrumented libs generated by jscoverage/JSCover
17 | lib-cov
18 |
19 | # Coverage directory used by tools like istanbul
20 | coverage
21 |
22 | # nyc test coverage
23 | .nyc_output
24 |
25 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
26 | .grunt
27 |
28 | # Bower dependency directory (https://bower.io/)
29 | bower_components
30 |
31 | # node-waf configuration
32 | .lock-wscript
33 |
34 | # Compiled binary addons (https://nodejs.org/api/addons.html)
35 | build/Release
36 |
37 | # Dependency directories
38 | node_modules/
39 | jspm_packages/
40 |
41 | # TypeScript v1 declaration files
42 | typings/
43 |
44 | # Optional npm cache directory
45 | .npm
46 |
47 | # Optional eslint cache
48 | .eslintcache
49 |
50 | # Optional REPL history
51 | .node_repl_history
52 |
53 | # Output of 'npm pack'
54 | *.tgz
55 |
56 | # Yarn Integrity file
57 | .yarn-integrity
58 |
59 | # dotenv environment variables file
60 | .env
61 |
62 | # parcel-bundler cache (https://parceljs.org/)
63 | .cache
64 |
65 | # next.js build output
66 | .next
67 |
68 | # nuxt.js build output
69 | .nuxt
70 |
71 | # Nuxt generate
72 | dist
73 |
74 | # vuepress build output
75 | .vuepress/dist
76 |
77 | # Serverless directories
78 | .serverless
79 |
80 | # IDE / Editor
81 | .idea
82 |
83 | # Service worker
84 | sw.*
85 |
86 | # macOS
87 | .DS_Store
88 |
89 | # Vim swap files
90 | *.swp
91 |
--------------------------------------------------------------------------------
/foodapp-solution2/assets/README.md:
--------------------------------------------------------------------------------
1 | # ASSETS
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains your un-compiled assets such as LESS, SASS, or JavaScript.
6 |
7 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#webpacked).
8 |
--------------------------------------------------------------------------------
/foodapp-solution2/assets/headerimg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/building-web-apps-with-vue/569c837a70ae27014cb4d61c22c77c4efa2e0c39/foodapp-solution2/assets/headerimg.jpg
--------------------------------------------------------------------------------
/foodapp-solution2/components/AppFooter.vue:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/foodapp-solution2/components/AppHeader.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
14 |
15 |
16 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/foodapp-solution2/components/README.md:
--------------------------------------------------------------------------------
1 | # COMPONENTS
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | The components directory contains your Vue.js Components.
6 |
7 | _Nuxt.js doesn't supercharge these components._
8 |
--------------------------------------------------------------------------------
/foodapp-solution2/layouts/README.md:
--------------------------------------------------------------------------------
1 | # LAYOUTS
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains your Application Layouts.
6 |
7 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/views#layouts).
8 |
--------------------------------------------------------------------------------
/foodapp-solution2/layouts/default.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
22 |
23 |
52 |
--------------------------------------------------------------------------------
/foodapp-solution2/middleware/README.md:
--------------------------------------------------------------------------------
1 | # MIDDLEWARE
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains your application middleware.
6 | Middleware let you define custom functions that can be run before rendering either a page or a group of pages.
7 |
8 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing#middleware).
9 |
--------------------------------------------------------------------------------
/foodapp-solution2/nuxt.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | /*
3 | ** Nuxt rendering mode
4 | ** See https://nuxtjs.org/api/configuration-mode
5 | */
6 | mode: "universal",
7 | /*
8 | ** Nuxt target
9 | ** See https://nuxtjs.org/api/configuration-target
10 | */
11 | target: "static",
12 | /*
13 | ** Headers of the page
14 | ** See https://nuxtjs.org/api/configuration-head
15 | */
16 | head: {
17 | title: "Nuxt Food App",
18 | meta: [{
19 | charset: "utf-8"
20 | },
21 | {
22 | name: "viewport",
23 | content: "width=device-width, initial-scale=1"
24 | },
25 | {
26 | hid: "description",
27 | name: "description",
28 | content: "Demo of Nuxt and Vue"
29 | }
30 | ],
31 | link: [{
32 | rel: "icon",
33 | type: "image/x-icon",
34 | href: "/favicon.ico"
35 | },
36 | {
37 | rel: "stylesheet",
38 | href: "https://fonts.googleapis.com/css2?family=Mulish:wght@300&family=Poppins:wght@600&display=swap"
39 | }
40 | ]
41 | },
42 | /*
43 | ** Global CSS
44 | */
45 | css: ["~/assets/main.scss"],
46 | /*
47 | ** Plugins to load before mounting the App
48 | ** https://nuxtjs.org/guide/plugins
49 | */
50 | plugins: ["~/plugins/getfood.server.js"],
51 | /*
52 | ** Auto import components
53 | ** See https://nuxtjs.org/api/configuration-components
54 | */
55 | components: true,
56 | /*
57 | ** Nuxt.js dev-modules
58 | */
59 | buildModules: [],
60 | /*
61 | ** Nuxt.js modules
62 | */
63 | modules: [],
64 | /*
65 | ** Build configuration
66 | ** See https://nuxtjs.org/api/configuration-build/
67 | */
68 | build: {}
69 | };
70 |
--------------------------------------------------------------------------------
/foodapp-solution2/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "foodapp",
3 | "version": "1.0.0",
4 | "private": true,
5 | "scripts": {
6 | "dev": "nuxt",
7 | "build": "nuxt build",
8 | "start": "nuxt start",
9 | "generate": "nuxt generate"
10 | },
11 | "dependencies": {
12 | "@vue/composition-api": "^1.0.0-beta.10",
13 | "node-sass": "^4.14.1",
14 | "nuxt": "^2.14.0",
15 | "sass-loader": "^9.0.3"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/foodapp-solution2/pages/README.md:
--------------------------------------------------------------------------------
1 | # PAGES
2 |
3 | This directory contains your Application Views and Routes.
4 | The framework reads all the `*.vue` files inside this directory and creates the router of your application.
5 |
6 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing).
7 |
--------------------------------------------------------------------------------
/foodapp-solution2/pages/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/foodapp-solution2/pages/restaurants.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
Restaurants
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
44 |
45 |
47 |
--------------------------------------------------------------------------------
/foodapp-solution2/plugins/README.md:
--------------------------------------------------------------------------------
1 | # PLUGINS
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains Javascript plugins that you want to run before mounting the root Vue.js application.
6 |
7 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/plugins).
8 |
--------------------------------------------------------------------------------
/foodapp-solution2/plugins/getfood.server.js:
--------------------------------------------------------------------------------
1 | export default async ({
2 | store
3 | }) => {
4 | await store.dispatch('getFoodData')
5 | }
6 |
--------------------------------------------------------------------------------
/foodapp-solution2/static/README.md:
--------------------------------------------------------------------------------
1 | # STATIC
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains your static files.
6 | Each file inside this directory is mapped to `/`.
7 | Thus you'd want to delete this README.md before deploying to production.
8 |
9 | Example: `/static/robots.txt` is mapped as `/robots.txt`.
10 |
11 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#static).
12 |
--------------------------------------------------------------------------------
/foodapp-solution2/static/dimsum-eggplant.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/building-web-apps-with-vue/569c837a70ae27014cb4d61c22c77c4efa2e0c39/foodapp-solution2/static/dimsum-eggplant.jpg
--------------------------------------------------------------------------------
/foodapp-solution2/static/dimsum-shrimp.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/building-web-apps-with-vue/569c837a70ae27014cb4d61c22c77c4efa2e0c39/foodapp-solution2/static/dimsum-shrimp.jpg
--------------------------------------------------------------------------------
/foodapp-solution2/static/dimsum-soup.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/building-web-apps-with-vue/569c837a70ae27014cb4d61c22c77c4efa2e0c39/foodapp-solution2/static/dimsum-soup.jpg
--------------------------------------------------------------------------------
/foodapp-solution2/static/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/building-web-apps-with-vue/569c837a70ae27014cb4d61c22c77c4efa2e0c39/foodapp-solution2/static/favicon.ico
--------------------------------------------------------------------------------
/foodapp-solution2/static/pizza-meat.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/building-web-apps-with-vue/569c837a70ae27014cb4d61c22c77c4efa2e0c39/foodapp-solution2/static/pizza-meat.jpg
--------------------------------------------------------------------------------
/foodapp-solution2/static/pizza-plain.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/building-web-apps-with-vue/569c837a70ae27014cb4d61c22c77c4efa2e0c39/foodapp-solution2/static/pizza-plain.jpg
--------------------------------------------------------------------------------
/foodapp-solution2/static/pizza-veggie.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/building-web-apps-with-vue/569c837a70ae27014cb4d61c22c77c4efa2e0c39/foodapp-solution2/static/pizza-veggie.jpg
--------------------------------------------------------------------------------
/foodapp-solution2/static/taco-burrito.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/building-web-apps-with-vue/569c837a70ae27014cb4d61c22c77c4efa2e0c39/foodapp-solution2/static/taco-burrito.jpg
--------------------------------------------------------------------------------
/foodapp-solution2/static/taco-quesadilla.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/building-web-apps-with-vue/569c837a70ae27014cb4d61c22c77c4efa2e0c39/foodapp-solution2/static/taco-quesadilla.png
--------------------------------------------------------------------------------
/foodapp-solution2/static/taco-taco.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/building-web-apps-with-vue/569c837a70ae27014cb4d61c22c77c4efa2e0c39/foodapp-solution2/static/taco-taco.jpg
--------------------------------------------------------------------------------
/foodapp-solution2/store/README.md:
--------------------------------------------------------------------------------
1 | # STORE
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains your Vuex Store files.
6 | Vuex Store option is implemented in the Nuxt.js framework.
7 |
8 | Creating a file in this directory automatically activates the option in the framework.
9 |
10 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/vuex-store).
11 |
--------------------------------------------------------------------------------
/foodapp-solution2/store/index.js:
--------------------------------------------------------------------------------
1 | export const state = () => ({
2 | fooddata: []
3 | });
4 |
5 | // export const getters = {
6 | // getterValue: state => {
7 | // return state.value
8 | // }
9 | // }
10 |
11 | export const mutations = {
12 | updateFoodData: (state, data) => {
13 | state.fooddata = data;
14 | }
15 | };
16 |
17 | export const actions = {
18 | async getFoodData({
19 | state,
20 | commit
21 | }) {
22 | if (state.fooddata.length) return;
23 |
24 | try {
25 | await fetch(
26 | "https://dva9vm8f1h.execute-api.us-east-2.amazonaws.com/production/restaurants", {
27 | headers: {
28 | "Content-Type": "application/json",
29 | "x-api-key": process.env.AWS_API_KEY
30 | }
31 | }
32 | )
33 | .then(response => response.json())
34 | .then(data => {
35 | commit("updateFoodData", data);
36 | });
37 | } catch (err) {
38 | console.log(err);
39 | }
40 | }
41 | };
42 |
--------------------------------------------------------------------------------
/foodapp-solution3/.editorconfig:
--------------------------------------------------------------------------------
1 | # editorconfig.org
2 | root = true
3 |
4 | [*]
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | charset = utf-8
9 | trim_trailing_whitespace = true
10 | insert_final_newline = true
11 |
12 | [*.md]
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/foodapp-solution3/.gitignore:
--------------------------------------------------------------------------------
1 | # Created by .ignore support plugin (hsz.mobi)
2 | ### Node template
3 | # Logs
4 | /logs
5 | *.log
6 | npm-debug.log*
7 | yarn-debug.log*
8 | yarn-error.log*
9 |
10 | # Runtime data
11 | pids
12 | *.pid
13 | *.seed
14 | *.pid.lock
15 |
16 | # Directory for instrumented libs generated by jscoverage/JSCover
17 | lib-cov
18 |
19 | # Coverage directory used by tools like istanbul
20 | coverage
21 |
22 | # nyc test coverage
23 | .nyc_output
24 |
25 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
26 | .grunt
27 |
28 | # Bower dependency directory (https://bower.io/)
29 | bower_components
30 |
31 | # node-waf configuration
32 | .lock-wscript
33 |
34 | # Compiled binary addons (https://nodejs.org/api/addons.html)
35 | build/Release
36 |
37 | # Dependency directories
38 | node_modules/
39 | jspm_packages/
40 |
41 | # TypeScript v1 declaration files
42 | typings/
43 |
44 | # Optional npm cache directory
45 | .npm
46 |
47 | # Optional eslint cache
48 | .eslintcache
49 |
50 | # Optional REPL history
51 | .node_repl_history
52 |
53 | # Output of 'npm pack'
54 | *.tgz
55 |
56 | # Yarn Integrity file
57 | .yarn-integrity
58 |
59 | # dotenv environment variables file
60 | .env
61 |
62 | # parcel-bundler cache (https://parceljs.org/)
63 | .cache
64 |
65 | # next.js build output
66 | .next
67 |
68 | # nuxt.js build output
69 | .nuxt
70 |
71 | # Nuxt generate
72 | dist
73 |
74 | # vuepress build output
75 | .vuepress/dist
76 |
77 | # Serverless directories
78 | .serverless
79 |
80 | # IDE / Editor
81 | .idea
82 |
83 | # Service worker
84 | sw.*
85 |
86 | # macOS
87 | .DS_Store
88 |
89 | # Vim swap files
90 | *.swp
91 |
--------------------------------------------------------------------------------
/foodapp-solution3/assets/README.md:
--------------------------------------------------------------------------------
1 | # ASSETS
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains your un-compiled assets such as LESS, SASS, or JavaScript.
6 |
7 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#webpacked).
8 |
--------------------------------------------------------------------------------
/foodapp-solution3/assets/headerimg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/building-web-apps-with-vue/569c837a70ae27014cb4d61c22c77c4efa2e0c39/foodapp-solution3/assets/headerimg.jpg
--------------------------------------------------------------------------------
/foodapp-solution3/components/AppEmptyCart.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
19 |
5 |
6 |
7 |
10 |
11 |
13 |
--------------------------------------------------------------------------------
/foodapp-solution3/components/README.md:
--------------------------------------------------------------------------------
1 | # COMPONENTS
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | The components directory contains your Vue.js Components.
6 |
7 | _Nuxt.js doesn't supercharge these components._
8 |
--------------------------------------------------------------------------------
/foodapp-solution3/layouts/README.md:
--------------------------------------------------------------------------------
1 | # LAYOUTS
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains your Application Layouts.
6 |
7 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/views#layouts).
8 |
--------------------------------------------------------------------------------
/foodapp-solution3/layouts/default.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
22 |
23 |
52 |
--------------------------------------------------------------------------------
/foodapp-solution3/middleware/README.md:
--------------------------------------------------------------------------------
1 | # MIDDLEWARE
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains your application middleware.
6 | Middleware let you define custom functions that can be run before rendering either a page or a group of pages.
7 |
8 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing#middleware).
9 |
--------------------------------------------------------------------------------
/foodapp-solution3/nuxt.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | /*
3 | ** Nuxt rendering mode
4 | ** See https://nuxtjs.org/api/configuration-mode
5 | */
6 | mode: "universal",
7 | /*
8 | ** Nuxt target
9 | ** See https://nuxtjs.org/api/configuration-target
10 | */
11 | target: "static",
12 | /*
13 | ** Headers of the page
14 | ** See https://nuxtjs.org/api/configuration-head
15 | */
16 | head: {
17 | title: "Nuxt Food App",
18 | meta: [{
19 | charset: "utf-8"
20 | },
21 | {
22 | name: "viewport",
23 | content: "width=device-width, initial-scale=1"
24 | },
25 | {
26 | hid: "description",
27 | name: "description",
28 | content: "Demo of Nuxt and Vue"
29 | }
30 | ],
31 | link: [{
32 | rel: "icon",
33 | type: "image/x-icon",
34 | href: "/favicon.ico"
35 | },
36 | {
37 | rel: "stylesheet",
38 | href: "https://fonts.googleapis.com/css2?family=Mulish:wght@300&family=Poppins:wght@600&display=swap"
39 | }
40 | ]
41 | },
42 | /*
43 | ** Global CSS
44 | */
45 | css: ["~/assets/main.scss"],
46 | /*
47 | ** Plugins to load before mounting the App
48 | ** https://nuxtjs.org/guide/plugins
49 | */
50 | plugins: ["~/plugins/getfood.server.js"],
51 | /*
52 | ** Auto import components
53 | ** See https://nuxtjs.org/api/configuration-components
54 | */
55 | components: true,
56 | /*
57 | ** Nuxt.js dev-modules
58 | */
59 | buildModules: [],
60 | /*
61 | ** Nuxt.js modules
62 | */
63 | modules: [],
64 | /*
65 | ** Build configuration
66 | ** See https://nuxtjs.org/api/configuration-build/
67 | */
68 | build: {}
69 | };
70 |
--------------------------------------------------------------------------------
/foodapp-solution3/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "foodapp",
3 | "version": "1.0.0",
4 | "private": true,
5 | "scripts": {
6 | "dev": "nuxt",
7 | "build": "nuxt build",
8 | "start": "nuxt start",
9 | "generate": "nuxt generate"
10 | },
11 | "dependencies": {
12 | "@vue/composition-api": "^1.0.0-beta.10",
13 | "node-sass": "^4.14.1",
14 | "nuxt": "^2.14.0",
15 | "sass-loader": "^9.0.3",
16 | "uuid": "^8.3.0"
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/foodapp-solution3/pages/README.md:
--------------------------------------------------------------------------------
1 | # PAGES
2 |
3 | This directory contains your Application Views and Routes.
4 | The framework reads all the `*.vue` files inside this directory and creates the router of your application.
5 |
6 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing).
7 |
--------------------------------------------------------------------------------
/foodapp-solution3/pages/cart.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 | In order to survive on Earth, you have to pretend to be a human on this
6 | planet. You took over the body of a nearby hooman, but the trouble is,
7 | their best friend showed up!
8 |
9 |
10 | They look suspicious. Answer the questions right to make sure identity is
11 | kept secret!
12 |
5 | In order to survive on Earth, you have to pretend to be a human on this
6 | planet. You took over the body of a nearby hooman, but the trouble is,
7 | their best friend showed up!
8 |
9 |
10 | They look suspicious. Answer the questions right to make sure identity is
11 | kept secret!
12 |
4 | In order to survive on Earth, you have to pretend to be a human on this
5 | planet. You took over the body of a nearby hooman, but the trouble is, their
6 | best friend showed up!
7 |
8 |
9 | They look suspicious. Answer the questions right to make sure identity is
10 | kept secret!
11 |
12 |
--------------------------------------------------------------------------------
/gameresources/questions.js:
--------------------------------------------------------------------------------
1 | const questions = [
2 | {
3 | question: `What's your dog's name?`,
4 | baker: "Woofgang Puck",
5 | mechanic: "Alf",
6 | artist: "Salvador Dogi",
7 | },
8 | {
9 | question: `What's your favorite hobby?`,
10 | baker: "Extreme ironing",
11 | mechanic: "Bacon santa cosplay",
12 | artist: "Mimosas",
13 | },
14 | {
15 | question: `What's your favorite color?`,
16 | baker: "turquoise",
17 | mechanic: "yellow",
18 | artist: "transparent",
19 | },
20 | {
21 | question: `Is cereal soup?`,
22 | baker: "You can't be serieal",
23 | mechanic: "Yes, I am Jason Lengstorf",
24 | artist: "wut",
25 | },
26 | {
27 | question: `What’s the most imaginative insult you can come up with?`,
28 | baker: "You're a substitute teacher with no lesson plan",
29 | mechanic: "Yer face is a melted welly",
30 | artist: "You eat buttons off the remote",
31 | },
32 | {
33 | question: `If peanut butter wasn’t called peanut butter, what would it be called?`,
34 | baker: "legoome",
35 | mechanic: "brown paste",
36 | artist: "groundnut smoosh",
37 | },
38 | ],
--------------------------------------------------------------------------------