├── Course1
├── Bootstrap4
│ ├── .DS_Store
│ └── conFusion
│ │ ├── .DS_Store
│ │ ├── .gitignore
│ │ ├── Gruntfile.js
│ │ ├── Week1_Assignment
│ │ ├── extralarge.png
│ │ └── extrasmall.png
│ │ ├── Week2_Assignment
│ │ └── screenshot_index.png
│ │ ├── Week3_Assignment
│ │ ├── index.html
│ │ └── screenshot.png
│ │ ├── Week4_Assignment
│ │ ├── index.html
│ │ └── styles.scss
│ │ ├── __MACOSX
│ │ ├── ._aboutus.html
│ │ ├── ._contactus.html
│ │ ├── ._img
│ │ └── img
│ │ │ ├── ._.DS_Store
│ │ │ ├── ._alberto.png
│ │ │ ├── ._buffet.png
│ │ │ ├── ._logo.png
│ │ │ └── ._uthappizza.png
│ │ ├── aboutus.html
│ │ ├── contactus.html
│ │ ├── css
│ │ ├── styles-old.css
│ │ ├── styles.css
│ │ ├── styles.less
│ │ └── styles.scss
│ │ ├── img
│ │ ├── .DS_Store
│ │ ├── alberto.png
│ │ ├── buffet.png
│ │ ├── logo.png
│ │ └── uthappizza.png
│ │ ├── index.html
│ │ ├── js
│ │ └── scripts.js
│ │ ├── package-lock.json
│ │ └── package.json
├── __MACOSX
│ ├── ._Bootstrap4
│ └── Bootstrap4
│ │ ├── ._.DS_Store
│ │ ├── ._conFusion
│ │ └── conFusion
│ │ ├── ._.DS_Store
│ │ ├── ._index.html
│ │ └── ._package.json
└── git-test
│ ├── .gitignore
│ ├── index.html
│ └── package.json
├── Course2
└── React
│ ├── Week1_Assignment
│ ├── DishdetailComponent.js
│ └── MenuComponent.js
│ ├── Week2_Assignment
│ ├── AboutusComponent.js
│ └── MainComponent.js
│ ├── Week3_Assignment
│ └── DishdetailComponent.js
│ ├── Week4_Assignment
│ ├── AboutusComponent.js
│ ├── ActionCreators.js
│ ├── ActionTypes.js
│ ├── ContactComponent.js
│ ├── HomeComponent.js
│ ├── MainComponent.js
│ └── leaders.js
│ └── confusion
│ ├── .gitignore
│ ├── README.md
│ ├── package-lock.json
│ ├── package.json
│ ├── public
│ ├── assets
│ │ ├── __MACOSX
│ │ │ ├── ._images
│ │ │ └── images
│ │ │ │ ├── ._.DS_Store
│ │ │ │ ├── ._alberto.png
│ │ │ │ ├── ._buffet.png
│ │ │ │ ├── ._elaicheesecake.png
│ │ │ │ ├── ._logo.png
│ │ │ │ ├── ._uthappizza.png
│ │ │ │ ├── ._vadonut.png
│ │ │ │ └── ._zucchipakoda.png
│ │ └── images
│ │ │ ├── alberto.png
│ │ │ ├── buffet.png
│ │ │ ├── elaicheesecake.png
│ │ │ ├── logo.png
│ │ │ ├── uthappizza.png
│ │ │ ├── vadonut.png
│ │ │ └── zucchipakoda.png
│ ├── favicon.ico
│ ├── index.html
│ ├── logo192.png
│ ├── logo512.png
│ ├── manifest.json
│ └── robots.txt
│ ├── src
│ ├── App.css
│ ├── App.js
│ ├── App.test.js
│ ├── components
│ │ ├── AboutusComponent.js
│ │ ├── ContactComponent.js
│ │ ├── DishdetailComponent.js
│ │ ├── FooterComponent.js
│ │ ├── HeaderComponent.js
│ │ ├── HomeComponent.js
│ │ ├── LoadingComponent.js
│ │ ├── MainComponent.js
│ │ └── MenuComponent.js
│ ├── index.css
│ ├── index.js
│ ├── redux
│ │ ├── ActionCreators.js
│ │ ├── ActionTypes.js
│ │ ├── comments.js
│ │ ├── configureStore.js
│ │ ├── dishes.js
│ │ ├── forms.js
│ │ ├── leaders.js
│ │ └── promotions.js
│ ├── serviceWorker.js
│ └── shared
│ │ ├── baseUrl.js
│ │ ├── comments.js
│ │ ├── dishes.js
│ │ ├── leaders.js
│ │ └── promotions.js
│ └── yarn.lock
├── Course3
├── ReactNative
│ ├── Week1_Assignment
│ │ ├── AboutComponent.js
│ │ ├── ContactComponent.js
│ │ └── MainComponent.js
│ ├── Week2_Assignment
│ │ ├── ActionCreators.js
│ │ ├── ActionTypes.js
│ │ ├── DishdetailComponent.js
│ │ └── comments.js
│ ├── Week3_Assignment
│ │ ├── DishdetailComponent.js
│ │ └── ReservationComponent.js
│ └── confusion2
│ │ ├── .expo-shared
│ │ └── assets.json
│ │ ├── .gitignore
│ │ ├── App.js
│ │ ├── app.json
│ │ ├── assets
│ │ ├── icon.png
│ │ └── splash.png
│ │ ├── babel.config.js
│ │ ├── components
│ │ ├── AboutComponent.js
│ │ ├── ContactComponent.js
│ │ ├── DishdetailComponent.js
│ │ ├── FavoriteComponent.js
│ │ ├── HomeComponent.js
│ │ ├── LoadingComponent.js
│ │ ├── MainComponent.js
│ │ ├── MenuComponent.js
│ │ ├── ReservationComponent.js
│ │ └── images
│ │ │ ├── alberto.png
│ │ │ ├── buffet.png
│ │ │ ├── elaicheesecake.png
│ │ │ ├── logo.png
│ │ │ ├── uthappizza.png
│ │ │ ├── vadonut.png
│ │ │ └── zucchipakoda.png
│ │ ├── package.json
│ │ ├── redux
│ │ ├── ActionCreators.js
│ │ ├── ActionTypes.js
│ │ ├── comments.js
│ │ ├── configureStore.js
│ │ ├── dishes.js
│ │ ├── favorites.js
│ │ ├── leaders.js
│ │ └── promotions.js
│ │ ├── shared
│ │ ├── baseUrl.js
│ │ ├── comments.js
│ │ ├── dishes.js
│ │ ├── leaders.js
│ │ └── promotions.js
│ │ └── yarn.lock
└── json-server
│ ├── db.json
│ └── public
│ └── images
│ ├── .DS_Store
│ ├── alberto.png
│ ├── buffet.png
│ ├── elaicheesecake.png
│ ├── logo.png
│ ├── uthappizza.png
│ ├── vadonut.png
│ └── zucchipakoda.png
├── README.md
└── json-server
├── db.json
└── public
├── asset-manifest.json
├── assets
├── __MACOSX
│ ├── ._images
│ └── images
│ │ ├── ._.DS_Store
│ │ ├── ._alberto.png
│ │ ├── ._buffet.png
│ │ ├── ._elaicheesecake.png
│ │ ├── ._logo.png
│ │ ├── ._uthappizza.png
│ │ ├── ._vadonut.png
│ │ └── ._zucchipakoda.png
└── images
│ ├── .DS_Store
│ ├── alberto.png
│ ├── buffet.png
│ ├── elaicheesecake.png
│ ├── logo.png
│ ├── uthappizza.png
│ ├── vadonut.png
│ └── zucchipakoda.png
├── favicon.ico
├── images
├── .DS_Store
├── alberto.png
├── buffet.png
├── elaicheesecake.png
├── logo.png
├── uthappizza.png
├── vadonut.png
└── zucchipakoda.png
├── index.html
├── logo192.png
├── logo512.png
├── manifest.json
├── precache-manifest.d1eb6378353cd244bd2c324c10e796cc.js
├── robots.txt
├── service-worker.js
└── static
├── css
├── 2.55e63a42.chunk.css
├── 2.55e63a42.chunk.css.map
├── main.511ac858.chunk.css
└── main.511ac858.chunk.css.map
├── js
├── 2.4b91cb1b.chunk.js
├── 2.4b91cb1b.chunk.js.map
├── main.7bdbf10b.chunk.js
├── main.7bdbf10b.chunk.js.map
├── runtime-main.d107bd09.js
└── runtime-main.d107bd09.js.map
└── media
├── fontawesome-webfont.674f50d2.eot
├── fontawesome-webfont.912ec66d.svg
├── fontawesome-webfont.af7ae505.woff2
├── fontawesome-webfont.b06871f2.ttf
└── fontawesome-webfont.fee66e71.woff
/Course1/Bootstrap4/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course1/Bootstrap4/.DS_Store
--------------------------------------------------------------------------------
/Course1/Bootstrap4/conFusion/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course1/Bootstrap4/conFusion/.DS_Store
--------------------------------------------------------------------------------
/Course1/Bootstrap4/conFusion/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | dist
--------------------------------------------------------------------------------
/Course1/Bootstrap4/conFusion/Gruntfile.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | module.exports = function(grunt) {
4 | require("time-grunt")(grunt);
5 | require("jit-grunt")(grunt, {
6 | useminPrepare: "grunt-usemin"
7 | });
8 | grunt.initConfig({
9 | sass: {
10 | dist: {
11 | files: {
12 | "css/styles.css": "css/styles.scss"
13 | }
14 | }
15 | },
16 | watch: {
17 | files: "css/*.scss",
18 | tasks: ["sass"]
19 | },
20 | browserSync: {
21 | dev: {
22 | bsFiles: {
23 | src: ["css/*.css", "*.html", "js/*.js"]
24 | },
25 | options: {
26 | watchTask: true,
27 | server: {
28 | baseDir: "./"
29 | }
30 | }
31 | }
32 | },
33 | copy: {
34 | html: {
35 | files: [
36 | {
37 | expand: true,
38 | dot: true,
39 | cwd: "./",
40 | src: ["*.html"],
41 | dest: "dist"
42 | }
43 | ]
44 | },
45 | fonts: {
46 | files: [
47 | {
48 | expand: true,
49 | dot: true,
50 | cwd: "node_modules/font-awesome",
51 | src: ["fonts/*.*"],
52 | dest: "dist"
53 | }
54 | ]
55 | }
56 | },
57 | clean: {
58 | build: {
59 | src: ["dist/"]
60 | }
61 | },
62 | imagemin: {
63 | dynamic: {
64 | files: [
65 | {
66 | expand: true,
67 | dot: true,
68 | cwd: "./",
69 | src: ["img/*{png,jpg,gif}"],
70 | dest: "dist/"
71 | }
72 | ]
73 | }
74 | },
75 | useminPrepare: {
76 | foo: {
77 | dest: "dist",
78 | src: ["contactus.html", "aboutus.html", "index.html"]
79 | },
80 | options: {
81 | flow: {
82 | steps: {
83 | css: ["cssmin"],
84 | js: ["uglify"]
85 | },
86 | post: {
87 | css: [
88 | {
89 | name: "cssmin",
90 | createConfig: function(context, block) {
91 | var generated = context.options.generated;
92 | generated.options = {
93 | keepSpecialComments: 0,
94 | rebase: false
95 | };
96 | }
97 | }
98 | ]
99 | }
100 | }
101 | }
102 | },
103 | concat: {
104 | options: {
105 | separator: ";"
106 | },
107 | dist: {}
108 | },
109 | uglify: {
110 | dist: {}
111 | },
112 | cssmin: {
113 | dist: {}
114 | },
115 | filerev: {
116 | options: {
117 | encoding: "utf8",
118 | algorithm: "md5",
119 | length: 20
120 | },
121 | release: {
122 | files: [
123 | {
124 | src: ["dist/js/*.js", "dist/css/*.css"]
125 | }
126 | ]
127 | }
128 | },
129 | usemin: {
130 | html: ["dist/contactus.html", "dist/aboutus.html", "dist/index.html"],
131 | options: {
132 | assetsFirs: ["dist", "dist/css", "dist/js"]
133 | }
134 | },
135 | htmlmin: {
136 | dist: {
137 | options: {
138 | collapseWhitespace: true
139 | },
140 | files: {
141 | "dist/index.html": "dist/index.html",
142 | "dist/contactus.html": "dist/contactus.html",
143 | "dist/aboutus.html": "dist/aboutus.html"
144 | }
145 | }
146 | }
147 | });
148 | grunt.registerTask("css", ["sass"]);
149 | grunt.registerTask("default", ["browserSync", "watch"]);
150 | grunt.registerTask("build", [
151 | "clean",
152 | "copy",
153 | "imagemin",
154 | "useminPrepare",
155 | "concat",
156 | "cssmin",
157 | "uglify",
158 | "filerev",
159 | "usemin",
160 | "htmlmin"
161 | ]);
162 | };
163 |
--------------------------------------------------------------------------------
/Course1/Bootstrap4/conFusion/Week1_Assignment/extralarge.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course1/Bootstrap4/conFusion/Week1_Assignment/extralarge.png
--------------------------------------------------------------------------------
/Course1/Bootstrap4/conFusion/Week1_Assignment/extrasmall.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course1/Bootstrap4/conFusion/Week1_Assignment/extrasmall.png
--------------------------------------------------------------------------------
/Course1/Bootstrap4/conFusion/Week2_Assignment/screenshot_index.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course1/Bootstrap4/conFusion/Week2_Assignment/screenshot_index.png
--------------------------------------------------------------------------------
/Course1/Bootstrap4/conFusion/Week3_Assignment/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course1/Bootstrap4/conFusion/Week3_Assignment/screenshot.png
--------------------------------------------------------------------------------
/Course1/Bootstrap4/conFusion/Week4_Assignment/styles.scss:
--------------------------------------------------------------------------------
1 | $lt-gray: #ddd;
2 | $background-dark: #512da8;
3 | $background-light: #9575cd;
4 | $background-pale: #d1c4e9;
5 |
6 | //Height variables
7 | $carousel-item-height: 300px;
8 |
9 | @mixin zero-margin($pad-up-dn, $pad-left-right) {
10 | margin: 0px auto;
11 | padding: $pad-up-dn $pad-left-right;
12 | }
13 |
14 | .row-header {
15 | @include zero-margin(0px, 0px);
16 | }
17 |
18 | .row-content {
19 | @include zero-margin(50px, 0px);
20 | border-bottom: 1px ridge;
21 | min-height: 400px;
22 | }
23 |
24 | .footer {
25 | background-color: $background-pale;
26 | @include zero-margin(20px, 0px);
27 | }
28 |
29 | .jumbotron {
30 | @include zero-margin(70px, 30px);
31 | background: $background-light;
32 | color: floralwhite;
33 | }
34 |
35 | address {
36 | font-size: 80%;
37 | margin: 0px;
38 | color: #0f0f0f;
39 | }
40 |
41 | body {
42 | padding: 50px 0px 0px 0px;
43 | z-index: 0;
44 | }
45 |
46 | .navbar-dark {
47 | background-color: $background-dark;
48 | }
49 |
50 | .tab-content {
51 | border-left: 1px solid $lt-gray;
52 | border-right: 1px solid $lt-gray;
53 | border-bottom: 1px solid $lt-gray;
54 | padding: 10px;
55 | }
56 |
57 | .carousel {
58 | background: $background-dark;
59 |
60 | .carousel-item {
61 | height: $carousel-item-height;
62 |
63 | img {
64 | position: absolute;
65 | top: 0px;
66 | left: 0px;
67 | min-height: 300px;
68 | }
69 | }
70 | }
71 |
72 | #carouselButton {
73 | right: 0px;
74 | position: absolute;
75 | bottom: 0px;
76 | }
77 |
78 | .modal-header {
79 | background-color: $background-dark;
80 |
81 | h4 {
82 | color: floralwhite;
83 | }
84 |
85 | button {
86 | color: floralwhite;
87 | }
88 | }
89 |
90 | .modal-body {
91 | background-color: $background-pale;
92 | }
93 |
--------------------------------------------------------------------------------
/Course1/Bootstrap4/conFusion/__MACOSX/._aboutus.html:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course1/Bootstrap4/conFusion/__MACOSX/._aboutus.html
--------------------------------------------------------------------------------
/Course1/Bootstrap4/conFusion/__MACOSX/._contactus.html:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course1/Bootstrap4/conFusion/__MACOSX/._contactus.html
--------------------------------------------------------------------------------
/Course1/Bootstrap4/conFusion/__MACOSX/._img:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course1/Bootstrap4/conFusion/__MACOSX/._img
--------------------------------------------------------------------------------
/Course1/Bootstrap4/conFusion/__MACOSX/img/._.DS_Store:
--------------------------------------------------------------------------------
1 | Mac OS X 2 F x ATTR x x
--------------------------------------------------------------------------------
/Course1/Bootstrap4/conFusion/__MACOSX/img/._alberto.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course1/Bootstrap4/conFusion/__MACOSX/img/._alberto.png
--------------------------------------------------------------------------------
/Course1/Bootstrap4/conFusion/__MACOSX/img/._buffet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course1/Bootstrap4/conFusion/__MACOSX/img/._buffet.png
--------------------------------------------------------------------------------
/Course1/Bootstrap4/conFusion/__MACOSX/img/._logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course1/Bootstrap4/conFusion/__MACOSX/img/._logo.png
--------------------------------------------------------------------------------
/Course1/Bootstrap4/conFusion/__MACOSX/img/._uthappizza.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course1/Bootstrap4/conFusion/__MACOSX/img/._uthappizza.png
--------------------------------------------------------------------------------
/Course1/Bootstrap4/conFusion/css/styles-old.css:
--------------------------------------------------------------------------------
1 | .row-header {
2 | margin: 0px auto;
3 | padding: 0px auto;
4 | }
5 |
6 | .row-content {
7 | margin: 0px auto;
8 | padding: 50px 0px 50px 0px;
9 | border-bottom: 1px ridge;
10 | min-height: 400px;
11 | }
12 |
13 | .footer {
14 | background: #d1c4e9;
15 | margin: 0px auto;
16 | padding: 20px 0px 20px 0px;
17 | }
18 |
19 | .jumbotron {
20 | padding: 70px 30px 70px 30px;
21 | margin: 0px auto;
22 | background: #9575cd;
23 | color: floralwhite;
24 | }
25 |
26 | .address {
27 | font-size: 80%;
28 | margin: 0px;
29 | color: #0f0f0f;
30 | }
31 |
32 | body {
33 | padding: 50px 0px 0px 0px;
34 | z-index: 0;
35 | }
36 |
37 | .navbar-dark {
38 | background-color: #512da8;
39 | }
40 |
41 | .tab-content {
42 | border-left: 1px solid #ddd;
43 | border-right: 1px solid #ddd;
44 | border-bottom: 1px solid #ddd;
45 | padding: 10px;
46 | }
47 |
48 | .carousel {
49 | background: #512da8;
50 | }
51 |
52 | .carousel-item {
53 | height: 300px;
54 | }
55 |
56 | .carousel-item img {
57 | position: absolute;
58 | top: 0;
59 | left: 0;
60 | min-height: 300px;
61 | }
62 |
63 | #carouselButton {
64 | right: 0px;
65 | position: absolute;
66 | bottom: 0px;
67 | z-index: 1;
68 | }
69 |
--------------------------------------------------------------------------------
/Course1/Bootstrap4/conFusion/css/styles.css:
--------------------------------------------------------------------------------
1 | .row-header {
2 | margin: 0px auto;
3 | padding: 0px 0px; }
4 |
5 | .row-content {
6 | margin: 0px auto;
7 | padding: 50px 0px;
8 | border-bottom: 1px ridge;
9 | min-height: 400px; }
10 |
11 | .footer {
12 | background-color: #d1c4e9;
13 | margin: 0px auto;
14 | padding: 20px 0px; }
15 |
16 | .jumbotron {
17 | margin: 0px auto;
18 | padding: 70px 30px;
19 | background: #9575cd;
20 | color: floralwhite; }
21 |
22 | address {
23 | font-size: 80%;
24 | margin: 0px;
25 | color: #0f0f0f; }
26 |
27 | body {
28 | padding: 50px 0px 0px 0px;
29 | z-index: 0; }
30 |
31 | .navbar-dark {
32 | background-color: #512da8; }
33 |
34 | .tab-content {
35 | border-left: 1px solid #ddd;
36 | border-right: 1px solid #ddd;
37 | border-bottom: 1px solid #ddd;
38 | padding: 10px; }
39 |
40 | .carousel {
41 | background: #512da8; }
42 | .carousel .carousel-item {
43 | height: 300px; }
44 | .carousel .carousel-item img {
45 | position: absolute;
46 | top: 0px;
47 | left: 0px;
48 | min-height: 300px; }
49 |
50 | #carouselButton {
51 | right: 0px;
52 | position: absolute;
53 | bottom: 0px; }
54 |
55 | .modal-header {
56 | background-color: #512da8; }
57 | .modal-header h4 {
58 | color: floralwhite; }
59 | .modal-header button {
60 | color: floralwhite; }
61 |
62 | .modal-body {
63 | background-color: #d1c4e9; }
64 |
--------------------------------------------------------------------------------
/Course1/Bootstrap4/conFusion/css/styles.less:
--------------------------------------------------------------------------------
1 | @lt-gray: #ddd;
2 | @background-dark: #512da8;
3 | @background-light: #9575cd;
4 | @background-pale: #d1c4e9;
5 |
6 | //Height variables
7 | @carousel-item-height: 300px;
8 |
9 | .zero-margin(@pad-up-dn:0px,@pad-left-right:0px) {
10 | margin: 0px auto;
11 | padding: @pad-up-dn @pad-left-right;
12 | }
13 |
14 | .row-header {
15 | .zero-margin();
16 | }
17 |
18 | .row-content {
19 | .zero-margin(50px, 0px);
20 | border-bottom: 1px ridge;
21 | min-height: 400px;
22 | }
23 |
24 | .footer {
25 | background-color: @background-pale;
26 | .zero-margin(20px, 0px);
27 | }
28 |
29 | .jumbotron {
30 | .zero-margin(70px, 30px);
31 | background: @background-light;
32 | color: floralwhite;
33 | }
34 |
35 | address {
36 | font-size: 80%;
37 | margin: 0px;
38 | color: #0f0f0f;
39 | }
40 |
41 | body {
42 | padding: 50px 0px 0px 0px;
43 | z-index: 0;
44 | }
45 |
46 | .navbar-dark {
47 | background-color: @background-dark;
48 | }
49 |
50 | .tab-content {
51 | border-left: 1px solid @lt-gray;
52 | border-right: 1px solid @lt-gray;
53 | border-bottom: 1px solid @lt-gray;
54 | padding: 10px;
55 | }
56 |
57 | .carousel {
58 | background: @background-dark;
59 |
60 | .carousel-item {
61 | height: @carousel-item-height;
62 |
63 | img {
64 | position: absolute;
65 | top: 0px;
66 | left: 0px;
67 | min-height: 300px;
68 | }
69 | }
70 | }
71 |
72 | #carouselButton {
73 | right: 0px;
74 | position: absolute;
75 | bottom: 0px;
76 | }
77 |
--------------------------------------------------------------------------------
/Course1/Bootstrap4/conFusion/css/styles.scss:
--------------------------------------------------------------------------------
1 | $lt-gray: #ddd;
2 | $background-dark: #512da8;
3 | $background-light: #9575cd;
4 | $background-pale: #d1c4e9;
5 |
6 | //Height variables
7 | $carousel-item-height: 300px;
8 |
9 | @mixin zero-margin($pad-up-dn, $pad-left-right) {
10 | margin: 0px auto;
11 | padding: $pad-up-dn $pad-left-right;
12 | }
13 |
14 | .row-header {
15 | @include zero-margin(0px, 0px);
16 | }
17 |
18 | .row-content {
19 | @include zero-margin(50px, 0px);
20 | border-bottom: 1px ridge;
21 | min-height: 400px;
22 | }
23 |
24 | .footer {
25 | background-color: $background-pale;
26 | @include zero-margin(20px, 0px);
27 | }
28 |
29 | .jumbotron {
30 | @include zero-margin(70px, 30px);
31 | background: $background-light;
32 | color: floralwhite;
33 | }
34 |
35 | address {
36 | font-size: 80%;
37 | margin: 0px;
38 | color: #0f0f0f;
39 | }
40 |
41 | body {
42 | padding: 50px 0px 0px 0px;
43 | z-index: 0;
44 | }
45 |
46 | .navbar-dark {
47 | background-color: $background-dark;
48 | }
49 |
50 | .tab-content {
51 | border-left: 1px solid $lt-gray;
52 | border-right: 1px solid $lt-gray;
53 | border-bottom: 1px solid $lt-gray;
54 | padding: 10px;
55 | }
56 |
57 | .carousel {
58 | background: $background-dark;
59 |
60 | .carousel-item {
61 | height: $carousel-item-height;
62 |
63 | img {
64 | position: absolute;
65 | top: 0px;
66 | left: 0px;
67 | min-height: 300px;
68 | }
69 | }
70 | }
71 |
72 | #carouselButton {
73 | right: 0px;
74 | position: absolute;
75 | bottom: 0px;
76 | }
77 |
78 | .modal-header {
79 | background-color: $background-dark;
80 |
81 | h4 {
82 | color: floralwhite;
83 | }
84 |
85 | button {
86 | color: floralwhite;
87 | }
88 | }
89 |
90 | .modal-body {
91 | background-color: $background-pale;
92 | }
93 |
--------------------------------------------------------------------------------
/Course1/Bootstrap4/conFusion/img/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course1/Bootstrap4/conFusion/img/.DS_Store
--------------------------------------------------------------------------------
/Course1/Bootstrap4/conFusion/img/alberto.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course1/Bootstrap4/conFusion/img/alberto.png
--------------------------------------------------------------------------------
/Course1/Bootstrap4/conFusion/img/buffet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course1/Bootstrap4/conFusion/img/buffet.png
--------------------------------------------------------------------------------
/Course1/Bootstrap4/conFusion/img/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course1/Bootstrap4/conFusion/img/logo.png
--------------------------------------------------------------------------------
/Course1/Bootstrap4/conFusion/img/uthappizza.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course1/Bootstrap4/conFusion/img/uthappizza.png
--------------------------------------------------------------------------------
/Course1/Bootstrap4/conFusion/js/scripts.js:
--------------------------------------------------------------------------------
1 | $(document).ready(function() {
2 | $("#mycarousel").carousel({ interval: 2000 });
3 | $("#carouselButton").click(function() {
4 | if (
5 | $("#carouselButton")
6 | .children("span")
7 | .hasClass("fa-pause")
8 | ) {
9 | $("#mycarousel").carousel("pause");
10 | $("#carouselButton")
11 | .children("span")
12 | .removeClass("fa-pause");
13 | $("#carouselButton")
14 | .children("span")
15 | .addClass("fa-play");
16 | } else {
17 | $("#mycarousel").carousel("cycle");
18 | $("#carouselButton")
19 | .children("span")
20 | .removeClass("fa-play");
21 | $("#carouselButton")
22 | .children("span")
23 | .addClass("fa-pause");
24 | }
25 | });
26 | $("#reserveButton").click(function() {
27 | $("#reserveModal").modal("show");
28 | });
29 | $("#loginButton").click(function() {
30 | $("#loginModal").modal("show");
31 | });
32 | });
33 | //JavaScript File
34 |
--------------------------------------------------------------------------------
/Course1/Bootstrap4/conFusion/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "confusion",
3 | "version": "1.0.0",
4 | "description": "This is a website for Ristorante Con Fusion",
5 | "main": "index.html",
6 | "scripts": {
7 | "start": "npm run watch:all",
8 | "test": "echo \"Error: no test specified\" && exit 1",
9 | "lite": "lite-server",
10 | "scss": "node-sass -o css/ css/",
11 | "watch:scss": "onchange \"css/*.scss\" -- npm run scss",
12 | "watch:all": "parallelshell \"npm run watch:scss\" \"npm run lite\"",
13 | "clean": "rimraf dist",
14 | "copyfonts": "copyfiles -f node_modules/font-awesome/fonts/* dist/fonts",
15 | "imagemin": "imagemin img/* --out-dir=dist/img",
16 | "usemin": "usemin contactus.html -d dist --htmlmin -o dist/contactus.html & usemin aboutus.html -d dist --htmlmin -o dist/aboutus.html && usemin index.html -d dist --htmlmin -o dist/index.html",
17 | "build": "npm run clean && npm run copyfonts && npm run imagemin && npm run usemin"
18 | },
19 | "author": "",
20 | "license": "ISC",
21 | "devDependencies": {
22 | "cssmin": "^0.4.3",
23 | "grunt": "^1.0.2",
24 | "grunt-browser-sync": "^2.2.0",
25 | "grunt-contrib-clean": "^1.1.0",
26 | "grunt-contrib-copy": "^1.0.0",
27 | "grunt-contrib-imagemin": "^2.0.1",
28 | "grunt-contrib-watch": "^1.0.0",
29 | "grunt-sass": "^2.1.0",
30 | "gulp": "^3.9.1",
31 | "htmlmin": "0.0.7",
32 | "jit-grunt": "^0.10.0",
33 | "lite-server": "^2.5.4",
34 | "node-sass": "^4.12.0",
35 | "onchange": "^6.1.0",
36 | "parallelshell": "^3.0.1",
37 | "time-grunt": "^1.4.0",
38 | "uglifyjs": "^2.4.11",
39 | "usemin-cli": "^0.5.1"
40 | },
41 | "dependencies": {
42 | "bootstrap": "^4.0.0",
43 | "bootstrap-social": "^5.1.1",
44 | "font-awesome": "^4.7.0",
45 | "grunt-contrib-concat": "^1.0.1",
46 | "grunt-contrib-cssmin": "^2.2.1",
47 | "grunt-contrib-htmlmin": "^2.4.0",
48 | "grunt-contrib-uglify": "^3.3.0",
49 | "grunt-filerev": "^2.3.1",
50 | "grunt-usemin": "^3.1.1",
51 | "jquery": "^3.3.1",
52 | "popper.js": "^1.12.9",
53 | "rimraf": "^3.0.0"
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/Course1/__MACOSX/._Bootstrap4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course1/__MACOSX/._Bootstrap4
--------------------------------------------------------------------------------
/Course1/__MACOSX/Bootstrap4/._.DS_Store:
--------------------------------------------------------------------------------
1 | Mac OS X 2 F x ATTR x x
--------------------------------------------------------------------------------
/Course1/__MACOSX/Bootstrap4/._conFusion:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course1/__MACOSX/Bootstrap4/._conFusion
--------------------------------------------------------------------------------
/Course1/__MACOSX/Bootstrap4/conFusion/._.DS_Store:
--------------------------------------------------------------------------------
1 | Mac OS X 2 F x ATTR x x
--------------------------------------------------------------------------------
/Course1/__MACOSX/Bootstrap4/conFusion/._index.html:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course1/__MACOSX/Bootstrap4/conFusion/._index.html
--------------------------------------------------------------------------------
/Course1/__MACOSX/Bootstrap4/conFusion/._package.json:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course1/__MACOSX/Bootstrap4/conFusion/._package.json
--------------------------------------------------------------------------------
/Course1/git-test/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
--------------------------------------------------------------------------------
/Course1/git-test/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | This is a Header
7 | This is paragraph
8 | This is second paragraph
9 | This is third paragraph
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Course1/git-test/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "git-test",
3 | "version": "1.0.0",
4 | "description": "The test project to learn first course",
5 | "main": "index.html",
6 | "scripts": {
7 | "start": "npm run lite",
8 | "test": "echo \"Error: no test specified\" && exit 1",
9 | "lite": "lite-server"
10 | },
11 | "repository": {
12 | "type": "git",
13 | "url": "git+https://github.com/ashutosh1919/Full_Stack_Web_Development_Course.git"
14 | },
15 | "author": "Ashutosh Hathidara",
16 | "license": "ISC",
17 | "bugs": {
18 | "url": "https://github.com/ashutosh1919/Full_Stack_Web_Development_Course/issues"
19 | },
20 | "homepage": "https://github.com/ashutosh1919/Full_Stack_Web_Development_Course#readme"
21 | }
22 |
--------------------------------------------------------------------------------
/Course2/React/Week1_Assignment/DishdetailComponent.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import {
3 | Card,
4 | CardImg,
5 | CardImgOverlay,
6 | CardText,
7 | CardBody,
8 | CardTitle
9 | } from "reactstrap";
10 |
11 | class DishdetailComponent extends Component {
12 | constructor(props) {
13 | super(props);
14 | }
15 |
16 | render() {
17 | if (this.props.selectedDish != null) {
18 | var dish = this.props.selectedDish;
19 | return (
20 |
21 |
22 |
23 |
24 | {dish.name}
25 | {dish.description}
26 |
27 |
28 |
29 | );
30 | } else {
31 | return
;
32 | }
33 | }
34 | }
35 |
36 | export default DishdetailComponent;
37 |
--------------------------------------------------------------------------------
/Course2/React/Week1_Assignment/MenuComponent.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import {
3 | Card,
4 | CardImg,
5 | CardImgOverlay,
6 | CardText,
7 | CardBody,
8 | CardTitle
9 | } from "reactstrap";
10 |
11 | import DishdetailComponent from "./DishdetailComponent";
12 |
13 | class Menu extends Component {
14 | constructor(props) {
15 | super(props);
16 |
17 | this.state = {
18 | selectedDish: null
19 | };
20 | }
21 |
22 | onDishSelect(dish) {
23 | this.setState({ selectedDish: dish });
24 | }
25 |
26 | renderDish(dish) {
27 | if (dish != null) {
28 | return (
29 |
30 |
31 |
32 | {dish.name}
33 | {dish.description}
34 |
35 |
36 | );
37 | } else {
38 | return
;
39 | }
40 | }
41 |
42 | renderComments(dish) {
43 | var comments;
44 | if (dish != null) {
45 | comments = dish.comments;
46 | } else {
47 | comments = null;
48 | }
49 | if (comments != null) {
50 | const coms = comments.map(com => {
51 | return (
52 |
53 |
56 |
57 |
-- {com.author}
58 |
59 |
60 | );
61 | });
62 | return (
63 |
64 |
Comments
65 |
{coms}
66 |
67 | );
68 | } else {
69 | return
;
70 | }
71 | }
72 |
73 | render() {
74 | const menu = this.props.dishes.map(dish => {
75 | return (
76 |
77 | this.onDishSelect(dish)}>
78 |
79 |
80 | {dish.name}
81 |
82 |
83 |
84 | );
85 | });
86 | return (
87 |
88 |
{menu}
89 |
90 |
91 |
94 |
95 |
96 | {this.renderComments(this.state.selectedDish)}
97 |
98 |
99 |
100 | );
101 | }
102 | }
103 |
104 | export default Menu;
105 |
--------------------------------------------------------------------------------
/Course2/React/Week2_Assignment/AboutusComponent.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import {
3 | Breadcrumb,
4 | BreadcrumbItem,
5 | Card,
6 | CardBody,
7 | CardHeader,
8 | Media
9 | } from "reactstrap";
10 | import { Link } from "react-router-dom";
11 |
12 | function RenderLeader({ leader }) {
13 | if (leader != null) {
14 | return (
15 |
16 |
17 |
18 |
19 |
20 | {leader.name}
21 | {leader.designation}
22 | {leader.description}
23 |
24 |
25 | );
26 | } else {
27 | return
;
28 | }
29 | }
30 |
31 | function About(props) {
32 | const leaders = props.leaders.map(leader => {
33 | return (
34 |
35 |
36 |
37 | );
38 | });
39 |
40 | return (
41 |
42 |
43 |
44 |
45 | Home
46 |
47 | About Us
48 |
49 |
50 |
About Us
51 |
52 |
53 |
54 |
55 |
56 |
Our History
57 |
58 | Started in 2010, Ristorante con Fusion quickly established itself as
59 | a culinary icon par excellence in Hong Kong. With its unique brand
60 | of world fusion cuisine that can be found nowhere else, it enjoys
61 | patronage from the A-list clientele in Hong Kong. Featuring four of
62 | the best three-star Michelin chefs in the world, you never know what
63 | will arrive on your plate the next time you visit us.
64 |
65 |
66 | The restaurant traces its humble beginnings to{" "}
67 | The Frying Pan , a successful chain started by our CEO, Mr.
68 | Peter Pan, that featured for the first time the world's best
69 | cuisines in a pan.
70 |
71 |
72 |
73 |
74 |
75 | Facts At a Glance
76 |
77 |
78 |
79 | Started
80 | 3 Feb. 2013
81 | Major Stake Holder
82 | HK Fine Foods Inc.
83 | Last Year's Turnover
84 | $1,250,375
85 | Employees
86 | 40
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 | You better cut the pizza in four pieces because I'm not hungry
97 | enough to eat six.
98 |
99 |
100 | Yogi Berra,
101 |
102 | The Wit and Wisdom of Yogi Berra, P. Pepe, Diversion Books,
103 | 2014
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
Corporate Leadership
114 |
115 |
116 |
117 | {leaders}
118 |
119 |
120 |
121 |
122 | );
123 | }
124 |
125 | export default About;
126 |
--------------------------------------------------------------------------------
/Course2/React/Week2_Assignment/MainComponent.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import Menu from "./MenuComponent";
3 | import { DISHES } from "../shared/dishes";
4 | import { COMMENTS } from "../shared/comments";
5 | import { LEADERS } from "../shared/leaders";
6 | import { PROMOTIONS } from "../shared/promotions";
7 | import DishdetailComponent from "./DishdetailComponent";
8 | import Header from "./HeaderComponent";
9 | import Footer from "./FooterComponent";
10 | import Home from "./HomeComponent";
11 | import { Switch, Route, Redirect } from "react-router-dom";
12 | import Contact from "./ContactComponent";
13 | import About from "./AboutusComponent";
14 |
15 | class Main extends Component {
16 | constructor(props) {
17 | super(props);
18 |
19 | this.state = {
20 | dishes: DISHES,
21 | comments: COMMENTS,
22 | promotions: PROMOTIONS,
23 | leaders: LEADERS
24 | };
25 | }
26 |
27 | render() {
28 | const HomePage = () => {
29 | return (
30 | dish.featured)[0]}
32 | promotion={this.state.promotions.filter(promo => promo.featured)[0]}
33 | leader={this.state.leaders.filter(leader => leader.featured)[0]}
34 | />
35 | );
36 | };
37 |
38 | const DishWithId = ({ match }) => {
39 | return (
40 | dish.id === parseInt(match.params.dishId, 10)
44 | )[0]
45 | }
46 | comments={this.state.comments.filter(
47 | comment => comment.dishId === parseInt(match.params.dishId, 10)
48 | )}
49 | />
50 | );
51 | };
52 |
53 | return (
54 |
55 |
56 |
57 |
58 | }
62 | />
63 |
64 | }
68 | />
69 |
70 |
71 |
72 | {/*
this.onDishSelect(dishId)}
75 | />
76 | dish.id === this.state.selectedDish
80 | )[0]
81 | }
82 | /> */}
83 |
84 |
85 | );
86 | }
87 | }
88 |
89 | export default Main;
90 |
--------------------------------------------------------------------------------
/Course2/React/Week3_Assignment/DishdetailComponent.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import {
3 | Card,
4 | CardImg,
5 | CardImgOverlay,
6 | CardText,
7 | CardBody,
8 | CardTitle,
9 | Breadcrumb,
10 | BreadcrumbItem,
11 | Button,
12 | Modal,
13 | ModalHeader,
14 | ModalBody,
15 | Col,
16 | Label,
17 | Row
18 | } from "reactstrap";
19 | import { Link } from "react-router-dom";
20 | import { LocalForm, Control, Errors } from "react-redux-form";
21 |
22 | const required = val => val && val.length;
23 | const maxLength = len => val => !val || val.length <= len;
24 | const minLength = len => val => !val || val.length >= len;
25 |
26 | class CommentForm extends Component {
27 | constructor(props) {
28 | super(props);
29 | this.state = {
30 | isModalOpen: false
31 | };
32 | this.toggleModal = this.toggleModal.bind(this);
33 | this.handleSubmit = this.handleSubmit.bind(this);
34 | }
35 | toggleModal() {
36 | this.setState({
37 | isModalOpen: !this.state.isModalOpen
38 | });
39 | }
40 | handleSubmit(values) {
41 | this.toggleModal();
42 | alert(JSON.stringify(values));
43 | // event.preventDefault();
44 | }
45 | render() {
46 | return (
47 |
48 |
49 | Submit Comment
50 |
51 |
52 | Submit Comment
53 |
54 | this.handleSubmit(values)}>
55 |
56 |
57 | Rating
58 |
59 |
60 |
65 | 1
66 | 2
67 | 3
68 | 4
69 | 5
70 |
71 |
72 |
73 |
74 |
75 | Your Name
76 |
77 |
78 |
90 |
100 |
101 |
102 |
103 |
104 | Comment
105 |
106 |
107 |
114 |
115 |
116 |
117 |
118 |
119 | Submit
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 | );
128 | }
129 | }
130 |
131 | // THIS IS START OF DISH DETAIL
132 |
133 | function RenderDish({ dish }) {
134 | return (
135 |
136 |
137 |
138 | {dish.name}
139 | {dish.description}
140 |
141 |
142 | );
143 | }
144 |
145 | function RenderComments({ comments }) {
146 | if (comments != null) {
147 | const coms = comments.map(com => {
148 | return (
149 |
150 |
151 |
{com.comment}
152 |
153 |
154 |
155 | -- {com.author},
156 | {new Intl.DateTimeFormat("en-US", {
157 | year: "numeric",
158 | month: "short",
159 | day: "2-digit"
160 | }).format(new Date(Date.parse(com.date)))}
161 |
162 |
163 |
164 | );
165 | });
166 | return (
167 |
168 |
Comments
169 |
{coms}
170 |
171 |
172 | );
173 | } else {
174 | return
;
175 | }
176 | }
177 |
178 | const DishdetailComponent = props => {
179 | if (props.dish != null) {
180 | var dish = props.selectedDish;
181 | return (
182 |
183 |
184 |
185 |
186 | Menu
187 |
188 | {props.dish.name}
189 |
190 |
191 |
{props.dish.name}
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 | );
205 | } else {
206 | return
;
207 | }
208 | };
209 |
210 | export default DishdetailComponent;
211 |
--------------------------------------------------------------------------------
/Course2/React/Week4_Assignment/AboutusComponent.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import {
3 | Breadcrumb,
4 | BreadcrumbItem,
5 | Card,
6 | CardBody,
7 | CardHeader,
8 | Media
9 | } from "reactstrap";
10 | import { Link } from "react-router-dom";
11 | import { baseUrl } from "../shared/baseUrl";
12 | import { Loading } from "./LoadingComponent";
13 | import { Fade, Stagger } from "react-animation-components";
14 |
15 | function RenderLeader({ leader }) {
16 | if (leader != null) {
17 | return (
18 |
19 |
20 |
21 |
22 |
23 | {leader.name}
24 | {leader.designation}
25 | {leader.description}
26 |
27 |
28 | );
29 | } else {
30 | return
;
31 | }
32 | }
33 |
34 | function About(props) {
35 | function RenderContent({ leaders, isLoading, errMess }) {
36 | if (isLoading) {
37 | return ;
38 | } else if (errMess) {
39 | return {errMess} ;
40 | } else
41 | return (
42 |
43 | {props.leaders.map(leader => (
44 |
45 |
46 |
47 | ))}
48 |
49 | );
50 | }
51 |
52 | const leaders = props.leaders.map(leader => {
53 | return (
54 |
55 |
56 |
57 | );
58 | });
59 |
60 | return (
61 |
62 |
63 |
64 |
65 | Home
66 |
67 | About Us
68 |
69 |
70 |
About Us
71 |
72 |
73 |
74 |
75 |
76 |
Our History
77 |
78 | Started in 2010, Ristorante con Fusion quickly established itself as
79 | a culinary icon par excellence in Hong Kong. With its unique brand
80 | of world fusion cuisine that can be found nowhere else, it enjoys
81 | patronage from the A-list clientele in Hong Kong. Featuring four of
82 | the best three-star Michelin chefs in the world, you never know what
83 | will arrive on your plate the next time you visit us.
84 |
85 |
86 | The restaurant traces its humble beginnings to{" "}
87 | The Frying Pan , a successful chain started by our CEO, Mr.
88 | Peter Pan, that featured for the first time the world's best
89 | cuisines in a pan.
90 |
91 |
92 |
93 |
94 |
95 | Facts At a Glance
96 |
97 |
98 |
99 | Started
100 | 3 Feb. 2013
101 | Major Stake Holder
102 | HK Fine Foods Inc.
103 | Last Year's Turnover
104 | $1,250,375
105 | Employees
106 | 40
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 | You better cut the pizza in four pieces because I'm not hungry
117 | enough to eat six.
118 |
119 |
120 | Yogi Berra,
121 |
122 | The Wit and Wisdom of Yogi Berra, P. Pepe, Diversion Books,
123 | 2014
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
Corporate Leadership
134 |
135 |
136 |
137 |
138 |
143 |
144 |
145 |
146 |
147 |
148 | );
149 | }
150 |
151 | export default About;
152 |
--------------------------------------------------------------------------------
/Course2/React/Week4_Assignment/ActionCreators.js:
--------------------------------------------------------------------------------
1 | import * as ActionTypes from "./ActionTypes";
2 | import { baseUrl } from "../shared/baseUrl";
3 |
4 | export const addComment = comment => ({
5 | type: ActionTypes.ADD_COMMENT,
6 | payload: comment
7 | });
8 |
9 | export const postComment = (dishId, rating, author, comment) => dispatch => {
10 | const newComment = {
11 | dishId: dishId,
12 | rating: rating,
13 | author: author,
14 | comment: comment
15 | };
16 | newComment.date = new Date().toISOString();
17 | return fetch(baseUrl + "comments", {
18 | method: "POST",
19 | body: JSON.stringify(newComment),
20 | headers: {
21 | "Content-Type": "application/json"
22 | },
23 | credentials: "same-origin"
24 | })
25 | .then(
26 | response => {
27 | if (response.ok) {
28 | return response;
29 | } else {
30 | var error = new Error(
31 | "Error " + response.status + ": " + response.statusText
32 | );
33 | error.response = response;
34 | throw error;
35 | }
36 | },
37 | error => {
38 | var errmess = new Error(error.message);
39 | throw errmess;
40 | }
41 | )
42 | .then(response => response.json())
43 | .then(response => dispatch(addComment(response)))
44 | .catch(error => {
45 | console.log("Post Comments ", error.message);
46 | alert("Your comment could not be posted\nError: " + error.message);
47 | });
48 | };
49 |
50 | export const fetchDishes = () => dispatch => {
51 | dispatch(dishesLoading(true));
52 | return fetch(baseUrl + "dishes")
53 | .then(
54 | response => {
55 | if (response.ok) {
56 | return response;
57 | } else {
58 | var error = new Error(
59 | "Error " + response.status + ": " + response.statusText
60 | );
61 | error.response = response;
62 | throw error;
63 | }
64 | },
65 | error => {
66 | var errmess = new Error(error.message);
67 | throw errmess;
68 | }
69 | )
70 | .then(response => response.json())
71 | .then(dishes => dispatch(addDishes(dishes)))
72 | .catch(error => dispatch(dishesFailed(error.message)));
73 | };
74 |
75 | export const dishesLoading = () => ({
76 | type: ActionTypes.DISHES_LOADING
77 | });
78 |
79 | export const dishesFailed = errmess => ({
80 | type: ActionTypes.DISHES_FAILED,
81 | payload: errmess
82 | });
83 |
84 | export const addDishes = dishes => ({
85 | type: ActionTypes.ADD_DISHES,
86 | payload: dishes
87 | });
88 |
89 | export const fetchComments = () => dispatch => {
90 | return fetch(baseUrl + "comments")
91 | .then(
92 | response => {
93 | if (response.ok) {
94 | return response;
95 | } else {
96 | var error = new Error(
97 | "Error " + response.status + ": " + response.statusText
98 | );
99 | error.response = response;
100 | throw error;
101 | }
102 | },
103 | error => {
104 | var errmess = new Error(error.message);
105 | throw errmess;
106 | }
107 | )
108 | .then(response => response.json())
109 | .then(comments => dispatch(addComments(comments)))
110 | .catch(error => dispatch(commentsFailed(error.message)));
111 | };
112 |
113 | export const commentsFailed = errmess => ({
114 | type: ActionTypes.COMMENTS_FAILED,
115 | payload: errmess
116 | });
117 |
118 | export const addComments = comments => ({
119 | type: ActionTypes.ADD_COMMENTS,
120 | payload: comments
121 | });
122 |
123 | export const fetchPromos = () => dispatch => {
124 | dispatch(promosLoading());
125 |
126 | return fetch(baseUrl + "promotions")
127 | .then(
128 | response => {
129 | if (response.ok) {
130 | return response;
131 | } else {
132 | var error = new Error(
133 | "Error " + response.status + ": " + response.statusText
134 | );
135 | error.response = response;
136 | throw error;
137 | }
138 | },
139 | error => {
140 | var errmess = new Error(error.message);
141 | throw errmess;
142 | }
143 | )
144 | .then(response => response.json())
145 | .then(promos => dispatch(addPromos(promos)))
146 | .catch(error => dispatch(promosFailed(error.message)));
147 | };
148 |
149 | export const promosLoading = () => ({
150 | type: ActionTypes.PROMOS_LOADING
151 | });
152 |
153 | export const promosFailed = errmess => ({
154 | type: ActionTypes.PROMOS_FAILED,
155 | payload: errmess
156 | });
157 |
158 | export const addPromos = promos => ({
159 | type: ActionTypes.ADD_PROMOS,
160 | payload: promos
161 | });
162 |
163 | export const fetchLeaders = () => dispatch => {
164 | dispatch(leadersLoading());
165 |
166 | return fetch(baseUrl + "leaders")
167 | .then(
168 | response => {
169 | if (response.ok) {
170 | return response;
171 | } else {
172 | var error = new Error(
173 | "Error " + response.status + ": " + response.statusText
174 | );
175 | error.response = response;
176 | throw error;
177 | }
178 | },
179 | error => {
180 | var errmess = new Error(error.message);
181 | throw errmess;
182 | }
183 | )
184 | .then(response => response.json())
185 | .then(leaders => dispatch(addLeaders(leaders)))
186 | .catch(error => dispatch(leadersFailed(error.message)));
187 | };
188 | export const leadersLoading = () => ({
189 | type: ActionTypes.LEADERS_LOADING
190 | });
191 |
192 | export const leadersFailed = errmess => ({
193 | type: ActionTypes.LEADERS_FAILED,
194 | payload: errmess
195 | });
196 |
197 | export const addLeaders = leaders => ({
198 | type: ActionTypes.ADD_LEADERS,
199 | payload: leaders
200 | });
201 |
202 | export const postFeedback = (
203 | firstname,
204 | lastname,
205 | telnum,
206 | email,
207 | agree,
208 | contactType,
209 | message
210 | ) => dispatch => {
211 | const newFeedback = {
212 | firstname: firstname,
213 | lastname: lastname,
214 | telnum: telnum,
215 | email: email,
216 | agree: agree,
217 | contactType: contactType,
218 | message: message
219 | };
220 |
221 | return fetch(baseUrl + "feedback", {
222 | method: "POST",
223 | body: JSON.stringify(newFeedback),
224 | headers: {
225 | "Content-Type": "application/json"
226 | },
227 | credentials: "same-origin"
228 | })
229 | .then(
230 | response => {
231 | if (response.ok) {
232 | return response;
233 | } else {
234 | var error = new Error(
235 | "Error " + response.status + ": " + response.statusText
236 | );
237 | error.response = response;
238 | throw error;
239 | }
240 | },
241 | error => {
242 | throw error;
243 | }
244 | )
245 | .then(response => response.json())
246 | .then(response =>
247 | alert("Thank you for your feedback!" + JSON.stringify(response))
248 | )
249 | .catch(error => {
250 | console.log("post feedbacks", error.message);
251 | alert("Your feedback could not be posted\nError: " + error.message);
252 | });
253 | };
254 |
--------------------------------------------------------------------------------
/Course2/React/Week4_Assignment/ActionTypes.js:
--------------------------------------------------------------------------------
1 | export const ADD_COMMENT = "ADD_COMMENT";
2 | export const DISHES_LOADING = "DISHES_LOADING";
3 | export const DISHES_FAILED = "DISHES_FAILED";
4 | export const ADD_DISHES = "ADD_DISHES";
5 | export const ADD_COMMENTS = "ADD_COMMENTS";
6 | export const COMMENTS_FAILED = "COMMENTS_FAILED";
7 | export const PROMOS_LOADING = "PROMOS_LOADING";
8 | export const ADD_PROMOS = "ADD_PROMOS";
9 | export const PROMOS_FAILED = "PROMOS_FAILED";
10 | export const LEADERS_LOADING = "LEADERS_LOADING";
11 | export const ADD_LEADERS = "ADD_LEADERS";
12 | export const LEADERS_FAILED = "LEADERS_FAILED";
13 |
--------------------------------------------------------------------------------
/Course2/React/Week4_Assignment/HomeComponent.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import {
3 | Card,
4 | CardImg,
5 | CardText,
6 | CardBody,
7 | CardTitle,
8 | CardSubtitle
9 | } from "reactstrap";
10 | import { Loading } from "./LoadingComponent";
11 | import { baseUrl } from "../shared/baseUrl";
12 | import { FadeTransform } from "react-animation-components";
13 |
14 | function RenderCard({ item, isLoading, errMess }) {
15 | if (isLoading) {
16 | return ;
17 | } else if (errMess) {
18 | return {errMess} ;
19 | } else {
20 | return (
21 |
27 |
28 |
29 |
30 | {item.name}
31 | {item.designation ? (
32 | {item.designation}
33 | ) : null}
34 | {item.description}
35 |
36 |
37 |
38 | );
39 | }
40 | }
41 |
42 | function Home(props) {
43 | return (
44 |
45 |
46 |
47 |
52 |
53 |
54 |
59 |
60 |
61 |
66 |
67 |
68 |
69 | );
70 | }
71 |
72 | export default Home;
73 |
--------------------------------------------------------------------------------
/Course2/React/Week4_Assignment/MainComponent.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import Menu from "./MenuComponent";
3 | import DishdetailComponent from "./DishdetailComponent";
4 | import Header from "./HeaderComponent";
5 | import Footer from "./FooterComponent";
6 | import Home from "./HomeComponent";
7 | import { Switch, Route, Redirect, withRouter } from "react-router-dom";
8 | import { connect } from "react-redux";
9 | import Contact from "./ContactComponent";
10 | import About from "./AboutusComponent";
11 | import {
12 | postComment,
13 | fetchDishes,
14 | fetchComments,
15 | fetchPromos,
16 | fetchLeaders,
17 | postFeedback
18 | } from "../redux/ActionCreators";
19 | import { actions } from "react-redux-form";
20 | import { TransitionGroup, CSSTransition } from "react-transition-group";
21 |
22 | const mapStateToProps = state => {
23 | return {
24 | dishes: state.dishes,
25 | comments: state.comments,
26 | promotions: state.promotions,
27 | leaders: state.leaders
28 | };
29 | };
30 |
31 | const mapDispatchToProps = dispatch => ({
32 | postComment: (dishId, rating, author, comment) =>
33 | dispatch(postComment(dishId, rating, author, comment)),
34 | fetchDishes: () => {
35 | dispatch(fetchDishes());
36 | },
37 | resetFeedbackForm: () => {
38 | dispatch(actions.reset("feedback"));
39 | },
40 | fetchComments: () => {
41 | dispatch(fetchComments());
42 | },
43 | fetchPromos: () => {
44 | dispatch(fetchPromos());
45 | },
46 | fetchLeaders: () => {
47 | dispatch(fetchLeaders());
48 | },
49 | postFeedback: (
50 | firstname,
51 | lastname,
52 | telnum,
53 | email,
54 | agree,
55 | contactType,
56 | message
57 | ) =>
58 | dispatch(
59 | postFeedback(
60 | firstname,
61 | lastname,
62 | telnum,
63 | email,
64 | agree,
65 | contactType,
66 | message
67 | )
68 | )
69 | });
70 |
71 | class Main extends Component {
72 | constructor(props) {
73 | super(props);
74 | }
75 |
76 | componentDidMount() {
77 | this.props.fetchDishes();
78 | this.props.fetchComments();
79 | this.props.fetchPromos();
80 | this.props.fetchLeaders();
81 | }
82 |
83 | render() {
84 | const HomePage = () => {
85 | return (
86 | dish.featured)[0]}
88 | dishesLoading={this.props.dishes.isLoading}
89 | dishesErrMess={this.props.dishes.errMess}
90 | promotion={
91 | this.props.promotions.promotions.filter(promo => promo.featured)[0]
92 | }
93 | promosLoading={this.props.promotions.isLoading}
94 | promosErrMess={this.props.promotions.errMess}
95 | leader={
96 | this.props.leaders.leaders.filter(leader => leader.featured)[0]
97 | }
98 | leaderLoading={this.props.leaders.isLoading}
99 | leaderErrMess={this.props.leaders.errMess}
100 | />
101 | );
102 | };
103 |
104 | const DishWithId = ({ match }) => {
105 | return (
106 | dish.id === parseInt(match.params.dishId, 10)
110 | )[0]
111 | }
112 | isLoading={this.props.dishes.isLoading}
113 | errMess={this.props.dishes.errMess}
114 | comments={this.props.comments.comments.filter(
115 | comment => comment.dishId === parseInt(match.params.dishId, 10)
116 | )}
117 | errMess={this.props.comments.errMess}
118 | postComment={this.props.postComment}
119 | />
120 | );
121 | };
122 |
123 | return (
124 |
125 |
126 |
127 |
132 |
133 |
134 | }
138 | />
139 |
140 | (
144 |
149 | )}
150 | />
151 | (
155 |
159 | )}
160 | />
161 |
162 |
163 | {/* this.onDishSelect(dishId)}
166 | />
167 | dish.id === this.state.selectedDish
171 | )[0]
172 | }
173 | /> */}
174 |
175 |
176 |
177 |
178 | );
179 | }
180 | }
181 |
182 | export default withRouter(connect(mapStateToProps, mapDispatchToProps)(Main));
183 |
--------------------------------------------------------------------------------
/Course2/React/Week4_Assignment/leaders.js:
--------------------------------------------------------------------------------
1 | import * as ActionTypes from "./ActionTypes";
2 |
3 | export const Leaders = (
4 | state = {
5 | isLoading: true,
6 | errMess: null,
7 | leaders: []
8 | },
9 | action
10 | ) => {
11 | switch (action.type) {
12 | case ActionTypes.ADD_LEADERS:
13 | return {
14 | ...state,
15 | isLoading: false,
16 | errMess: null,
17 | leaders: action.payload
18 | };
19 |
20 | case ActionTypes.LEADERS_LOADING:
21 | return { ...state, isLoading: true, errMess: null, leaders: [] };
22 |
23 | case ActionTypes.LEADERS_FAILED:
24 | return { ...state, isLoading: false, errMess: action.payload };
25 |
26 | default:
27 | return state;
28 | }
29 | };
30 |
--------------------------------------------------------------------------------
/Course2/React/confusion/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/Course2/React/confusion/README.md:
--------------------------------------------------------------------------------
1 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
2 |
3 | ## Available Scripts
4 |
5 | In the project directory, you can run:
6 |
7 | ### `yarn start`
8 |
9 | Runs the app in the development mode.
10 | Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
11 |
12 | The page will reload if you make edits.
13 | You will also see any lint errors in the console.
14 |
15 | ### `yarn test`
16 |
17 | Launches the test runner in the interactive watch mode.
18 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
19 |
20 | ### `yarn build`
21 |
22 | Builds the app for production to the `build` folder.
23 | It correctly bundles React in production mode and optimizes the build for the best performance.
24 |
25 | The build is minified and the filenames include the hashes.
26 | Your app is ready to be deployed!
27 |
28 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
29 |
30 | ### `yarn eject`
31 |
32 | **Note: this is a one-way operation. Once you `eject`, you can’t go back!**
33 |
34 | If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
35 |
36 | Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
37 |
38 | You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
39 |
40 | ## Learn More
41 |
42 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
43 |
44 | To learn React, check out the [React documentation](https://reactjs.org/).
45 |
46 | ### Code Splitting
47 |
48 | This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
49 |
50 | ### Analyzing the Bundle Size
51 |
52 | This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
53 |
54 | ### Making a Progressive Web App
55 |
56 | This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
57 |
58 | ### Advanced Configuration
59 |
60 | This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
61 |
62 | ### Deployment
63 |
64 | This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
65 |
66 | ### `yarn build` fails to minify
67 |
68 | This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify
69 |
--------------------------------------------------------------------------------
/Course2/React/confusion/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "confusion",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "bootstrap": "4.0.0",
7 | "bootstrap-social": "5.1.1",
8 | "cross-fetch": "2.1.0",
9 | "font-awesome": "4.7.0",
10 | "prop-types": "15.6.0",
11 | "react": "^16.10.2",
12 | "react-animation-components": "3.0.0",
13 | "react-dom": "^16.10.2",
14 | "react-popper": "0.9.2",
15 | "react-redux": "5.0.7",
16 | "react-redux-form": "1.16.8",
17 | "react-router-dom": "4.2.2",
18 | "react-scripts": "3.2.0",
19 | "react-transition-group": "2.3.0",
20 | "reactstrap": "5.0.0",
21 | "redux": "3.7.2",
22 | "redux-logger": "3.0.6",
23 | "redux-thunk": "2.2.0"
24 | },
25 | "scripts": {
26 | "start": "react-scripts start",
27 | "build": "react-scripts build",
28 | "test": "react-scripts test",
29 | "eject": "react-scripts eject"
30 | },
31 | "eslintConfig": {
32 | "extends": "react-app"
33 | },
34 | "browserslist": {
35 | "production": [
36 | ">0.2%",
37 | "not dead",
38 | "not op_mini all"
39 | ],
40 | "development": [
41 | "last 1 chrome version",
42 | "last 1 firefox version",
43 | "last 1 safari version"
44 | ]
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/Course2/React/confusion/public/assets/__MACOSX/._images:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course2/React/confusion/public/assets/__MACOSX/._images
--------------------------------------------------------------------------------
/Course2/React/confusion/public/assets/__MACOSX/images/._.DS_Store:
--------------------------------------------------------------------------------
1 | Mac OS X 2 F x ATTR x x
--------------------------------------------------------------------------------
/Course2/React/confusion/public/assets/__MACOSX/images/._alberto.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course2/React/confusion/public/assets/__MACOSX/images/._alberto.png
--------------------------------------------------------------------------------
/Course2/React/confusion/public/assets/__MACOSX/images/._buffet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course2/React/confusion/public/assets/__MACOSX/images/._buffet.png
--------------------------------------------------------------------------------
/Course2/React/confusion/public/assets/__MACOSX/images/._elaicheesecake.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course2/React/confusion/public/assets/__MACOSX/images/._elaicheesecake.png
--------------------------------------------------------------------------------
/Course2/React/confusion/public/assets/__MACOSX/images/._logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course2/React/confusion/public/assets/__MACOSX/images/._logo.png
--------------------------------------------------------------------------------
/Course2/React/confusion/public/assets/__MACOSX/images/._uthappizza.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course2/React/confusion/public/assets/__MACOSX/images/._uthappizza.png
--------------------------------------------------------------------------------
/Course2/React/confusion/public/assets/__MACOSX/images/._vadonut.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course2/React/confusion/public/assets/__MACOSX/images/._vadonut.png
--------------------------------------------------------------------------------
/Course2/React/confusion/public/assets/__MACOSX/images/._zucchipakoda.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course2/React/confusion/public/assets/__MACOSX/images/._zucchipakoda.png
--------------------------------------------------------------------------------
/Course2/React/confusion/public/assets/images/alberto.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course2/React/confusion/public/assets/images/alberto.png
--------------------------------------------------------------------------------
/Course2/React/confusion/public/assets/images/buffet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course2/React/confusion/public/assets/images/buffet.png
--------------------------------------------------------------------------------
/Course2/React/confusion/public/assets/images/elaicheesecake.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course2/React/confusion/public/assets/images/elaicheesecake.png
--------------------------------------------------------------------------------
/Course2/React/confusion/public/assets/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course2/React/confusion/public/assets/images/logo.png
--------------------------------------------------------------------------------
/Course2/React/confusion/public/assets/images/uthappizza.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course2/React/confusion/public/assets/images/uthappizza.png
--------------------------------------------------------------------------------
/Course2/React/confusion/public/assets/images/vadonut.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course2/React/confusion/public/assets/images/vadonut.png
--------------------------------------------------------------------------------
/Course2/React/confusion/public/assets/images/zucchipakoda.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course2/React/confusion/public/assets/images/zucchipakoda.png
--------------------------------------------------------------------------------
/Course2/React/confusion/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course2/React/confusion/public/favicon.ico
--------------------------------------------------------------------------------
/Course2/React/confusion/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
12 |
13 |
17 |
18 |
27 | React App
28 |
29 |
30 | You need to enable JavaScript to run this app.
31 |
32 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/Course2/React/confusion/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course2/React/confusion/public/logo192.png
--------------------------------------------------------------------------------
/Course2/React/confusion/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course2/React/confusion/public/logo512.png
--------------------------------------------------------------------------------
/Course2/React/confusion/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/Course2/React/confusion/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 |
--------------------------------------------------------------------------------
/Course2/React/confusion/src/App.css:
--------------------------------------------------------------------------------
1 | .row-header {
2 | margin: 0px auto;
3 | padding: 0px auto;
4 | }
5 |
6 | .row-content {
7 | margin: 0px auto;
8 | padding: 50px 0px 50px 0px;
9 | border-bottom: 1px ridge;
10 | min-height: 400px;
11 | }
12 |
13 | .footer {
14 | background-color: #d1c4e9;
15 | margin: 0px auto;
16 | padding: 20px 0px 20px 0px;
17 | }
18 | .jumbotron {
19 | padding: 70px 30px 70px 30px;
20 | margin: 0px auto;
21 | background: #9575cd;
22 | color: floralwhite;
23 | }
24 |
25 | address {
26 | font-size: 80%;
27 | margin: 0px;
28 | color: #0f0f0f;
29 | }
30 |
31 | .navbar-dark {
32 | background-color: #512da8;
33 | }
34 |
35 | .page-enter{
36 | opacity: 0.01;
37 | transform: translateX(-100%);
38 | }
39 |
40 | .page-enter-active{
41 | opacity: 1;
42 | transform: translateX(0%);
43 | transition: all 300ms ease-in;
44 | }
45 |
46 | .page-exit{
47 | opacity: 1;
48 | transform: translateX(0%);
49 | }
50 |
51 | .page-exit-active{
52 | opacity: 0.01;
53 | transform: translateX(100%);
54 | transition: all 300ms ease-out;
55 | }
--------------------------------------------------------------------------------
/Course2/React/confusion/src/App.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import "./App.css";
3 | import Main from "./components/MainComponent";
4 | import { BrowserRouter } from "react-router-dom";
5 | import { Provider } from "react-redux";
6 | import { ConfigureStore } from "./redux/configureStore";
7 |
8 | const store = ConfigureStore();
9 |
10 | class App extends Component {
11 | render() {
12 | return (
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | );
21 | }
22 | }
23 |
24 | export default App;
25 |
--------------------------------------------------------------------------------
/Course2/React/confusion/src/App.test.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | it('renders without crashing', () => {
6 | const div = document.createElement('div');
7 | ReactDOM.render( , div);
8 | ReactDOM.unmountComponentAtNode(div);
9 | });
10 |
--------------------------------------------------------------------------------
/Course2/React/confusion/src/components/AboutusComponent.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import {
3 | Breadcrumb,
4 | BreadcrumbItem,
5 | Card,
6 | CardBody,
7 | CardHeader,
8 | Media
9 | } from "reactstrap";
10 | import { Link } from "react-router-dom";
11 | import { baseUrl } from "../shared/baseUrl";
12 | import { Loading } from "./LoadingComponent";
13 | import { Fade, Stagger } from "react-animation-components";
14 |
15 | function RenderLeader({ leader }) {
16 | if (leader != null) {
17 | return (
18 |
19 |
20 |
21 |
22 |
23 | {leader.name}
24 | {leader.designation}
25 | {leader.description}
26 |
27 |
28 | );
29 | } else {
30 | return
;
31 | }
32 | }
33 |
34 | function About(props) {
35 | function RenderContent({ leaders, isLoading, errMess }) {
36 | if (isLoading) {
37 | return ;
38 | } else if (errMess) {
39 | return {errMess} ;
40 | } else
41 | return (
42 |
43 | {props.leaders.map(leader => (
44 |
45 |
46 |
47 | ))}
48 |
49 | );
50 | }
51 |
52 | return (
53 |
54 |
55 |
56 |
57 | Home
58 |
59 | About Us
60 |
61 |
62 |
About Us
63 |
64 |
65 |
66 |
67 |
68 |
Our History
69 |
70 | Started in 2010, Ristorante con Fusion quickly established itself as
71 | a culinary icon par excellence in Hong Kong. With its unique brand
72 | of world fusion cuisine that can be found nowhere else, it enjoys
73 | patronage from the A-list clientele in Hong Kong. Featuring four of
74 | the best three-star Michelin chefs in the world, you never know what
75 | will arrive on your plate the next time you visit us.
76 |
77 |
78 | The restaurant traces its humble beginnings to{" "}
79 | The Frying Pan , a successful chain started by our CEO, Mr.
80 | Peter Pan, that featured for the first time the world's best
81 | cuisines in a pan.
82 |
83 |
84 |
85 |
86 |
87 | Facts At a Glance
88 |
89 |
90 |
91 | Started
92 | 3 Feb. 2013
93 | Major Stake Holder
94 | HK Fine Foods Inc.
95 | Last Year's Turnover
96 | $1,250,375
97 | Employees
98 | 40
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 | You better cut the pizza in four pieces because I'm not hungry
109 | enough to eat six.
110 |
111 |
112 | Yogi Berra,
113 |
114 | The Wit and Wisdom of Yogi Berra, P. Pepe, Diversion Books,
115 | 2014
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
Corporate Leadership
126 |
127 |
128 |
129 |
130 |
135 |
136 |
137 |
138 |
139 |
140 | );
141 | }
142 |
143 | export default About;
144 |
--------------------------------------------------------------------------------
/Course2/React/confusion/src/components/FooterComponent.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { Link } from "react-router-dom";
3 |
4 | function Footer(props) {
5 | return (
6 |
7 |
8 |
9 |
10 |
Links
11 |
12 |
13 | Home
14 |
15 |
16 | About Us
17 |
18 |
19 | Menu
20 |
21 |
22 | Contact Us
23 |
24 |
25 |
26 |
27 |
Our Address
28 |
29 | 121, Clear Water Bay Road
30 |
31 | Clear Water Bay, Kowloon
32 |
33 | HONG KONG
34 |
35 | : +852 1234 5678
36 |
37 | : +852 8765 4321
38 |
39 | :{" "}
40 | confusion@food.net
41 |
42 |
43 |
80 |
81 |
82 |
83 |
© Copyright 2018 Ristorante Con Fusion
84 |
85 |
86 |
87 |
88 | );
89 | }
90 |
91 | export default Footer;
92 |
--------------------------------------------------------------------------------
/Course2/React/confusion/src/components/HeaderComponent.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import {
3 | Navbar,
4 | NavbarBrand,
5 | Nav,
6 | NavbarToggler,
7 | Collapse,
8 | NavItem,
9 | Jumbotron,
10 | Button,
11 | Modal,
12 | ModalHeader,
13 | ModalBody,
14 | Form,
15 | FormGroup,
16 | Label,
17 | Input
18 | } from "reactstrap";
19 | import { NavLink } from "react-router-dom";
20 |
21 | class Header extends Component {
22 | constructor(props) {
23 | super(props);
24 | this.state = {
25 | isNavOpen: false,
26 | isModalOpen: false
27 | };
28 | this.toggleNav = this.toggleNav.bind(this);
29 | this.toggleModal = this.toggleModal.bind(this);
30 | this.handleLogin = this.handleLogin.bind(this);
31 | }
32 |
33 | toggleModal() {
34 | this.setState({
35 | isModalOpen: !this.state.isModalOpen
36 | });
37 | }
38 |
39 | toggleNav() {
40 | this.setState({
41 | isNavOpen: !this.state.isNavOpen
42 | });
43 | }
44 |
45 | handleLogin(event) {
46 | this.toggleModal();
47 | alert(
48 | "Username: " +
49 | this.username.value +
50 | " Password: " +
51 | this.password.value +
52 | " Remember: " +
53 | this.remember.checked
54 | );
55 | event.preventDefault();
56 | }
57 |
58 | render() {
59 | return (
60 |
61 |
62 |
63 |
64 |
65 |
71 |
72 |
73 |
74 |
75 |
76 | Home
77 |
78 |
79 |
80 |
81 | About Us
82 |
83 |
84 |
85 |
86 | Menu
87 |
88 |
89 |
90 |
91 | Contact
92 | Us
93 |
94 |
95 |
96 |
97 |
98 |
99 | Login
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
Ristorante Con Fusion
111 |
112 | We take inspiration from World's best cuisines, and create a
113 | unique fusion experience. Our lipsmaking creations will tickle
114 | your culinary senses!
115 |
116 |
117 |
118 |
119 |
120 |
121 | Login
122 |
123 |
156 |
157 |
158 |
159 | );
160 | }
161 | }
162 |
163 | export default Header;
164 |
--------------------------------------------------------------------------------
/Course2/React/confusion/src/components/HomeComponent.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import {
3 | Card,
4 | CardImg,
5 | CardText,
6 | CardBody,
7 | CardTitle,
8 | CardSubtitle
9 | } from "reactstrap";
10 | import { Loading } from "./LoadingComponent";
11 | import { baseUrl } from "../shared/baseUrl";
12 | import { FadeTransform } from "react-animation-components";
13 |
14 | function RenderCard({ item, isLoading, errMess }) {
15 | if (isLoading) {
16 | return ;
17 | } else if (errMess) {
18 | return {errMess} ;
19 | } else {
20 | return (
21 |
27 |
28 |
29 |
30 | {item.name}
31 | {item.designation ? (
32 | {item.designation}
33 | ) : null}
34 | {item.description}
35 |
36 |
37 |
38 | );
39 | }
40 | }
41 |
42 | function Home(props) {
43 | return (
44 |
45 |
46 |
47 |
52 |
53 |
54 |
59 |
60 |
61 |
66 |
67 |
68 |
69 | );
70 | }
71 |
72 | export default Home;
73 |
--------------------------------------------------------------------------------
/Course2/React/confusion/src/components/LoadingComponent.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | export const Loading = () => {
4 | return (
5 |
9 | );
10 | };
11 |
--------------------------------------------------------------------------------
/Course2/React/confusion/src/components/MainComponent.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import Menu from "./MenuComponent";
3 | import DishdetailComponent from "./DishdetailComponent";
4 | import Header from "./HeaderComponent";
5 | import Footer from "./FooterComponent";
6 | import Home from "./HomeComponent";
7 | import { Switch, Route, Redirect, withRouter } from "react-router-dom";
8 | import { connect } from "react-redux";
9 | import Contact from "./ContactComponent";
10 | import About from "./AboutusComponent";
11 | import {
12 | postComment,
13 | fetchDishes,
14 | fetchComments,
15 | fetchPromos,
16 | fetchLeaders,
17 | postFeedback
18 | } from "../redux/ActionCreators";
19 | import { actions } from "react-redux-form";
20 | import { TransitionGroup, CSSTransition } from "react-transition-group";
21 |
22 | const mapStateToProps = state => {
23 | return {
24 | dishes: state.dishes,
25 | comments: state.comments,
26 | promotions: state.promotions,
27 | leaders: state.leaders
28 | };
29 | };
30 |
31 | const mapDispatchToProps = dispatch => ({
32 | postComment: (dishId, rating, author, comment) =>
33 | dispatch(postComment(dishId, rating, author, comment)),
34 | fetchDishes: () => {
35 | dispatch(fetchDishes());
36 | },
37 | resetFeedbackForm: () => {
38 | dispatch(actions.reset("feedback"));
39 | },
40 | fetchComments: () => {
41 | dispatch(fetchComments());
42 | },
43 | fetchPromos: () => {
44 | dispatch(fetchPromos());
45 | },
46 | fetchLeaders: () => {
47 | dispatch(fetchLeaders());
48 | },
49 | postFeedback: (
50 | firstname,
51 | lastname,
52 | telnum,
53 | email,
54 | agree,
55 | contactType,
56 | message
57 | ) =>
58 | dispatch(
59 | postFeedback(
60 | firstname,
61 | lastname,
62 | telnum,
63 | email,
64 | agree,
65 | contactType,
66 | message
67 | )
68 | )
69 | });
70 |
71 | class Main extends Component {
72 |
73 | componentDidMount() {
74 | this.props.fetchDishes();
75 | this.props.fetchComments();
76 | this.props.fetchPromos();
77 | this.props.fetchLeaders();
78 | }
79 |
80 | render() {
81 | const HomePage = () => {
82 | return (
83 | dish.featured)[0]}
85 | dishesLoading={this.props.dishes.isLoading}
86 | dishesErrMess={this.props.dishes.errMess}
87 | promotion={
88 | this.props.promotions.promotions.filter(promo => promo.featured)[0]
89 | }
90 | promosLoading={this.props.promotions.isLoading}
91 | promosErrMess={this.props.promotions.errMess}
92 | leader={
93 | this.props.leaders.leaders.filter(leader => leader.featured)[0]
94 | }
95 | leaderLoading={this.props.leaders.isLoading}
96 | leaderErrMess={this.props.leaders.errMess}
97 | />
98 | );
99 | };
100 |
101 | const DishWithId = ({ match }) => {
102 | return (
103 | dish.id === parseInt(match.params.dishId, 10)
107 | )[0]
108 | }
109 | isLoading={this.props.dishes.isLoading}
110 | errMess={this.props.dishes.errMess}
111 | comments={this.props.comments.comments.filter(
112 | comment => comment.dishId === parseInt(match.params.dishId, 10)
113 | )}
114 | errMess={this.props.comments.errMess}
115 | postComment={this.props.postComment}
116 | />
117 | );
118 | };
119 |
120 | return (
121 |
122 |
123 |
124 |
129 |
130 |
131 | }
135 | />
136 |
137 | (
141 |
146 | )}
147 | />
148 | (
152 |
156 | )}
157 | />
158 |
159 |
160 | {/* this.onDishSelect(dishId)}
163 | />
164 | dish.id === this.state.selectedDish
168 | )[0]
169 | }
170 | /> */}
171 |
172 |
173 |
174 |
175 | );
176 | }
177 | }
178 |
179 | export default withRouter(connect(mapStateToProps, mapDispatchToProps)(Main));
180 |
--------------------------------------------------------------------------------
/Course2/React/confusion/src/components/MenuComponent.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import {
3 | Card,
4 | CardImg,
5 | CardImgOverlay,
6 | CardTitle,
7 | Breadcrumb,
8 | BreadcrumbItem
9 | } from "reactstrap";
10 | import { Link } from "react-router-dom";
11 | import { Loading } from "./LoadingComponent";
12 | import { baseUrl } from "../shared/baseUrl";
13 |
14 | function RenderMenuItem({ dish, onClick }) {
15 | return (
16 |
17 |
18 |
24 |
25 | {dish.name}
26 |
27 |
28 |
29 | );
30 | }
31 |
32 | const Menu = props => {
33 | const menu = props.dishes.dishes.map(dish => {
34 | return (
35 |
36 |
37 |
38 | );
39 | });
40 |
41 | if (props.dishes.isLoading) {
42 | return (
43 |
48 | );
49 | } else if (props.dishes.errMess) {
50 | return (
51 |
52 |
53 |
{props.dishes.errMess}
54 |
55 |
56 | );
57 | } else {
58 | return (
59 |
60 |
61 |
62 |
63 | Home
64 |
65 | Menu
66 |
67 |
68 |
Menu
69 |
70 |
71 |
72 |
{menu}
73 | {/*
74 |
75 |
78 |
79 |
80 | {this.renderComments(this.state.selectedDish)}
81 |
82 |
*/}
83 |
84 | );
85 | }
86 | };
87 |
88 | export default Menu;
89 |
--------------------------------------------------------------------------------
/Course2/React/confusion/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
4 | "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
5 | sans-serif;
6 | -webkit-font-smoothing: antialiased;
7 | -moz-osx-font-smoothing: grayscale;
8 | }
9 |
10 | code {
11 | font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
12 | monospace;
13 | }
14 |
--------------------------------------------------------------------------------
/Course2/React/confusion/src/index.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import ReactDOM from "react-dom";
3 | import "./index.css";
4 | import "bootstrap/dist/css/bootstrap.min.css";
5 | import App from "./App";
6 | import * as serviceWorker from "./serviceWorker";
7 | import "font-awesome/css/font-awesome.css";
8 | import "bootstrap-social/bootstrap-social.css";
9 |
10 | ReactDOM.render( , document.getElementById("root"));
11 |
12 | // If you want your app to work offline and load faster, you can change
13 | // unregister() to register() below. Note this comes with some pitfalls.
14 | // Learn more about service workers: https://bit.ly/CRA-PWA
15 | serviceWorker.unregister();
16 |
--------------------------------------------------------------------------------
/Course2/React/confusion/src/redux/ActionTypes.js:
--------------------------------------------------------------------------------
1 | export const ADD_COMMENT = "ADD_COMMENT";
2 | export const DISHES_LOADING = "DISHES_LOADING";
3 | export const DISHES_FAILED = "DISHES_FAILED";
4 | export const ADD_DISHES = "ADD_DISHES";
5 | export const ADD_COMMENTS = "ADD_COMMENTS";
6 | export const COMMENTS_FAILED = "COMMENTS_FAILED";
7 | export const PROMOS_LOADING = "PROMOS_LOADING";
8 | export const ADD_PROMOS = "ADD_PROMOS";
9 | export const PROMOS_FAILED = "PROMOS_FAILED";
10 | export const LEADERS_LOADING = "LEADERS_LOADING";
11 | export const ADD_LEADERS = "ADD_LEADERS";
12 | export const LEADERS_FAILED = "LEADERS_FAILED";
13 |
--------------------------------------------------------------------------------
/Course2/React/confusion/src/redux/comments.js:
--------------------------------------------------------------------------------
1 | import * as ActionTypes from "./ActionTypes";
2 |
3 | export const Comments = (state = { errMess: null, comments: [] }, action) => {
4 | switch (action.type) {
5 | case ActionTypes.ADD_COMMENTS:
6 | return { ...state, errMess: null, comments: action.payload };
7 |
8 | case ActionTypes.COMMENTS_FAILED:
9 | return { ...state, errMess: action.payload };
10 |
11 | case ActionTypes.ADD_COMMENT:
12 | var comment = action.payload;
13 | return { ...state, comments: state.comments.concat(comment) };
14 |
15 | default:
16 | return state;
17 | }
18 | };
19 |
--------------------------------------------------------------------------------
/Course2/React/confusion/src/redux/configureStore.js:
--------------------------------------------------------------------------------
1 | import { createStore, combineReducers, applyMiddleware } from "redux";
2 | import { createForms } from "react-redux-form";
3 | import { Dishes } from "./dishes";
4 | import { Comments } from "./comments";
5 | import { Leaders } from "./leaders";
6 | import { Promotions } from "./promotions";
7 | import thunk from "redux-thunk";
8 | import logger from "redux-logger";
9 | import { InitialFeedback } from "./forms";
10 |
11 | export const ConfigureStore = () => {
12 | const store = createStore(
13 | combineReducers({
14 | dishes: Dishes,
15 | comments: Comments,
16 | promotions: Promotions,
17 | leaders: Leaders,
18 | ...createForms({
19 | feedback: InitialFeedback
20 | })
21 | }),
22 | applyMiddleware(thunk, logger)
23 | );
24 |
25 | return store;
26 | };
27 |
--------------------------------------------------------------------------------
/Course2/React/confusion/src/redux/dishes.js:
--------------------------------------------------------------------------------
1 | import * as ActionTypes from "./ActionTypes";
2 |
3 | export const Dishes = (
4 | state = {
5 | isLoading: true,
6 | errMess: null,
7 | dishes: []
8 | },
9 | action
10 | ) => {
11 | switch (action.type) {
12 | case ActionTypes.ADD_DISHES:
13 | return {
14 | ...state,
15 | isLoading: false,
16 | errMess: null,
17 | dishes: action.payload
18 | };
19 |
20 | case ActionTypes.DISHES_LOADING:
21 | return { ...state, isLoading: true, errMess: null, dishes: [] };
22 |
23 | case ActionTypes.DISHES_FAILED:
24 | return {
25 | ...state,
26 | isLoading: false,
27 | errMess: action.payload,
28 | dishes: []
29 | };
30 |
31 | default:
32 | return state;
33 | }
34 | };
35 |
--------------------------------------------------------------------------------
/Course2/React/confusion/src/redux/forms.js:
--------------------------------------------------------------------------------
1 | export const InitialFeedback = {
2 | firstname: "",
3 | lastname: "",
4 | telnum: "",
5 | email: "",
6 | agree: false,
7 | contactType: "Tel.",
8 | message: ""
9 | };
10 |
--------------------------------------------------------------------------------
/Course2/React/confusion/src/redux/leaders.js:
--------------------------------------------------------------------------------
1 | import * as ActionTypes from "./ActionTypes";
2 |
3 | export const Leaders = (
4 | state = {
5 | isLoading: true,
6 | errMess: null,
7 | leaders: []
8 | },
9 | action
10 | ) => {
11 | switch (action.type) {
12 | case ActionTypes.ADD_LEADERS:
13 | return {
14 | ...state,
15 | isLoading: false,
16 | errMess: null,
17 | leaders: action.payload
18 | };
19 |
20 | case ActionTypes.LEADERS_LOADING:
21 | return { ...state, isLoading: true, errMess: null, leaders: [] };
22 |
23 | case ActionTypes.LEADERS_FAILED:
24 | return { ...state, isLoading: false, errMess: action.payload };
25 |
26 | default:
27 | return state;
28 | }
29 | };
30 |
--------------------------------------------------------------------------------
/Course2/React/confusion/src/redux/promotions.js:
--------------------------------------------------------------------------------
1 | import * as ActionTypes from "./ActionTypes";
2 |
3 | export const Promotions = (
4 | state = {
5 | isLoading: true,
6 | errMess: null,
7 | promotions: []
8 | },
9 | action
10 | ) => {
11 | switch (action.type) {
12 | case ActionTypes.ADD_PROMOS:
13 | return {
14 | ...state,
15 | isLoading: false,
16 | errMess: null,
17 | promotions: action.payload
18 | };
19 |
20 | case ActionTypes.PROMOS_LOADING:
21 | return { ...state, isLoading: true, errMess: null, promotions: [] };
22 |
23 | case ActionTypes.PROMOS_FAILED:
24 | return {
25 | ...state,
26 | isLoading: false,
27 | errMess: action.payload,
28 | promotions: []
29 | };
30 |
31 | default:
32 | return state;
33 | }
34 | };
35 |
--------------------------------------------------------------------------------
/Course2/React/confusion/src/serviceWorker.js:
--------------------------------------------------------------------------------
1 | // This optional code is used to register a service worker.
2 | // register() is not called by default.
3 |
4 | // This lets the app load faster on subsequent visits in production, and gives
5 | // it offline capabilities. However, it also means that developers (and users)
6 | // will only see deployed updates on subsequent visits to a page, after all the
7 | // existing tabs open on the page have been closed, since previously cached
8 | // resources are updated in the background.
9 |
10 | // To learn more about the benefits of this model and instructions on how to
11 | // opt-in, read https://bit.ly/CRA-PWA
12 |
13 | const isLocalhost = Boolean(
14 | window.location.hostname === 'localhost' ||
15 | // [::1] is the IPv6 localhost address.
16 | window.location.hostname === '[::1]' ||
17 | // 127.0.0.1/8 is considered localhost for IPv4.
18 | window.location.hostname.match(
19 | /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
20 | )
21 | );
22 |
23 | export function register(config) {
24 | if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
25 | // The URL constructor is available in all browsers that support SW.
26 | const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);
27 | if (publicUrl.origin !== window.location.origin) {
28 | // Our service worker won't work if PUBLIC_URL is on a different origin
29 | // from what our page is served on. This might happen if a CDN is used to
30 | // serve assets; see https://github.com/facebook/create-react-app/issues/2374
31 | return;
32 | }
33 |
34 | window.addEventListener('load', () => {
35 | const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;
36 |
37 | if (isLocalhost) {
38 | // This is running on localhost. Let's check if a service worker still exists or not.
39 | checkValidServiceWorker(swUrl, config);
40 |
41 | // Add some additional logging to localhost, pointing developers to the
42 | // service worker/PWA documentation.
43 | navigator.serviceWorker.ready.then(() => {
44 | console.log(
45 | 'This web app is being served cache-first by a service ' +
46 | 'worker. To learn more, visit https://bit.ly/CRA-PWA'
47 | );
48 | });
49 | } else {
50 | // Is not localhost. Just register service worker
51 | registerValidSW(swUrl, config);
52 | }
53 | });
54 | }
55 | }
56 |
57 | function registerValidSW(swUrl, config) {
58 | navigator.serviceWorker
59 | .register(swUrl)
60 | .then(registration => {
61 | registration.onupdatefound = () => {
62 | const installingWorker = registration.installing;
63 | if (installingWorker == null) {
64 | return;
65 | }
66 | installingWorker.onstatechange = () => {
67 | if (installingWorker.state === 'installed') {
68 | if (navigator.serviceWorker.controller) {
69 | // At this point, the updated precached content has been fetched,
70 | // but the previous service worker will still serve the older
71 | // content until all client tabs are closed.
72 | console.log(
73 | 'New content is available and will be used when all ' +
74 | 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'
75 | );
76 |
77 | // Execute callback
78 | if (config && config.onUpdate) {
79 | config.onUpdate(registration);
80 | }
81 | } else {
82 | // At this point, everything has been precached.
83 | // It's the perfect time to display a
84 | // "Content is cached for offline use." message.
85 | console.log('Content is cached for offline use.');
86 |
87 | // Execute callback
88 | if (config && config.onSuccess) {
89 | config.onSuccess(registration);
90 | }
91 | }
92 | }
93 | };
94 | };
95 | })
96 | .catch(error => {
97 | console.error('Error during service worker registration:', error);
98 | });
99 | }
100 |
101 | function checkValidServiceWorker(swUrl, config) {
102 | // Check if the service worker can be found. If it can't reload the page.
103 | fetch(swUrl)
104 | .then(response => {
105 | // Ensure service worker exists, and that we really are getting a JS file.
106 | const contentType = response.headers.get('content-type');
107 | if (
108 | response.status === 404 ||
109 | (contentType != null && contentType.indexOf('javascript') === -1)
110 | ) {
111 | // No service worker found. Probably a different app. Reload the page.
112 | navigator.serviceWorker.ready.then(registration => {
113 | registration.unregister().then(() => {
114 | window.location.reload();
115 | });
116 | });
117 | } else {
118 | // Service worker found. Proceed as normal.
119 | registerValidSW(swUrl, config);
120 | }
121 | })
122 | .catch(() => {
123 | console.log(
124 | 'No internet connection found. App is running in offline mode.'
125 | );
126 | });
127 | }
128 |
129 | export function unregister() {
130 | if ('serviceWorker' in navigator) {
131 | navigator.serviceWorker.ready.then(registration => {
132 | registration.unregister();
133 | });
134 | }
135 | }
136 |
--------------------------------------------------------------------------------
/Course2/React/confusion/src/shared/baseUrl.js:
--------------------------------------------------------------------------------
1 | export const baseUrl = "http://localhost:3001/";
2 |
--------------------------------------------------------------------------------
/Course2/React/confusion/src/shared/comments.js:
--------------------------------------------------------------------------------
1 | export const COMMENTS = [
2 | {
3 | id: 0,
4 | dishId: 0,
5 | rating: 5,
6 | comment: "Imagine all the eatables, living in conFusion!",
7 | author: "John Lemon",
8 | date: "2012-10-16T17:57:28.556094Z"
9 | },
10 | {
11 | id: 1,
12 | dishId: 0,
13 | rating: 4,
14 | comment:
15 | "Sends anyone to heaven, I wish I could get my mother-in-law to eat it!",
16 | author: "Paul McVites",
17 | date: "2014-09-05T17:57:28.556094Z"
18 | },
19 | {
20 | id: 2,
21 | dishId: 0,
22 | rating: 3,
23 | comment: "Eat it, just eat it!",
24 | author: "Michael Jaikishan",
25 | date: "2015-02-13T17:57:28.556094Z"
26 | },
27 | {
28 | id: 3,
29 | dishId: 0,
30 | rating: 4,
31 | comment: "Ultimate, Reaching for the stars!",
32 | author: "Ringo Starry",
33 | date: "2013-12-02T17:57:28.556094Z"
34 | },
35 | {
36 | id: 4,
37 | dishId: 0,
38 | rating: 2,
39 | comment: "It's your birthday, we're gonna party!",
40 | author: "25 Cent",
41 | date: "2011-12-02T17:57:28.556094Z"
42 | },
43 | {
44 | id: 5,
45 | dishId: 1,
46 | rating: 5,
47 | comment: "Imagine all the eatables, living in conFusion!",
48 | author: "John Lemon",
49 | date: "2012-10-16T17:57:28.556094Z"
50 | },
51 | {
52 | id: 6,
53 | dishId: 1,
54 | rating: 4,
55 | comment:
56 | "Sends anyone to heaven, I wish I could get my mother-in-law to eat it!",
57 | author: "Paul McVites",
58 | date: "2014-09-05T17:57:28.556094Z"
59 | },
60 | {
61 | id: 7,
62 | dishId: 1,
63 | rating: 3,
64 | comment: "Eat it, just eat it!",
65 | author: "Michael Jaikishan",
66 | date: "2015-02-13T17:57:28.556094Z"
67 | },
68 | {
69 | id: 8,
70 | dishId: 1,
71 | rating: 4,
72 | comment: "Ultimate, Reaching for the stars!",
73 | author: "Ringo Starry",
74 | date: "2013-12-02T17:57:28.556094Z"
75 | },
76 | {
77 | id: 9,
78 | dishId: 1,
79 | rating: 2,
80 | comment: "It's your birthday, we're gonna party!",
81 | author: "25 Cent",
82 | date: "2011-12-02T17:57:28.556094Z"
83 | },
84 | {
85 | id: 10,
86 | dishId: 2,
87 | rating: 5,
88 | comment: "Imagine all the eatables, living in conFusion!",
89 | author: "John Lemon",
90 | date: "2012-10-16T17:57:28.556094Z"
91 | },
92 | {
93 | id: 11,
94 | dishId: 2,
95 | rating: 4,
96 | comment:
97 | "Sends anyone to heaven, I wish I could get my mother-in-law to eat it!",
98 | author: "Paul McVites",
99 | date: "2014-09-05T17:57:28.556094Z"
100 | },
101 | {
102 | id: 12,
103 | dishId: 2,
104 | rating: 3,
105 | comment: "Eat it, just eat it!",
106 | author: "Michael Jaikishan",
107 | date: "2015-02-13T17:57:28.556094Z"
108 | },
109 | {
110 | id: 13,
111 | dishId: 2,
112 | rating: 4,
113 | comment: "Ultimate, Reaching for the stars!",
114 | author: "Ringo Starry",
115 | date: "2013-12-02T17:57:28.556094Z"
116 | },
117 | {
118 | id: 14,
119 | dishId: 2,
120 | rating: 2,
121 | comment: "It's your birthday, we're gonna party!",
122 | author: "25 Cent",
123 | date: "2011-12-02T17:57:28.556094Z"
124 | },
125 | {
126 | id: 15,
127 | dishId: 3,
128 | rating: 5,
129 | comment: "Imagine all the eatables, living in conFusion!",
130 | author: "John Lemon",
131 | date: "2012-10-16T17:57:28.556094Z"
132 | },
133 | {
134 | id: 16,
135 | dishId: 3,
136 | rating: 4,
137 | comment:
138 | "Sends anyone to heaven, I wish I could get my mother-in-law to eat it!",
139 | author: "Paul McVites",
140 | date: "2014-09-05T17:57:28.556094Z"
141 | },
142 | {
143 | id: 17,
144 | dishId: 3,
145 | rating: 3,
146 | comment: "Eat it, just eat it!",
147 | author: "Michael Jaikishan",
148 | date: "2015-02-13T17:57:28.556094Z"
149 | },
150 | {
151 | id: 18,
152 | dishId: 3,
153 | rating: 4,
154 | comment: "Ultimate, Reaching for the stars!",
155 | author: "Ringo Starry",
156 | date: "2013-12-02T17:57:28.556094Z"
157 | },
158 | {
159 | id: 19,
160 | dishId: 3,
161 | rating: 2,
162 | comment: "It's your birthday, we're gonna party!",
163 | author: "25 Cent",
164 | date: "2011-12-02T17:57:28.556094Z"
165 | }
166 | ];
167 |
--------------------------------------------------------------------------------
/Course2/React/confusion/src/shared/dishes.js:
--------------------------------------------------------------------------------
1 | export const DISHES = [
2 | {
3 | id: 0,
4 | name: "Uthappizza",
5 | image: "/assets/images/uthappizza.png",
6 | category: "mains",
7 | label: "Hot",
8 | price: "4.99",
9 | featured: true,
10 | description:
11 | "A unique combination of Indian Uthappam (pancake) and Italian pizza, topped with Cerignola olives, ripe vine cherry tomatoes, Vidalia onion, Guntur chillies and Buffalo Paneer."
12 | },
13 | {
14 | id: 1,
15 | name: "Zucchipakoda",
16 | image: "/assets/images/zucchipakoda.png",
17 | category: "appetizer",
18 | label: "",
19 | price: "1.99",
20 | featured: false,
21 | description:
22 | "Deep fried Zucchini coated with mildly spiced Chickpea flour batter accompanied with a sweet-tangy tamarind sauce"
23 | },
24 | {
25 | id: 2,
26 | name: "Vadonut",
27 | image: "/assets/images/vadonut.png",
28 | category: "appetizer",
29 | label: "New",
30 | price: "1.99",
31 | featured: false,
32 | description:
33 | "A quintessential ConFusion experience, is it a vada or is it a donut?"
34 | },
35 | {
36 | id: 3,
37 | name: "ElaiCheese Cake",
38 | image: "/assets/images/elaicheesecake.png",
39 | category: "dessert",
40 | label: "",
41 | price: "2.99",
42 | featured: false,
43 | description:
44 | "A delectable, semi-sweet New York Style Cheese Cake, with Graham cracker crust and spiced with Indian cardamoms"
45 | }
46 | ];
47 |
--------------------------------------------------------------------------------
/Course2/React/confusion/src/shared/leaders.js:
--------------------------------------------------------------------------------
1 | export const LEADERS = [
2 | {
3 | id: 0,
4 | name: "Peter Pan",
5 | image: "/assets/images/alberto.png",
6 | designation: "Chief Epicurious Officer",
7 | abbr: "CEO",
8 | featured: false,
9 | description:
10 | "Our CEO, Peter, credits his hardworking East Asian immigrant parents who undertook the arduous journey to the shores of America with the intention of giving their children the best future. His mother's wizardy in the kitchen whipping up the tastiest dishes with whatever is available inexpensively at the supermarket, was his first inspiration to create the fusion cuisines for which The Frying Pan became well known. He brings his zeal for fusion cuisines to this restaurant, pioneering cross-cultural culinary connections."
11 | },
12 | {
13 | id: 1,
14 | name: "Dhanasekaran Witherspoon",
15 | image: "/assets/images/alberto.png",
16 | designation: "Chief Food Officer",
17 | abbr: "CFO",
18 | featured: false,
19 | description:
20 | "Our CFO, Danny, as he is affectionately referred to by his colleagues, comes from a long established family tradition in farming and produce. His experiences growing up on a farm in the Australian outback gave him great appreciation for varieties of food sources. As he puts it in his own words, Everything that runs, wins, and everything that stays, pays!"
21 | },
22 | {
23 | id: 2,
24 | name: "Agumbe Tang",
25 | image: "/assets/images/alberto.png",
26 | designation: "Chief Taste Officer",
27 | abbr: "CTO",
28 | featured: false,
29 | description:
30 | "Blessed with the most discerning gustatory sense, Agumbe, our CFO, personally ensures that every dish that we serve meets his exacting tastes. Our chefs dread the tongue lashing that ensues if their dish does not meet his exacting standards. He lives by his motto, You click only if you survive my lick."
31 | },
32 | {
33 | id: 3,
34 | name: "Alberto Somayya",
35 | image: "/assets/images/alberto.png",
36 | designation: "Executive Chef",
37 | abbr: "EC",
38 | featured: true,
39 | description:
40 | "Award winning three-star Michelin chef with wide International experience having worked closely with whos-who in the culinary world, he specializes in creating mouthwatering Indo-Italian fusion experiences. He says, Put together the cuisines from the two craziest cultures, and you get a winning hit! Amma Mia!"
41 | }
42 | ];
43 |
--------------------------------------------------------------------------------
/Course2/React/confusion/src/shared/promotions.js:
--------------------------------------------------------------------------------
1 | export const PROMOTIONS = [
2 | {
3 | id: 0,
4 | name: "Weekend Grand Buffet",
5 | image: "/assets/images/buffet.png",
6 | label: "New",
7 | price: "19.99",
8 | featured: true,
9 | description:
10 | "Featuring mouthwatering combinations with a choice of five different salads, six enticing appetizers, six main entrees and five choicest desserts. Free flowing bubbly and soft drinks. All for just $19.99 per person"
11 | }
12 | ];
13 |
--------------------------------------------------------------------------------
/Course3/ReactNative/Week1_Assignment/AboutComponent.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import { ScrollView, Text, FlatList } from "react-native";
3 | import { Card, ListItem } from "react-native-elements";
4 | import { LEADERS } from "../shared/leaders";
5 |
6 | class AboutUs extends Component {
7 | constructor(props) {
8 | super(props);
9 | this.state = {
10 | leaders: LEADERS
11 | };
12 | }
13 |
14 | static navigationOptions = {
15 | title: "About Us"
16 | };
17 |
18 | render() {
19 | const renderLeader = ({ item, index }) => {
20 | return (
21 |
28 | );
29 | };
30 |
31 | return (
32 |
33 |
34 |
35 | Started in 2010, Ristorante con Fusion quickly established itself as
36 | a culinary icon par excellence in Hong Kong. With its unique brand
37 | of world fusion cuisine that can be found nowhere else, it enjoys
38 | patronage from the A-list clientele in Hong Kong. Featuring four of
39 | the best three-star Michelin chefs in the world, you never know what
40 | will arrive on your plate the next time you visit us.
41 |
42 |
43 | The restaurant traces its humble beginnings to The Frying Pan, a
44 | successful chain started by our CEO, Mr. Peter Pan, that featured
45 | for the first time the world's best cuisines in a pan.
46 |
47 |
48 |
49 | item.id.toString()}
53 | />
54 |
55 |
56 | );
57 | }
58 | }
59 |
60 | export default AboutUs;
61 |
--------------------------------------------------------------------------------
/Course3/ReactNative/Week1_Assignment/ContactComponent.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import { Text } from "react-native";
3 | import { Card } from "react-native-elements";
4 |
5 | class ContactUs extends Component {
6 | static navigationOptions = {
7 | title: "Contact Us"
8 | };
9 |
10 | render() {
11 | return (
12 |
13 | 121, Clear Water Bay Road
14 | Clear Water Bay, Kowloon
15 | HONG KONG
16 | Tel: +852 1234 5678
17 | Fax: +852 8765 4321
18 | Email:confusion@food.net
19 |
20 | );
21 | }
22 | }
23 |
24 | export default ContactUs;
25 |
--------------------------------------------------------------------------------
/Course3/ReactNative/Week1_Assignment/MainComponent.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import Menu from "./MenuComponent";
3 | import Home from "./HomeComponent";
4 | import Dishdetail from "./DishdetailComponent";
5 | import ContactUs from "./ContactComponent";
6 | import AboutUs from "./AboutComponent";
7 | import { View, Platform } from "react-native";
8 | import { createStackNavigator, createDrawerNavigator } from "react-navigation";
9 |
10 | const MenuNavigator = createStackNavigator(
11 | {
12 | Menu: { screen: Menu },
13 | Dishdetail: { screen: Dishdetail }
14 | },
15 | {
16 | initialRouteName: "Menu",
17 | navigationOptions: {
18 | headerStyle: {
19 | backgroundColor: "#512DA8"
20 | },
21 | headerTintColor: "#fff",
22 | headerTitleStyle: {
23 | color: "#fff"
24 | }
25 | }
26 | }
27 | );
28 |
29 | const HomeNavigator = createStackNavigator(
30 | {
31 | Home: { screen: Home }
32 | },
33 | {
34 | navigationOptions: {
35 | headerStyle: {
36 | backgroundColor: "#512DA8"
37 | },
38 | headerTintColor: "#fff",
39 | headerTitleStyle: {
40 | color: "#fff"
41 | }
42 | }
43 | }
44 | );
45 |
46 | const ContactNavigator = createStackNavigator(
47 | {
48 | ContactUs: { screen: ContactUs }
49 | },
50 | {
51 | navigationOptions: {
52 | headerStyle: {
53 | backgroundColor: "#512DA8"
54 | },
55 | headerTintColor: "#fff",
56 | headerTitleStyle: {
57 | color: "#fff"
58 | }
59 | }
60 | }
61 | );
62 |
63 | const AboutNavigator = createStackNavigator(
64 | {
65 | AboutUs: { screen: AboutUs }
66 | },
67 | {
68 | navigationOptions: {
69 | headerStyle: {
70 | backgroundColor: "#512DA8"
71 | },
72 | headerTintColor: "#fff",
73 | headerTitleStyle: {
74 | color: "#fff"
75 | }
76 | }
77 | }
78 | );
79 |
80 | const MainNavigator = createDrawerNavigator(
81 | {
82 | Home: {
83 | screen: HomeNavigator,
84 | navigationOptions: {
85 | title: "Home",
86 | drawerLabel: "Home"
87 | }
88 | },
89 | AboutUs: {
90 | screen: AboutNavigator,
91 | navigationOptions: {
92 | title: "About Us",
93 | drawerLabel: "AboutUs"
94 | }
95 | },
96 | Menu: {
97 | screen: MenuNavigator,
98 | navigationOptions: {
99 | title: "Menu",
100 | drawerLabel: "Menu"
101 | }
102 | },
103 | ContactUs: {
104 | screen: ContactNavigator,
105 | navigationOptions: {
106 | title: "Contact Us",
107 | drawerLabel: "ContactUs"
108 | }
109 | }
110 | },
111 | {
112 | drawerBackgroundColor: "#D1C4E9"
113 | }
114 | );
115 |
116 | class Main extends Component {
117 | render() {
118 | return (
119 |
125 |
126 |
127 | );
128 | }
129 | }
130 |
131 | export default Main;
132 |
--------------------------------------------------------------------------------
/Course3/ReactNative/Week2_Assignment/ActionCreators.js:
--------------------------------------------------------------------------------
1 | import * as ActionTypes from "./ActionTypes";
2 | import { baseUrl } from "../shared/baseUrl";
3 |
4 | export const fetchComments = () => dispatch => {
5 | return fetch(baseUrl + "comments")
6 | .then(
7 | response => {
8 | if (response.ok) {
9 | return response;
10 | } else {
11 | var error = new Error(
12 | "Error " + response.status + ": " + response.statusText
13 | );
14 | error.response = response;
15 | throw error;
16 | }
17 | },
18 | error => {
19 | var error = new Error(error.message);
20 | throw error;
21 | }
22 | )
23 | .then(response => response.json())
24 | .then(comments => dispatch(addComments(comments)))
25 | .catch(error => dispatch(commentsFailed(error.message)));
26 | };
27 |
28 | export const commentsFailed = errMess => ({
29 | type: ActionTypes.COMMENTS_FAILED,
30 | payload: errMess
31 | });
32 |
33 | export const addComments = comments => ({
34 | type: ActionTypes.ADD_COMMENTS,
35 | payload: comments
36 | });
37 |
38 | export const fetchDishes = () => dispatch => {
39 | dispatch(dishesLoading());
40 | return fetch(baseUrl + "dishes")
41 | .then(
42 | response => {
43 | if (response.ok) {
44 | return response;
45 | } else {
46 | var error = new Error(
47 | "Error " + response.status + ": " + response.statusText
48 | );
49 | error.response = response;
50 | throw error;
51 | }
52 | },
53 | error => {
54 | var error = new Error(error.message);
55 | throw error;
56 | }
57 | )
58 | .then(response => response.json())
59 | .then(dishes => dispatch(addDishes(dishes)))
60 | .catch(error => dispatch(dishesFailed(error.message)));
61 | };
62 |
63 | export const dishesLoading = () => ({
64 | type: ActionTypes.DISHES_LOADING
65 | });
66 |
67 | export const dishesFailed = errMess => ({
68 | type: ActionTypes.DISHES_FAILED,
69 | payload: errMess
70 | });
71 |
72 | export const addDishes = dishes => ({
73 | type: ActionTypes.ADD_DISHES,
74 | payload: dishes
75 | });
76 |
77 | export const fetchPromos = () => dispatch => {
78 | dispatch(promosLoading());
79 | return fetch(baseUrl + "promotions")
80 | .then(
81 | response => {
82 | if (response.ok) {
83 | return response;
84 | } else {
85 | var error = new Error(
86 | "Error " + response.status + ": " + response.statusText
87 | );
88 | error.response = response;
89 | throw error;
90 | }
91 | },
92 | error => {
93 | var error = new Error(error.message);
94 | throw error;
95 | }
96 | )
97 | .then(response => response.json())
98 | .then(promos => dispatch(addPromos(promos)))
99 | .catch(error => dispatch(promosFailed(error.message)));
100 | };
101 |
102 | export const promosLoading = () => ({
103 | type: ActionTypes.PROMOS_LOADING
104 | });
105 |
106 | export const promosFailed = errMess => ({
107 | type: ActionTypes.PROMOS_FAILED,
108 | payload: errMess
109 | });
110 |
111 | export const addPromos = promos => ({
112 | type: ActionTypes.ADD_PROMOS,
113 | payload: promos
114 | });
115 |
116 | export const fetchLeaders = () => dispatch => {
117 | dispatch(leadersLoading());
118 | return fetch(baseUrl + "leaders")
119 | .then(
120 | response => {
121 | if (response.ok) {
122 | return response;
123 | } else {
124 | var error = new Error(
125 | "Error " + response.status + ": " + response.statusText
126 | );
127 | error.response = response;
128 | throw error;
129 | }
130 | },
131 | error => {
132 | var error = new Error(error.message);
133 | throw error;
134 | }
135 | )
136 | .then(response => response.json())
137 | .then(leaders => dispatch(addLeaders(leaders)))
138 | .catch(error => dispatch(leadersFailed(error.message)));
139 | };
140 |
141 | export const leadersLoading = () => ({
142 | type: ActionTypes.LEADERS_LOADING
143 | });
144 |
145 | export const leadersFailed = errMess => ({
146 | type: ActionTypes.LEADERS_FAILED,
147 | payload: errMess
148 | });
149 |
150 | export const addLeaders = leaders => ({
151 | type: ActionTypes.ADD_LEADERS,
152 | payload: leaders
153 | });
154 |
155 | export const postFavorite = dishId => dispatch => {
156 | setTimeout(() => {
157 | dispatch(addFavorite(dishId));
158 | }, 2000);
159 | };
160 |
161 | export const addFavorite = dishId => ({
162 | type: ActionTypes.ADD_FAVORITE,
163 | payload: dishId
164 | });
165 |
166 | export const postComment = (dishId, rating, author, comment) => dispatch => {
167 | const newComment = {
168 | dishId: dishId,
169 | rating: rating,
170 | author: author,
171 | comment: comment
172 | };
173 | newComment.date = new Date().toISOString();
174 |
175 | setTimeout(() => {
176 | dispatch(addComment(newComment));
177 | }, 2000);
178 | };
179 |
180 | export const addComment = comment => ({
181 | type: ActionTypes.ADD_COMMENT,
182 | payload: comment
183 | });
--------------------------------------------------------------------------------
/Course3/ReactNative/Week2_Assignment/ActionTypes.js:
--------------------------------------------------------------------------------
1 | export const DISHES_LOADING = "DISHES_LOADING";
2 | export const ADD_DISHES = "ADD_DISHES";
3 | export const DISHES_FAILED = "DISHES_FAILED";
4 | export const ADD_COMMENTS = "ADD_COMMENTS";
5 | export const COMMENTS_FAILED = "COMMENTS_FAILED";
6 | export const PROMOS_LOADING = "PROMOS_LOADING";
7 | export const ADD_PROMOS = "ADD_PROMOS";
8 | export const PROMOS_FAILED = "PROMOS_FAILED";
9 | export const LEADERS_LOADING = "LEADERS_LOADING";
10 | export const ADD_LEADERS = "ADD_LEADERS";
11 | export const LEADERS_FAILED = "LEADERS_FAILED";
12 | export const POST_FAVORITE = "POST_FAVORITE";
13 | export const ADD_FAVORITE = "ADD_FAVORITE";
14 | export const ADD_COMMENT = "ADD_COMMENT";
15 |
--------------------------------------------------------------------------------
/Course3/ReactNative/Week2_Assignment/comments.js:
--------------------------------------------------------------------------------
1 | import * as ActionTypes from "./ActionTypes";
2 |
3 | export const comments = (
4 | state = {
5 | errMess: null,
6 | comments: []
7 | },
8 | action
9 | ) => {
10 | switch (action.type) {
11 | case ActionTypes.ADD_COMMENTS:
12 | return {
13 | ...state,
14 | errMess: null,
15 | comments: action.payload
16 | };
17 |
18 | case ActionTypes.COMMENTS_FAILED:
19 | return {
20 | ...state,
21 | errMess: action.payload,
22 | comments: []
23 | };
24 |
25 | case ActionTypes.ADD_COMMENT:
26 | const { comments } = state;
27 | const comment = { id: comments.length, ...action.payload };
28 | return { ...state, comments: comments.concat(comment) };
29 |
30 | default:
31 | return state;
32 | }
33 | };
34 |
--------------------------------------------------------------------------------
/Course3/ReactNative/Week3_Assignment/ReservationComponent.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import {
3 | Text,
4 | View,
5 | ScrollView,
6 | StyleSheet,
7 | Picker,
8 | Switch,
9 | Button,
10 | Modal,
11 | Alert
12 | } from "react-native";
13 | import { Card } from "react-native-elements";
14 | import DatePicker from "react-native-datepicker";
15 | import * as Animatable from "react-native-animatable";
16 |
17 | class Reservation extends Component {
18 | constructor(props) {
19 | super(props);
20 |
21 | this.state = {
22 | guests: 1,
23 | smoking: false,
24 | date: "",
25 | showModal: false
26 | };
27 | }
28 |
29 | static navigationOptions = {
30 | title: "Reserve Table"
31 | };
32 |
33 | toggleModal() {
34 | this.setState({ showModal: !this.state.showModal });
35 | }
36 |
37 | handleReservation() {
38 | console.log(JSON.stringify(this.state));
39 | // this.toggleModal();
40 | const { date, guests, smoking } = this.state;
41 |
42 | Alert.alert(
43 | "Your Reservation OK?",
44 | `Number of guests: ${guests}\nSmoking? ${
45 | smoking ? "Yes" : "No"
46 | }\nDate and Time:${date}`,
47 | [
48 | {
49 | text: "Cancel",
50 | style: "cancel",
51 | onPress: () => this.resetForm()
52 | },
53 | {
54 | text: "OK",
55 | // eslint-disable-next-line no-confusing-arrow, no-console
56 | onPress: () => this.resetForm()
57 | }
58 | ],
59 | { cancelable: false }
60 | );
61 | }
62 |
63 | resetForm() {
64 | this.setState({
65 | guests: 1,
66 | smoking: false,
67 | date: "",
68 | showModal: false
69 | });
70 | }
71 |
72 | render() {
73 | return (
74 |
75 |
76 |
77 | Number of Guests
78 |
82 | this.setState({ guests: itemValue })
83 | }
84 | >
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 | Smoking/Non-Smoking?
95 | this.setState({ smoking: value })}
100 | >
101 |
102 |
103 | Date and Time
104 | {
126 | this.setState({ date: date });
127 | }}
128 | />
129 |
130 |
131 | this.handleReservation()}
133 | title="Reserve"
134 | color="#512DA8"
135 | accessibilityLabel="Learn more about this purple button"
136 | />
137 |
138 | {/* {
143 | this.toggleModal();
144 | this.resetForm();
145 | }}
146 | onRequestClose={() => {
147 | this.toggleModal();
148 | this.resetForm();
149 | }}
150 | >
151 |
152 | Your Reservation
153 |
154 | Number of Guests : {this.state.guests}
155 |
156 |
157 | Smoking? : {this.state.smoking ? "Yes" : "No"}
158 |
159 |
160 | Date and Time : {this.state.date}
161 |
162 | {
164 | this.toggleModal();
165 | this.resetForm();
166 | }}
167 | color="#512DA8"
168 | title="Close"
169 | />
170 |
171 | */}
172 |
173 |
174 | );
175 | }
176 | }
177 |
178 | const styles = StyleSheet.create({
179 | formRow: {
180 | alignItems: "center",
181 | justifyContent: "center",
182 | flex: 1,
183 | flexDirection: "row",
184 | margin: 20
185 | },
186 | formLabel: {
187 | fontSize: 18,
188 | flex: 2
189 | },
190 | formItem: {
191 | flex: 1
192 | },
193 | modal: {
194 | justifyContent: "center",
195 | margin: 20
196 | },
197 | modalTitle: {
198 | fontSize: 24,
199 | fontWeight: "bold",
200 | backgroundColor: "#512DA8",
201 | textAlign: "center",
202 | color: "white",
203 | marginBottom: 20
204 | },
205 | modalText: {
206 | fontSize: 18,
207 | margin: 10
208 | }
209 | });
210 |
211 | export default Reservation;
212 |
--------------------------------------------------------------------------------
/Course3/ReactNative/confusion2/.expo-shared/assets.json:
--------------------------------------------------------------------------------
1 | {
2 | "f9155ac790fd02fadcdeca367b02581c04a353aa6d5aa84409a59f6804c87acd": true,
3 | "89ed26367cdb9b771858e026f2eb95bfdb90e5ae943e716575327ec325f39c44": true
4 | }
--------------------------------------------------------------------------------
/Course3/ReactNative/confusion2/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/**/*
2 | .expo/*
3 | npm-debug.*
4 | *.jks
5 | *.p8
6 | *.p12
7 | *.key
8 | *.mobileprovision
9 | *.orig.*
10 | web-build/
11 | web-report/
12 |
13 | # macOS
14 | .DS_Store
15 |
--------------------------------------------------------------------------------
/Course3/ReactNative/confusion2/App.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import Main from "./components/MainComponent";
3 | import { Provider } from "react-redux";
4 | import { PersistGate } from "redux-persist/es/integration/react";
5 | import { ConfigureStore } from "./redux/configureStore";
6 | import { Loading } from "./components/LoadingComponent";
7 |
8 | const { persistor, store } = ConfigureStore();
9 |
10 | export default function App() {
11 | return (
12 |
13 | } persistor={persistor}>
14 |
15 |
16 |
17 | );
18 | }
19 |
--------------------------------------------------------------------------------
/Course3/ReactNative/confusion2/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "expo": {
3 | "name": "confusion2",
4 | "slug": "confusion2",
5 | "privacy": "public",
6 | "sdkVersion": "36.0.0",
7 | "platforms": [
8 | "ios",
9 | "android",
10 | "web"
11 | ],
12 | "version": "1.0.0",
13 | "orientation": "portrait",
14 | "icon": "./assets/icon.png",
15 | "splash": {
16 | "image": "./assets/splash.png",
17 | "resizeMode": "contain",
18 | "backgroundColor": "#ffffff"
19 | },
20 | "updates": {
21 | "fallbackToCacheTimeout": 0
22 | },
23 | "assetBundlePatterns": [
24 | "**/*"
25 | ],
26 | "ios": {
27 | "supportsTablet": true
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Course3/ReactNative/confusion2/assets/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course3/ReactNative/confusion2/assets/icon.png
--------------------------------------------------------------------------------
/Course3/ReactNative/confusion2/assets/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course3/ReactNative/confusion2/assets/splash.png
--------------------------------------------------------------------------------
/Course3/ReactNative/confusion2/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = function(api) {
2 | api.cache(true);
3 | return {
4 | presets: ['babel-preset-expo'],
5 | };
6 | };
7 |
--------------------------------------------------------------------------------
/Course3/ReactNative/confusion2/components/AboutComponent.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import { ScrollView, Text, FlatList } from "react-native";
3 | import { Card, ListItem } from "react-native-elements";
4 | import { connect } from "react-redux";
5 | import { baseUrl } from "../shared/baseUrl";
6 | import { Loading } from "./LoadingComponent";
7 | import * as Animatable from "react-native-animatable";
8 |
9 | const mapStateToProps = state => {
10 | return {
11 | leaders: state.leaders
12 | };
13 | };
14 |
15 | function History(props) {
16 | return (
17 |
18 |
19 | Started in 2010, Ristorante con Fusion quickly established itself as a
20 | culinary icon par excellence in Hong Kong. With its unique brand of
21 | world fusion cuisine that can be found nowhere else, it enjoys patronage
22 | from the A-list clientele in Hong Kong. Featuring four of the best
23 | three-star Michelin chefs in the world, you never know what will arrive
24 | on your plate the next time you visit us.
25 |
26 |
27 | The restaurant traces its humble beginnings to The Frying Pan, a
28 | successful chain started by our CEO, Mr. Peter Pan, that featured for
29 | the first time the world's best cuisines in a pan.
30 |
31 |
32 | );
33 | }
34 |
35 | class AboutUs extends Component {
36 | static navigationOptions = {
37 | title: "About Us"
38 | };
39 |
40 | render() {
41 | const renderLeader = ({ item, index }) => {
42 | return (
43 |
50 | );
51 | };
52 |
53 | if (this.props.leaders.isLoading) {
54 | return (
55 |
56 |
57 |
58 |
59 |
60 |
61 | );
62 | } else if (this.props.leaders.errMess) {
63 | return (
64 |
65 |
66 |
67 |
68 | {this.props.leaders.errMess}
69 |
70 |
71 |
72 | );
73 | } else {
74 | return (
75 |
76 |
77 |
78 |
79 | item.id.toString()}
83 | />
84 |
85 |
86 |
87 | );
88 | }
89 | }
90 | }
91 |
92 | export default connect(mapStateToProps)(AboutUs);
93 |
--------------------------------------------------------------------------------
/Course3/ReactNative/confusion2/components/ContactComponent.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import { Text, ScrollView } from "react-native";
3 | import { Card } from "react-native-elements";
4 | import * as Animatable from "react-native-animatable";
5 |
6 | class ContactUs extends Component {
7 | static navigationOptions = {
8 | title: "Contact Us"
9 | };
10 |
11 | render() {
12 | return (
13 |
14 |
15 |
16 | 121, Clear Water Bay Road
17 | Clear Water Bay, Kowloon
18 | HONG KONG
19 | Tel: +852 1234 5678
20 | Fax: +852 8765 4321
21 | Email:confusion@food.net
22 |
23 |
24 |
25 | );
26 | }
27 | }
28 |
29 | export default ContactUs;
30 |
--------------------------------------------------------------------------------
/Course3/ReactNative/confusion2/components/FavoriteComponent.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import { View, FlatList, Text, Alert } from "react-native";
3 | import { ListItem } from "react-native-elements";
4 | import { connect } from "react-redux";
5 | import { baseUrl } from "../shared/baseUrl";
6 | import { Loading } from "./LoadingComponent";
7 | import Swipeout from "react-native-swipeout";
8 | import { deleteFavorite } from "../redux/ActionCreators";
9 | import * as Animatable from "react-native-animatable";
10 |
11 | const mapStateToProps = state => {
12 | return {
13 | dishes: state.dishes,
14 | favorites: state.favorites
15 | };
16 | };
17 |
18 | const mapDispatchToProps = dispatch => ({
19 | deleteFavorite: dishId => dispatch(deleteFavorite(dishId))
20 | });
21 |
22 | class Favorites extends Component {
23 | static navigationOptions = {
24 | title: "My Favorites"
25 | };
26 |
27 | render() {
28 | const { navigate } = this.props.navigation;
29 |
30 | const renderMenuItem = ({ item, index }) => {
31 | const rightButton = [
32 | {
33 | text: "Delete",
34 | type: "delete",
35 | onPress: () => {
36 | Alert.alert(
37 | "Delete Favorite ?",
38 | "Are you sure you wish to delete the favorite dish " +
39 | item.name +
40 | " ?",
41 | [
42 | {
43 | text: "Cancel",
44 | onPress: () => console.log(item.name + "Not Deleted"),
45 | style: "cancel"
46 | },
47 | {
48 | text: "OK",
49 | onPress: () => this.props.deleteFavorite(item.id)
50 | }
51 | ],
52 | { cancelable: false }
53 | );
54 | }
55 | }
56 | ];
57 | return (
58 |
59 |
60 | navigate("Dishdetail", { dishId: item.id })}
66 | leftAvatar={{ source: { uri: baseUrl + item.image } }}
67 | />
68 |
69 |
70 | );
71 | };
72 |
73 | if (this.props.dishes.isLoading) {
74 | return ;
75 | } else if (this.props.dishes.errMess) {
76 | return (
77 |
78 | {this.props.errMess}
79 |
80 | );
81 | } else {
82 | return (
83 |
85 | this.props.favorites.some(el => el === dish.id)
86 | )}
87 | renderItem={renderMenuItem}
88 | keyExtractor={item => item.id.toString()}
89 | />
90 | );
91 | }
92 | }
93 | }
94 |
95 | export default connect(mapStateToProps, mapDispatchToProps)(Favorites);
96 |
--------------------------------------------------------------------------------
/Course3/ReactNative/confusion2/components/HomeComponent.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import { Text, View, Animated, Easing } from "react-native";
3 | import { Card } from "react-native-elements";
4 | import { connect } from "react-redux";
5 | import { baseUrl } from "../shared/baseUrl";
6 | import { Loading } from "./LoadingComponent";
7 |
8 | const mapStateToProps = state => {
9 | return {
10 | dishes: state.dishes,
11 | promotions: state.promotions,
12 | leaders: state.leaders
13 | };
14 | };
15 |
16 | function RenderItem(props) {
17 | const item = props.item;
18 |
19 | if (props.isLoading) {
20 | return ;
21 | } else if (props.errMess) {
22 | return (
23 |
24 | {props.errMess}
25 |
26 | );
27 | } else {
28 | if (item != null) {
29 | return (
30 |
35 | {item.description}
36 |
37 | );
38 | } else {
39 | return ;
40 | }
41 | }
42 | }
43 |
44 | class Home extends Component {
45 | constructor(props) {
46 | super(props);
47 | this.animatedValue = new Animated.Value(0);
48 | }
49 |
50 | static navigationOptions = {
51 | title: "Home"
52 | };
53 |
54 | componentDidMount() {
55 | this.animate();
56 | }
57 |
58 | animate() {
59 | this.animatedValue.setValue(0);
60 | Animated.timing(this.animatedValue, {
61 | toValue: 8,
62 | duration: 8000,
63 | easing: Easing.linear
64 | }).start(() => this.animate());
65 | }
66 |
67 | render() {
68 | const xpos1 = this.animatedValue.interpolate({
69 | inputRange: [0, 1, 3, 5, 8],
70 | outputRange: [1200, 600, 0, -600, -1200]
71 | });
72 |
73 | const xpos2 = this.animatedValue.interpolate({
74 | inputRange: [0, 2, 4, 6, 8],
75 | outputRange: [1200, 600, 0, -600, -1200]
76 | });
77 |
78 | const xpos3 = this.animatedValue.interpolate({
79 | inputRange: [0, 3, 5, 7, 8],
80 | outputRange: [1200, 600, 0, -600, -1200]
81 | });
82 |
83 | return (
84 |
85 |
88 | dish.featured)[0]}
90 | isLoading={this.props.dishes.isLoading}
91 | errMess={this.props.dishes.errMess}
92 | />
93 |
94 |
97 | promo.featured
101 | )[0]
102 | }
103 | isLoading={this.props.promotions.isLoading}
104 | errMess={this.props.promotions.errMess}
105 | />
106 |
107 |
110 | leader.featured)[0]
113 | }
114 | isLoading={this.props.leaders.isLoading}
115 | errMess={this.props.leaders.errMess}
116 | />
117 |
118 |
119 | );
120 | }
121 | }
122 |
123 | export default connect(mapStateToProps)(Home);
124 |
--------------------------------------------------------------------------------
/Course3/ReactNative/confusion2/components/LoadingComponent.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { ActivityIndicator, StyleSheet, Text, View } from "react-native";
3 |
4 | const styles = StyleSheet.create({
5 | loadingView: {
6 | alignItems: "center",
7 | justifyContent: "center",
8 | flex: 1
9 | },
10 | loadingText: {
11 | color: "#512DA8",
12 | fontSize: 14,
13 | fontWeight: "bold"
14 | }
15 | });
16 |
17 | export const Loading = () => {
18 | return (
19 |
20 |
21 | Loading . . .
22 |
23 | );
24 | };
25 |
--------------------------------------------------------------------------------
/Course3/ReactNative/confusion2/components/MenuComponent.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import { View, FlatList } from "react-native";
3 | import { Tile } from "react-native-elements";
4 | import { connect } from "react-redux";
5 | import { baseUrl } from "../shared/baseUrl";
6 | import { Loading } from "./LoadingComponent";
7 | import * as Animatable from "react-native-animatable";
8 |
9 | const mapStateToProps = state => {
10 | return {
11 | dishes: state.dishes
12 | };
13 | };
14 |
15 | class Menu extends Component {
16 | static navigationOptions = {
17 | title: "Menu"
18 | };
19 |
20 | render() {
21 | const renderMenuItem = ({ item, index }) => {
22 | return (
23 |
24 | navigate("Dishdetail", { dishId: item.id })}
30 | imageSrc={{ uri: baseUrl + item.image }}
31 | />
32 |
33 | );
34 | };
35 | const { navigate } = this.props.navigation;
36 |
37 | if (this.props.dishes.isLoading) {
38 | return ;
39 | } else if (this.props.dishes.errMess) {
40 | return (
41 |
42 | {this.props.dishes.errMess}
43 |
44 | );
45 | } else {
46 | return (
47 | item.id.toString()}
51 | />
52 | );
53 | }
54 | }
55 | }
56 |
57 | export default connect(mapStateToProps)(Menu);
58 |
--------------------------------------------------------------------------------
/Course3/ReactNative/confusion2/components/ReservationComponent.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import {
3 | Text,
4 | View,
5 | ScrollView,
6 | StyleSheet,
7 | Picker,
8 | Switch,
9 | Button,
10 | Modal,
11 | Alert
12 | } from "react-native";
13 | import { Card } from "react-native-elements";
14 | import DatePicker from "react-native-datepicker";
15 | import * as Animatable from "react-native-animatable";
16 |
17 | class Reservation extends Component {
18 | constructor(props) {
19 | super(props);
20 |
21 | this.state = {
22 | guests: 1,
23 | smoking: false,
24 | date: "",
25 | showModal: false
26 | };
27 | }
28 |
29 | static navigationOptions = {
30 | title: "Reserve Table"
31 | };
32 |
33 | toggleModal() {
34 | this.setState({ showModal: !this.state.showModal });
35 | }
36 |
37 | handleReservation() {
38 | console.log(JSON.stringify(this.state));
39 | // this.toggleModal();
40 | const { date, guests, smoking } = this.state;
41 |
42 | Alert.alert(
43 | "Your Reservation OK?",
44 | `Number of guests: ${guests}\nSmoking? ${
45 | smoking ? "Yes" : "No"
46 | }\nDate and Time:${date}`,
47 | [
48 | {
49 | text: "Cancel",
50 | style: "cancel",
51 | onPress: () => this.resetForm()
52 | },
53 | {
54 | text: "OK",
55 | // eslint-disable-next-line no-confusing-arrow, no-console
56 | onPress: () => this.resetForm()
57 | }
58 | ],
59 | { cancelable: false }
60 | );
61 | }
62 |
63 | resetForm() {
64 | this.setState({
65 | guests: 1,
66 | smoking: false,
67 | date: "",
68 | showModal: false
69 | });
70 | }
71 |
72 | render() {
73 | return (
74 |
75 |
76 |
77 | Number of Guests
78 |
82 | this.setState({ guests: itemValue })
83 | }
84 | >
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 | Smoking/Non-Smoking?
95 | this.setState({ smoking: value })}
100 | >
101 |
102 |
103 | Date and Time
104 | {
126 | this.setState({ date: date });
127 | }}
128 | />
129 |
130 |
131 | this.handleReservation()}
133 | title="Reserve"
134 | color="#512DA8"
135 | accessibilityLabel="Learn more about this purple button"
136 | />
137 |
138 | {/* {
143 | this.toggleModal();
144 | this.resetForm();
145 | }}
146 | onRequestClose={() => {
147 | this.toggleModal();
148 | this.resetForm();
149 | }}
150 | >
151 |
152 | Your Reservation
153 |
154 | Number of Guests : {this.state.guests}
155 |
156 |
157 | Smoking? : {this.state.smoking ? "Yes" : "No"}
158 |
159 |
160 | Date and Time : {this.state.date}
161 |
162 | {
164 | this.toggleModal();
165 | this.resetForm();
166 | }}
167 | color="#512DA8"
168 | title="Close"
169 | />
170 |
171 | */}
172 |
173 |
174 | );
175 | }
176 | }
177 |
178 | const styles = StyleSheet.create({
179 | formRow: {
180 | alignItems: "center",
181 | justifyContent: "center",
182 | flex: 1,
183 | flexDirection: "row",
184 | margin: 20
185 | },
186 | formLabel: {
187 | fontSize: 18,
188 | flex: 2
189 | },
190 | formItem: {
191 | flex: 1
192 | },
193 | modal: {
194 | justifyContent: "center",
195 | margin: 20
196 | },
197 | modalTitle: {
198 | fontSize: 24,
199 | fontWeight: "bold",
200 | backgroundColor: "#512DA8",
201 | textAlign: "center",
202 | color: "white",
203 | marginBottom: 20
204 | },
205 | modalText: {
206 | fontSize: 18,
207 | margin: 10
208 | }
209 | });
210 |
211 | export default Reservation;
212 |
--------------------------------------------------------------------------------
/Course3/ReactNative/confusion2/components/images/alberto.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course3/ReactNative/confusion2/components/images/alberto.png
--------------------------------------------------------------------------------
/Course3/ReactNative/confusion2/components/images/buffet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course3/ReactNative/confusion2/components/images/buffet.png
--------------------------------------------------------------------------------
/Course3/ReactNative/confusion2/components/images/elaicheesecake.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course3/ReactNative/confusion2/components/images/elaicheesecake.png
--------------------------------------------------------------------------------
/Course3/ReactNative/confusion2/components/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course3/ReactNative/confusion2/components/images/logo.png
--------------------------------------------------------------------------------
/Course3/ReactNative/confusion2/components/images/uthappizza.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course3/ReactNative/confusion2/components/images/uthappizza.png
--------------------------------------------------------------------------------
/Course3/ReactNative/confusion2/components/images/vadonut.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course3/ReactNative/confusion2/components/images/vadonut.png
--------------------------------------------------------------------------------
/Course3/ReactNative/confusion2/components/images/zucchipakoda.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course3/ReactNative/confusion2/components/images/zucchipakoda.png
--------------------------------------------------------------------------------
/Course3/ReactNative/confusion2/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "node_modules/expo/AppEntry.js",
3 | "scripts": {
4 | "start": "expo start",
5 | "android": "expo start --android",
6 | "ios": "expo start --ios",
7 | "web": "expo start --web",
8 | "eject": "expo eject"
9 | },
10 | "dependencies": {
11 | "expo": "~36.0.0",
12 | "react": "~16.9.0",
13 | "react-dom": "~16.9.0",
14 | "react-native": "https://github.com/expo/react-native/archive/sdk-36.0.0.tar.gz",
15 | "react-native-animatable": "1.2.4",
16 | "react-native-datepicker": "1.7.2",
17 | "react-native-elements": "^1.0.0-beta8",
18 | "react-native-swipeout": "2.3.3",
19 | "react-native-web": "~0.11.7",
20 | "react-navigation": "2.0.1",
21 | "react-redux": "5.0.7",
22 | "redux": "4.0.0",
23 | "redux-logger": "3.0.6",
24 | "redux-persist": "5.9.1",
25 | "redux-thunk": "2.2.0"
26 | },
27 | "devDependencies": {
28 | "@babel/core": "^7.0.0",
29 | "babel-preset-expo": "~8.0.0"
30 | },
31 | "private": true
32 | }
33 |
--------------------------------------------------------------------------------
/Course3/ReactNative/confusion2/redux/ActionCreators.js:
--------------------------------------------------------------------------------
1 | import * as ActionTypes from "./ActionTypes";
2 | import { baseUrl } from "../shared/baseUrl";
3 |
4 | export const fetchComments = () => dispatch => {
5 | return fetch(baseUrl + "comments")
6 | .then(
7 | response => {
8 | if (response.ok) {
9 | return response;
10 | } else {
11 | var error = new Error(
12 | "Error " + response.status + ": " + response.statusText
13 | );
14 | error.response = response;
15 | throw error;
16 | }
17 | },
18 | error => {
19 | var error = new Error(error.message);
20 | throw error;
21 | }
22 | )
23 | .then(response => response.json())
24 | .then(comments => dispatch(addComments(comments)))
25 | .catch(error => dispatch(commentsFailed(error.message)));
26 | };
27 |
28 | export const commentsFailed = errMess => ({
29 | type: ActionTypes.COMMENTS_FAILED,
30 | payload: errMess
31 | });
32 |
33 | export const addComments = comments => ({
34 | type: ActionTypes.ADD_COMMENTS,
35 | payload: comments
36 | });
37 |
38 | export const fetchDishes = () => dispatch => {
39 | dispatch(dishesLoading());
40 | return fetch(baseUrl + "dishes")
41 | .then(
42 | response => {
43 | if (response.ok) {
44 | return response;
45 | } else {
46 | var error = new Error(
47 | "Error " + response.status + ": " + response.statusText
48 | );
49 | error.response = response;
50 | throw error;
51 | }
52 | },
53 | error => {
54 | var error = new Error(error.message);
55 | throw error;
56 | }
57 | )
58 | .then(response => response.json())
59 | .then(dishes => dispatch(addDishes(dishes)))
60 | .catch(error => dispatch(dishesFailed(error.message)));
61 | };
62 |
63 | export const dishesLoading = () => ({
64 | type: ActionTypes.DISHES_LOADING
65 | });
66 |
67 | export const dishesFailed = errMess => ({
68 | type: ActionTypes.DISHES_FAILED,
69 | payload: errMess
70 | });
71 |
72 | export const addDishes = dishes => ({
73 | type: ActionTypes.ADD_DISHES,
74 | payload: dishes
75 | });
76 |
77 | export const fetchPromos = () => dispatch => {
78 | dispatch(promosLoading());
79 | return fetch(baseUrl + "promotions")
80 | .then(
81 | response => {
82 | if (response.ok) {
83 | return response;
84 | } else {
85 | var error = new Error(
86 | "Error " + response.status + ": " + response.statusText
87 | );
88 | error.response = response;
89 | throw error;
90 | }
91 | },
92 | error => {
93 | var error = new Error(error.message);
94 | throw error;
95 | }
96 | )
97 | .then(response => response.json())
98 | .then(promos => dispatch(addPromos(promos)))
99 | .catch(error => dispatch(promosFailed(error.message)));
100 | };
101 |
102 | export const promosLoading = () => ({
103 | type: ActionTypes.PROMOS_LOADING
104 | });
105 |
106 | export const promosFailed = errMess => ({
107 | type: ActionTypes.PROMOS_FAILED,
108 | payload: errMess
109 | });
110 |
111 | export const addPromos = promos => ({
112 | type: ActionTypes.ADD_PROMOS,
113 | payload: promos
114 | });
115 |
116 | export const fetchLeaders = () => dispatch => {
117 | dispatch(leadersLoading());
118 | return fetch(baseUrl + "leaders")
119 | .then(
120 | response => {
121 | if (response.ok) {
122 | return response;
123 | } else {
124 | var error = new Error(
125 | "Error " + response.status + ": " + response.statusText
126 | );
127 | error.response = response;
128 | throw error;
129 | }
130 | },
131 | error => {
132 | var error = new Error(error.message);
133 | throw error;
134 | }
135 | )
136 | .then(response => response.json())
137 | .then(leaders => dispatch(addLeaders(leaders)))
138 | .catch(error => dispatch(leadersFailed(error.message)));
139 | };
140 |
141 | export const leadersLoading = () => ({
142 | type: ActionTypes.LEADERS_LOADING
143 | });
144 |
145 | export const leadersFailed = errMess => ({
146 | type: ActionTypes.LEADERS_FAILED,
147 | payload: errMess
148 | });
149 |
150 | export const addLeaders = leaders => ({
151 | type: ActionTypes.ADD_LEADERS,
152 | payload: leaders
153 | });
154 |
155 | export const postFavorite = dishId => dispatch => {
156 | setTimeout(() => {
157 | dispatch(addFavorite(dishId));
158 | }, 2000);
159 | };
160 |
161 | export const addFavorite = dishId => ({
162 | type: ActionTypes.ADD_FAVORITE,
163 | payload: dishId
164 | });
165 |
166 | export const postComment = (dishId, rating, author, comment) => dispatch => {
167 | const newComment = {
168 | dishId: dishId,
169 | rating: rating,
170 | author: author,
171 | comment: comment
172 | };
173 | newComment.date = new Date().toISOString();
174 |
175 | setTimeout(() => {
176 | dispatch(addComment(newComment));
177 | }, 2000);
178 | };
179 |
180 | export const addComment = comment => ({
181 | type: ActionTypes.ADD_COMMENT,
182 | payload: comment
183 | });
184 |
185 | export const deleteFavorite = dishId => ({
186 | type: ActionTypes.DELETE_FAVORITE,
187 | payload: dishId
188 | });
189 |
--------------------------------------------------------------------------------
/Course3/ReactNative/confusion2/redux/ActionTypes.js:
--------------------------------------------------------------------------------
1 | export const DISHES_LOADING = "DISHES_LOADING";
2 | export const ADD_DISHES = "ADD_DISHES";
3 | export const DISHES_FAILED = "DISHES_FAILED";
4 | export const ADD_COMMENTS = "ADD_COMMENTS";
5 | export const COMMENTS_FAILED = "COMMENTS_FAILED";
6 | export const PROMOS_LOADING = "PROMOS_LOADING";
7 | export const ADD_PROMOS = "ADD_PROMOS";
8 | export const PROMOS_FAILED = "PROMOS_FAILED";
9 | export const LEADERS_LOADING = "LEADERS_LOADING";
10 | export const ADD_LEADERS = "ADD_LEADERS";
11 | export const LEADERS_FAILED = "LEADERS_FAILED";
12 | export const POST_FAVORITE = "POST_FAVORITE";
13 | export const ADD_FAVORITE = "ADD_FAVORITE";
14 | export const ADD_COMMENT = "ADD_COMMENT";
15 | export const DELETE_FAVORITE = "DELETE_FAVORITE";
16 |
--------------------------------------------------------------------------------
/Course3/ReactNative/confusion2/redux/comments.js:
--------------------------------------------------------------------------------
1 | import * as ActionTypes from "./ActionTypes";
2 |
3 | export const comments = (
4 | state = {
5 | errMess: null,
6 | comments: []
7 | },
8 | action
9 | ) => {
10 | switch (action.type) {
11 | case ActionTypes.ADD_COMMENTS:
12 | return {
13 | ...state,
14 | errMess: null,
15 | comments: action.payload
16 | };
17 |
18 | case ActionTypes.COMMENTS_FAILED:
19 | return {
20 | ...state,
21 | errMess: action.payload,
22 | comments: []
23 | };
24 |
25 | case ActionTypes.ADD_COMMENT:
26 | const { comments } = state;
27 | const comment = { id: comments.length, ...action.payload };
28 | return { ...state, comments: comments.concat(comment) };
29 |
30 | default:
31 | return state;
32 | }
33 | };
34 |
--------------------------------------------------------------------------------
/Course3/ReactNative/confusion2/redux/configureStore.js:
--------------------------------------------------------------------------------
1 | import { createStore, applyMiddleware } from "redux";
2 | import thunk from "redux-thunk";
3 | import logger from "redux-logger";
4 | import { dishes } from "./dishes";
5 | import { comments } from "./comments";
6 | import { promotions } from "./promotions";
7 | import { leaders } from "./leaders";
8 | import { favorites } from "./favorites";
9 | import { persistStore, persistCombineReducers } from "redux-persist";
10 | import storage from "redux-persist/es/storage";
11 |
12 | export const ConfigureStore = () => {
13 | const config = {
14 | key: "root",
15 | storage,
16 | debug: true
17 | };
18 |
19 | const store = createStore(
20 | persistCombineReducers(config, {
21 | dishes,
22 | comments,
23 | promotions,
24 | leaders,
25 | favorites
26 | }),
27 | applyMiddleware(thunk, logger)
28 | );
29 |
30 | const persistor = persistStore(store);
31 | return { persistor, store };
32 | };
33 |
--------------------------------------------------------------------------------
/Course3/ReactNative/confusion2/redux/dishes.js:
--------------------------------------------------------------------------------
1 | import * as ActionTypes from "./ActionTypes";
2 |
3 | export const dishes = (
4 | state = {
5 | isLoading: true,
6 | errMess: null,
7 | dishes: []
8 | },
9 | action
10 | ) => {
11 | switch (action.type) {
12 | case ActionTypes.ADD_DISHES:
13 | return {
14 | ...state,
15 | isLoading: false,
16 | errMess: null,
17 | dishes: action.payload
18 | };
19 |
20 | case ActionTypes.DISHES_LOADING:
21 | return { ...state, isLoading: true, errMess: null, dishes: [] };
22 |
23 | case ActionTypes.DISHES_FAILED:
24 | return {
25 | ...state,
26 | isLoading: false,
27 | errMess: action.payload,
28 | dishes: []
29 | };
30 |
31 | default:
32 | return state;
33 | }
34 | };
35 |
--------------------------------------------------------------------------------
/Course3/ReactNative/confusion2/redux/favorites.js:
--------------------------------------------------------------------------------
1 | import * as ActionTypes from "./ActionTypes";
2 |
3 | export const favorites = (state = [], action) => {
4 | switch (action.type) {
5 | case ActionTypes.ADD_FAVORITE:
6 | if (state.some(el => el === action.payload)) return state;
7 | else return state.concat(action.payload);
8 |
9 | case ActionTypes.DELETE_FAVORITE:
10 | return state.filter(favorite => favorite !== action.payload);
11 |
12 | default:
13 | return state;
14 | }
15 | };
16 |
--------------------------------------------------------------------------------
/Course3/ReactNative/confusion2/redux/leaders.js:
--------------------------------------------------------------------------------
1 | import * as ActionTypes from "./ActionTypes";
2 |
3 | export const leaders = (
4 | state = {
5 | isLoading: true,
6 | errMess: null,
7 | leaders: []
8 | },
9 | action
10 | ) => {
11 | switch (action.type) {
12 | case ActionTypes.ADD_LEADERS:
13 | return {
14 | ...state,
15 | isLoading: false,
16 | errMess: null,
17 | leaders: action.payload
18 | };
19 |
20 | case ActionTypes.LEADERS_LOADING:
21 | return { ...state, isLoading: true, errMess: null, leaders: [] };
22 |
23 | case ActionTypes.LEADERS_FAILED:
24 | return {
25 | ...state,
26 | isLoading: false,
27 | errMess: action.payload,
28 | leaders: []
29 | };
30 |
31 | default:
32 | return state;
33 | }
34 | };
35 |
--------------------------------------------------------------------------------
/Course3/ReactNative/confusion2/redux/promotions.js:
--------------------------------------------------------------------------------
1 | import * as ActionTypes from "./ActionTypes";
2 |
3 | export const promotions = (
4 | state = {
5 | isLoading: true,
6 | errMess: null,
7 | promotions: []
8 | },
9 | action
10 | ) => {
11 | switch (action.type) {
12 | case ActionTypes.ADD_PROMOS:
13 | return {
14 | ...state,
15 | isLoading: false,
16 | errMess: null,
17 | promotions: action.payload
18 | };
19 |
20 | case ActionTypes.PROMOS_LOADING:
21 | return { ...state, isLoading: true, errMess: null, promotions: [] };
22 |
23 | case ActionTypes.PROMOS_FAILED:
24 | return {
25 | ...state,
26 | isLoading: false,
27 | errMess: action.payload,
28 | promotions: []
29 | };
30 |
31 | default:
32 | return state;
33 | }
34 | };
35 |
--------------------------------------------------------------------------------
/Course3/ReactNative/confusion2/shared/baseUrl.js:
--------------------------------------------------------------------------------
1 | export const baseUrl = "http://172.16.19.139:3001/";
2 |
--------------------------------------------------------------------------------
/Course3/ReactNative/confusion2/shared/comments.js:
--------------------------------------------------------------------------------
1 | export const COMMENTS = [
2 | {
3 | id: 0,
4 | dishId: 0,
5 | rating: 5,
6 | comment: "Imagine all the eatables, living in conFusion!",
7 | author: "John Lemon",
8 | date: "2012-10-16T17:57:28.556094Z"
9 | },
10 | {
11 | id: 1,
12 | dishId: 0,
13 | rating: 4,
14 | comment:
15 | "Sends anyone to heaven, I wish I could get my mother-in-law to eat it!",
16 | author: "Paul McVites",
17 | date: "2014-09-05T17:57:28.556094Z"
18 | },
19 | {
20 | id: 2,
21 | dishId: 0,
22 | rating: 3,
23 | comment: "Eat it, just eat it!",
24 | author: "Michael Jaikishan",
25 | date: "2015-02-13T17:57:28.556094Z"
26 | },
27 | {
28 | id: 3,
29 | dishId: 0,
30 | rating: 4,
31 | comment: "Ultimate, Reaching for the stars!",
32 | author: "Ringo Starry",
33 | date: "2013-12-02T17:57:28.556094Z"
34 | },
35 | {
36 | id: 4,
37 | dishId: 0,
38 | rating: 2,
39 | comment: "It's your birthday, we're gonna party!",
40 | author: "25 Cent",
41 | date: "2011-12-02T17:57:28.556094Z"
42 | },
43 | {
44 | id: 5,
45 | dishId: 1,
46 | rating: 5,
47 | comment: "Imagine all the eatables, living in conFusion!",
48 | author: "John Lemon",
49 | date: "2012-10-16T17:57:28.556094Z"
50 | },
51 | {
52 | id: 6,
53 | dishId: 1,
54 | rating: 4,
55 | comment:
56 | "Sends anyone to heaven, I wish I could get my mother-in-law to eat it!",
57 | author: "Paul McVites",
58 | date: "2014-09-05T17:57:28.556094Z"
59 | },
60 | {
61 | id: 7,
62 | dishId: 1,
63 | rating: 3,
64 | comment: "Eat it, just eat it!",
65 | author: "Michael Jaikishan",
66 | date: "2015-02-13T17:57:28.556094Z"
67 | },
68 | {
69 | id: 8,
70 | dishId: 1,
71 | rating: 4,
72 | comment: "Ultimate, Reaching for the stars!",
73 | author: "Ringo Starry",
74 | date: "2013-12-02T17:57:28.556094Z"
75 | },
76 | {
77 | id: 9,
78 | dishId: 1,
79 | rating: 2,
80 | comment: "It's your birthday, we're gonna party!",
81 | author: "25 Cent",
82 | date: "2011-12-02T17:57:28.556094Z"
83 | },
84 | {
85 | id: 10,
86 | dishId: 2,
87 | rating: 5,
88 | comment: "Imagine all the eatables, living in conFusion!",
89 | author: "John Lemon",
90 | date: "2012-10-16T17:57:28.556094Z"
91 | },
92 | {
93 | id: 11,
94 | dishId: 2,
95 | rating: 4,
96 | comment:
97 | "Sends anyone to heaven, I wish I could get my mother-in-law to eat it!",
98 | author: "Paul McVites",
99 | date: "2014-09-05T17:57:28.556094Z"
100 | },
101 | {
102 | id: 12,
103 | dishId: 2,
104 | rating: 3,
105 | comment: "Eat it, just eat it!",
106 | author: "Michael Jaikishan",
107 | date: "2015-02-13T17:57:28.556094Z"
108 | },
109 | {
110 | id: 13,
111 | dishId: 2,
112 | rating: 4,
113 | comment: "Ultimate, Reaching for the stars!",
114 | author: "Ringo Starry",
115 | date: "2013-12-02T17:57:28.556094Z"
116 | },
117 | {
118 | id: 14,
119 | dishId: 2,
120 | rating: 2,
121 | comment: "It's your birthday, we're gonna party!",
122 | author: "25 Cent",
123 | date: "2011-12-02T17:57:28.556094Z"
124 | },
125 | {
126 | id: 15,
127 | dishId: 3,
128 | rating: 5,
129 | comment: "Imagine all the eatables, living in conFusion!",
130 | author: "John Lemon",
131 | date: "2012-10-16T17:57:28.556094Z"
132 | },
133 | {
134 | id: 16,
135 | dishId: 3,
136 | rating: 4,
137 | comment:
138 | "Sends anyone to heaven, I wish I could get my mother-in-law to eat it!",
139 | author: "Paul McVites",
140 | date: "2014-09-05T17:57:28.556094Z"
141 | },
142 | {
143 | id: 17,
144 | dishId: 3,
145 | rating: 3,
146 | comment: "Eat it, just eat it!",
147 | author: "Michael Jaikishan",
148 | date: "2015-02-13T17:57:28.556094Z"
149 | },
150 | {
151 | id: 18,
152 | dishId: 3,
153 | rating: 4,
154 | comment: "Ultimate, Reaching for the stars!",
155 | author: "Ringo Starry",
156 | date: "2013-12-02T17:57:28.556094Z"
157 | },
158 | {
159 | id: 19,
160 | dishId: 3,
161 | rating: 2,
162 | comment: "It's your birthday, we're gonna party!",
163 | author: "25 Cent",
164 | date: "2011-12-02T17:57:28.556094Z"
165 | }
166 | ];
167 |
--------------------------------------------------------------------------------
/Course3/ReactNative/confusion2/shared/dishes.js:
--------------------------------------------------------------------------------
1 | export const DISHES = [
2 | {
3 | id: 0,
4 | name: "Uthappizza",
5 | image: "images/uthappizza.png",
6 | category: "mains",
7 | label: "Hot",
8 | price: "4.99",
9 | featured: true,
10 | description:
11 | "A unique combination of Indian Uthappam (pancake) and Italian pizza, topped with Cerignola olives, ripe vine cherry tomatoes, Vidalia onion, Guntur chillies and Buffalo Paneer."
12 | },
13 | {
14 | id: 1,
15 | name: "Zucchipakoda",
16 | image: "images/zucchipakoda.png",
17 | category: "appetizer",
18 | label: "",
19 | price: "1.99",
20 | featured: false,
21 | description:
22 | "Deep fried Zucchini coated with mildly spiced Chickpea flour batter accompanied with a sweet-tangy tamarind sauce"
23 | },
24 | {
25 | id: 2,
26 | name: "Vadonut",
27 | image: "images/vadonut.png",
28 | category: "appetizer",
29 | label: "New",
30 | price: "1.99",
31 | featured: false,
32 | description:
33 | "A quintessential ConFusion experience, is it a vada or is it a donut?"
34 | },
35 | {
36 | id: 3,
37 | name: "ElaiCheese Cake",
38 | image: "images/elaicheesecake.png",
39 | category: "dessert",
40 | label: "",
41 | price: "2.99",
42 | featured: false,
43 | description:
44 | "A delectable, semi-sweet New York Style Cheese Cake, with Graham cracker crust and spiced with Indian cardamoms"
45 | }
46 | ];
47 |
--------------------------------------------------------------------------------
/Course3/ReactNative/confusion2/shared/leaders.js:
--------------------------------------------------------------------------------
1 | export const LEADERS = [
2 | {
3 | id: 0,
4 | name: "Peter Pan",
5 | image: "/assets/images/alberto.png",
6 | designation: "Chief Epicurious Officer",
7 | abbr: "CEO",
8 | featured: false,
9 | description:
10 | "Our CEO, Peter, credits his hardworking East Asian immigrant parents who undertook the arduous journey to the shores of America with the intention of giving their children the best future. His mother's wizardy in the kitchen whipping up the tastiest dishes with whatever is available inexpensively at the supermarket, was his first inspiration to create the fusion cuisines for which The Frying Pan became well known. He brings his zeal for fusion cuisines to this restaurant, pioneering cross-cultural culinary connections."
11 | },
12 | {
13 | id: 1,
14 | name: "Dhanasekaran Witherspoon",
15 | image: "/assets/images/alberto.png",
16 | designation: "Chief Food Officer",
17 | abbr: "CFO",
18 | featured: false,
19 | description:
20 | "Our CFO, Danny, as he is affectionately referred to by his colleagues, comes from a long established family tradition in farming and produce. His experiences growing up on a farm in the Australian outback gave him great appreciation for varieties of food sources. As he puts it in his own words, Everything that runs, wins, and everything that stays, pays!"
21 | },
22 | {
23 | id: 2,
24 | name: "Agumbe Tang",
25 | image: "/assets/images/alberto.png",
26 | designation: "Chief Taste Officer",
27 | abbr: "CTO",
28 | featured: false,
29 | description:
30 | "Blessed with the most discerning gustatory sense, Agumbe, our CFO, personally ensures that every dish that we serve meets his exacting tastes. Our chefs dread the tongue lashing that ensues if their dish does not meet his exacting standards. He lives by his motto, You click only if you survive my lick."
31 | },
32 | {
33 | id: 3,
34 | name: "Alberto Somayya",
35 | image: "/assets/images/alberto.png",
36 | designation: "Executive Chef",
37 | abbr: "EC",
38 | featured: true,
39 | description:
40 | "Award winning three-star Michelin chef with wide International experience having worked closely with whos-who in the culinary world, he specializes in creating mouthwatering Indo-Italian fusion experiences. He says, Put together the cuisines from the two craziest cultures, and you get a winning hit! Amma Mia!"
41 | }
42 | ];
43 |
--------------------------------------------------------------------------------
/Course3/ReactNative/confusion2/shared/promotions.js:
--------------------------------------------------------------------------------
1 | export const PROMOTIONS = [
2 | {
3 | id: 0,
4 | name: "Weekend Grand Buffet",
5 | image: "/assets/images/buffet.png",
6 | label: "New",
7 | price: "19.99",
8 | featured: true,
9 | description:
10 | "Featuring mouthwatering combinations with a choice of five different salads, six enticing appetizers, six main entrees and five choicest desserts. Free flowing bubbly and soft drinks. All for just $19.99 per person"
11 | }
12 | ];
13 |
--------------------------------------------------------------------------------
/Course3/json-server/public/images/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course3/json-server/public/images/.DS_Store
--------------------------------------------------------------------------------
/Course3/json-server/public/images/alberto.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course3/json-server/public/images/alberto.png
--------------------------------------------------------------------------------
/Course3/json-server/public/images/buffet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course3/json-server/public/images/buffet.png
--------------------------------------------------------------------------------
/Course3/json-server/public/images/elaicheesecake.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course3/json-server/public/images/elaicheesecake.png
--------------------------------------------------------------------------------
/Course3/json-server/public/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course3/json-server/public/images/logo.png
--------------------------------------------------------------------------------
/Course3/json-server/public/images/uthappizza.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course3/json-server/public/images/uthappizza.png
--------------------------------------------------------------------------------
/Course3/json-server/public/images/vadonut.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course3/json-server/public/images/vadonut.png
--------------------------------------------------------------------------------
/Course3/json-server/public/images/zucchipakoda.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/Course3/json-server/public/images/zucchipakoda.png
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Full_Stack_Web_Development_Course
2 | This repo contains all assignments for Full stack web development course on coursera
3 |
--------------------------------------------------------------------------------
/json-server/public/asset-manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "files": {
3 | "main.css": "/static/css/main.511ac858.chunk.css",
4 | "main.js": "/static/js/main.7bdbf10b.chunk.js",
5 | "main.js.map": "/static/js/main.7bdbf10b.chunk.js.map",
6 | "runtime-main.js": "/static/js/runtime-main.d107bd09.js",
7 | "runtime-main.js.map": "/static/js/runtime-main.d107bd09.js.map",
8 | "static/css/2.55e63a42.chunk.css": "/static/css/2.55e63a42.chunk.css",
9 | "static/js/2.4b91cb1b.chunk.js": "/static/js/2.4b91cb1b.chunk.js",
10 | "static/js/2.4b91cb1b.chunk.js.map": "/static/js/2.4b91cb1b.chunk.js.map",
11 | "index.html": "/index.html",
12 | "precache-manifest.d1eb6378353cd244bd2c324c10e796cc.js": "/precache-manifest.d1eb6378353cd244bd2c324c10e796cc.js",
13 | "service-worker.js": "/service-worker.js",
14 | "static/css/2.55e63a42.chunk.css.map": "/static/css/2.55e63a42.chunk.css.map",
15 | "static/css/main.511ac858.chunk.css.map": "/static/css/main.511ac858.chunk.css.map",
16 | "static/media/font-awesome.css": "/static/media/fontawesome-webfont.fee66e71.woff"
17 | },
18 | "entrypoints": [
19 | "static/js/runtime-main.d107bd09.js",
20 | "static/css/2.55e63a42.chunk.css",
21 | "static/js/2.4b91cb1b.chunk.js",
22 | "static/css/main.511ac858.chunk.css",
23 | "static/js/main.7bdbf10b.chunk.js"
24 | ]
25 | }
--------------------------------------------------------------------------------
/json-server/public/assets/__MACOSX/._images:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/json-server/public/assets/__MACOSX/._images
--------------------------------------------------------------------------------
/json-server/public/assets/__MACOSX/images/._.DS_Store:
--------------------------------------------------------------------------------
1 | Mac OS X 2 F x ATTR x x
--------------------------------------------------------------------------------
/json-server/public/assets/__MACOSX/images/._alberto.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/json-server/public/assets/__MACOSX/images/._alberto.png
--------------------------------------------------------------------------------
/json-server/public/assets/__MACOSX/images/._buffet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/json-server/public/assets/__MACOSX/images/._buffet.png
--------------------------------------------------------------------------------
/json-server/public/assets/__MACOSX/images/._elaicheesecake.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/json-server/public/assets/__MACOSX/images/._elaicheesecake.png
--------------------------------------------------------------------------------
/json-server/public/assets/__MACOSX/images/._logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/json-server/public/assets/__MACOSX/images/._logo.png
--------------------------------------------------------------------------------
/json-server/public/assets/__MACOSX/images/._uthappizza.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/json-server/public/assets/__MACOSX/images/._uthappizza.png
--------------------------------------------------------------------------------
/json-server/public/assets/__MACOSX/images/._vadonut.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/json-server/public/assets/__MACOSX/images/._vadonut.png
--------------------------------------------------------------------------------
/json-server/public/assets/__MACOSX/images/._zucchipakoda.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/json-server/public/assets/__MACOSX/images/._zucchipakoda.png
--------------------------------------------------------------------------------
/json-server/public/assets/images/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/json-server/public/assets/images/.DS_Store
--------------------------------------------------------------------------------
/json-server/public/assets/images/alberto.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/json-server/public/assets/images/alberto.png
--------------------------------------------------------------------------------
/json-server/public/assets/images/buffet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/json-server/public/assets/images/buffet.png
--------------------------------------------------------------------------------
/json-server/public/assets/images/elaicheesecake.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/json-server/public/assets/images/elaicheesecake.png
--------------------------------------------------------------------------------
/json-server/public/assets/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/json-server/public/assets/images/logo.png
--------------------------------------------------------------------------------
/json-server/public/assets/images/uthappizza.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/json-server/public/assets/images/uthappizza.png
--------------------------------------------------------------------------------
/json-server/public/assets/images/vadonut.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/json-server/public/assets/images/vadonut.png
--------------------------------------------------------------------------------
/json-server/public/assets/images/zucchipakoda.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/json-server/public/assets/images/zucchipakoda.png
--------------------------------------------------------------------------------
/json-server/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/json-server/public/favicon.ico
--------------------------------------------------------------------------------
/json-server/public/images/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/json-server/public/images/.DS_Store
--------------------------------------------------------------------------------
/json-server/public/images/alberto.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/json-server/public/images/alberto.png
--------------------------------------------------------------------------------
/json-server/public/images/buffet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/json-server/public/images/buffet.png
--------------------------------------------------------------------------------
/json-server/public/images/elaicheesecake.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/json-server/public/images/elaicheesecake.png
--------------------------------------------------------------------------------
/json-server/public/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/json-server/public/images/logo.png
--------------------------------------------------------------------------------
/json-server/public/images/uthappizza.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/json-server/public/images/uthappizza.png
--------------------------------------------------------------------------------
/json-server/public/images/vadonut.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/json-server/public/images/vadonut.png
--------------------------------------------------------------------------------
/json-server/public/images/zucchipakoda.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/json-server/public/images/zucchipakoda.png
--------------------------------------------------------------------------------
/json-server/public/index.html:
--------------------------------------------------------------------------------
1 | React App You need to enable JavaScript to run this app.
--------------------------------------------------------------------------------
/json-server/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/json-server/public/logo192.png
--------------------------------------------------------------------------------
/json-server/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ashutosh1919/Full_Stack_Web_Development_Course/3a8aeff235f37ddd4785ef1d7cfee0d63ae11e9f/json-server/public/logo512.png
--------------------------------------------------------------------------------
/json-server/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/json-server/public/precache-manifest.d1eb6378353cd244bd2c324c10e796cc.js:
--------------------------------------------------------------------------------
1 | self.__precacheManifest = (self.__precacheManifest || []).concat([
2 | {
3 | "revision": "f588038a6974fb1822ca0729984c0fb1",
4 | "url": "/index.html"
5 | },
6 | {
7 | "revision": "4d5325f1dae6017c9612",
8 | "url": "/static/css/2.55e63a42.chunk.css"
9 | },
10 | {
11 | "revision": "d7ea2ef603dc1be74896",
12 | "url": "/static/css/main.511ac858.chunk.css"
13 | },
14 | {
15 | "revision": "4d5325f1dae6017c9612",
16 | "url": "/static/js/2.4b91cb1b.chunk.js"
17 | },
18 | {
19 | "revision": "d7ea2ef603dc1be74896",
20 | "url": "/static/js/main.7bdbf10b.chunk.js"
21 | },
22 | {
23 | "revision": "b2b58f34cc43f9c7d621",
24 | "url": "/static/js/runtime-main.d107bd09.js"
25 | },
26 | {
27 | "revision": "674f50d287a8c48dc19ba404d20fe713",
28 | "url": "/static/media/fontawesome-webfont.674f50d2.eot"
29 | },
30 | {
31 | "revision": "912ec66d7572ff821749319396470bde",
32 | "url": "/static/media/fontawesome-webfont.912ec66d.svg"
33 | },
34 | {
35 | "revision": "af7ae505a9eed503f8b8e6982036873e",
36 | "url": "/static/media/fontawesome-webfont.af7ae505.woff2"
37 | },
38 | {
39 | "revision": "b06871f281fee6b241d60582ae9369b9",
40 | "url": "/static/media/fontawesome-webfont.b06871f2.ttf"
41 | },
42 | {
43 | "revision": "fee66e712a8a08eef5805a46892932ad",
44 | "url": "/static/media/fontawesome-webfont.fee66e71.woff"
45 | }
46 | ]);
--------------------------------------------------------------------------------
/json-server/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 |
--------------------------------------------------------------------------------
/json-server/public/service-worker.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Welcome to your Workbox-powered service worker!
3 | *
4 | * You'll need to register this file in your web app and you should
5 | * disable HTTP caching for this file too.
6 | * See https://goo.gl/nhQhGp
7 | *
8 | * The rest of the code is auto-generated. Please don't update this file
9 | * directly; instead, make changes to your Workbox build configuration
10 | * and re-run your build process.
11 | * See https://goo.gl/2aRDsh
12 | */
13 |
14 | importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js");
15 |
16 | importScripts(
17 | "/precache-manifest.d1eb6378353cd244bd2c324c10e796cc.js"
18 | );
19 |
20 | self.addEventListener('message', (event) => {
21 | if (event.data && event.data.type === 'SKIP_WAITING') {
22 | self.skipWaiting();
23 | }
24 | });
25 |
26 | workbox.core.clientsClaim();
27 |
28 | /**
29 | * The workboxSW.precacheAndRoute() method efficiently caches and responds to
30 | * requests for URLs in the manifest.
31 | * See https://goo.gl/S9QRab
32 | */
33 | self.__precacheManifest = [].concat(self.__precacheManifest || []);
34 | workbox.precaching.precacheAndRoute(self.__precacheManifest, {});
35 |
36 | workbox.routing.registerNavigationRoute(workbox.precaching.getCacheKeyForURL("/index.html"), {
37 |
38 | blacklist: [/^\/_/,/\/[^\/?]+\.[^\/]+$/],
39 | });
40 |
--------------------------------------------------------------------------------
/json-server/public/static/css/main.511ac858.chunk.css:
--------------------------------------------------------------------------------
1 | body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}.row-header{margin:0 auto;padding:0 auto}.row-content{margin:0 auto;padding:50px 0;border-bottom:1px ridge;min-height:400px}.footer{background-color:#d1c4e9;margin:0 auto;padding:20px 0}.jumbotron{padding:70px 30px;margin:0 auto;background:#9575cd;color:#fffaf0}address{font-size:80%;margin:0;color:#0f0f0f}.navbar-dark{background-color:#512da8}.page-enter{opacity:.01;-webkit-transform:translateX(-100%);transform:translateX(-100%)}.page-enter-active{-webkit-transition:all .3s ease-in;transition:all .3s ease-in}.page-enter-active,.page-exit{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}.page-exit-active{opacity:.01;-webkit-transform:translateX(100%);transform:translateX(100%);-webkit-transition:all .3s ease-out;transition:all .3s ease-out}
2 | /*# sourceMappingURL=main.511ac858.chunk.css.map */
--------------------------------------------------------------------------------
/json-server/public/static/css/main.511ac858.chunk.css.map:
--------------------------------------------------------------------------------
1 | {"version":3,"sources":["index.css","App.css"],"names":[],"mappings":"AAAA,KACE,QAAS,CACT,mIAEY,CACZ,kCAAmC,CACnC,iCACF,CAEA,KACE,uEAEF,CCZA,YACE,aAAgB,CAChB,cACF,CAEA,aACE,aAAgB,CAChB,cAA0B,CAC1B,uBAAwB,CACxB,gBACF,CAEA,QACE,wBAAyB,CACzB,aAAgB,CAChB,cACF,CACA,WACE,iBAA4B,CAC5B,aAAgB,CAChB,kBAAmB,CACnB,aACF,CAEA,QACE,aAAc,CACd,QAAW,CACX,aACF,CAEA,aACE,wBACF,CAEA,YACE,WAAa,CACb,mCAA4B,CAA5B,2BACF,CAEA,mBAGE,kCAA6B,CAA7B,0BACF,CAEA,8BALE,SAAU,CACV,+BAAyB,CAAzB,uBAOF,CAEA,kBACE,WAAa,CACb,kCAA2B,CAA3B,0BAA2B,CAC3B,mCAA8B,CAA9B,2BACF","file":"main.511ac858.chunk.css","sourcesContent":["body {\n margin: 0;\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Roboto\", \"Oxygen\",\n \"Ubuntu\", \"Cantarell\", \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\",\n sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\ncode {\n font-family: source-code-pro, Menlo, Monaco, Consolas, \"Courier New\",\n monospace;\n}\n",".row-header {\r\n margin: 0px auto;\r\n padding: 0px auto;\r\n}\r\n\r\n.row-content {\r\n margin: 0px auto;\r\n padding: 50px 0px 50px 0px;\r\n border-bottom: 1px ridge;\r\n min-height: 400px;\r\n}\r\n\r\n.footer {\r\n background-color: #d1c4e9;\r\n margin: 0px auto;\r\n padding: 20px 0px 20px 0px;\r\n}\r\n.jumbotron {\r\n padding: 70px 30px 70px 30px;\r\n margin: 0px auto;\r\n background: #9575cd;\r\n color: floralwhite;\r\n}\r\n\r\naddress {\r\n font-size: 80%;\r\n margin: 0px;\r\n color: #0f0f0f;\r\n}\r\n\r\n.navbar-dark {\r\n background-color: #512da8;\r\n}\r\n\r\n.page-enter{\r\n opacity: 0.01;\r\n transform: translateX(-100%);\r\n}\r\n\r\n.page-enter-active{\r\n opacity: 1;\r\n transform: translateX(0%);\r\n transition: all 300ms ease-in;\r\n}\r\n\r\n.page-exit{\r\n opacity: 1;\r\n transform: translateX(0%);\r\n}\r\n\r\n.page-exit-active{\r\n opacity: 0.01;\r\n transform: translateX(100%);\r\n transition: all 300ms ease-out;\r\n}"]}
--------------------------------------------------------------------------------
/json-server/public/static/js/runtime-main.d107bd09.js:
--------------------------------------------------------------------------------
1 | !function(e){function r(r){for(var n,f,i=r[0],l=r[1],a=r[2],p=0,s=[];p