From 8e3da563041137aa27a7b5cfe1cc514c0d820d61 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andrea=20Hedstr=C3=B6m?=
Date: Wed, 15 Mar 2023 09:15:48 +0100
Subject: [PATCH 01/21] added components
---
code/package-lock.json | 49 ---------------------------
code/src/App.js | 15 +++++---
code/src/components/Color.js | 0
code/src/components/Favouriteplace.js | 12 +++++++
code/src/components/Food.js | 20 +++++++++++
code/src/components/Name.js | 13 +++++++
code/src/components/Result.js | 0
7 files changed, 56 insertions(+), 53 deletions(-)
create mode 100644 code/src/components/Color.js
create mode 100644 code/src/components/Favouriteplace.js
create mode 100644 code/src/components/Food.js
create mode 100644 code/src/components/Name.js
create mode 100644 code/src/components/Result.js
diff --git a/code/package-lock.json b/code/package-lock.json
index e34d9bb1c..3a317936e 100644
--- a/code/package-lock.json
+++ b/code/package-lock.json
@@ -9,7 +9,6 @@
"version": "1.0.0",
"dependencies": {
"@babel/eslint-parser": "^7.18.9",
- "babel-eslint": "^10.1.0",
"eslint": "^8.21.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-plugin-import": "^2.26.0",
@@ -4637,34 +4636,6 @@
"resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.2.0.tgz",
"integrity": "sha512-Td525n+iPOOyUQIeBfcASuG6uJsDOITl7Mds5gFyerkWiX7qhUTdYUBlSgNMyVqtSJqwpt1kXGLdUt6SykLMRA=="
},
- "node_modules/babel-eslint": {
- "version": "10.1.0",
- "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.1.0.tgz",
- "integrity": "sha512-ifWaTHQ0ce+448CYop8AdrQiBsGrnC+bMgfyKFdi6EsPLTAWG+QfyDeM6OH+FmWnKvEq5NnBMLvlBUPKQZoDSg==",
- "deprecated": "babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.",
- "dependencies": {
- "@babel/code-frame": "^7.0.0",
- "@babel/parser": "^7.7.0",
- "@babel/traverse": "^7.7.0",
- "@babel/types": "^7.7.0",
- "eslint-visitor-keys": "^1.0.0",
- "resolve": "^1.12.0"
- },
- "engines": {
- "node": ">=6"
- },
- "peerDependencies": {
- "eslint": ">= 4.12.1"
- }
- },
- "node_modules/babel-eslint/node_modules/eslint-visitor-keys": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz",
- "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==",
- "engines": {
- "node": ">=4"
- }
- },
"node_modules/babel-jest": {
"version": "27.5.1",
"resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.5.1.tgz",
@@ -20687,26 +20658,6 @@
"resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.2.0.tgz",
"integrity": "sha512-Td525n+iPOOyUQIeBfcASuG6uJsDOITl7Mds5gFyerkWiX7qhUTdYUBlSgNMyVqtSJqwpt1kXGLdUt6SykLMRA=="
},
- "babel-eslint": {
- "version": "10.1.0",
- "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.1.0.tgz",
- "integrity": "sha512-ifWaTHQ0ce+448CYop8AdrQiBsGrnC+bMgfyKFdi6EsPLTAWG+QfyDeM6OH+FmWnKvEq5NnBMLvlBUPKQZoDSg==",
- "requires": {
- "@babel/code-frame": "^7.0.0",
- "@babel/parser": "^7.7.0",
- "@babel/traverse": "^7.7.0",
- "@babel/types": "^7.7.0",
- "eslint-visitor-keys": "^1.0.0",
- "resolve": "^1.12.0"
- },
- "dependencies": {
- "eslint-visitor-keys": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz",
- "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ=="
- }
- }
- },
"babel-jest": {
"version": "27.5.1",
"resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.5.1.tgz",
diff --git a/code/src/App.js b/code/src/App.js
index f2007d229..651c9dde1 100644
--- a/code/src/App.js
+++ b/code/src/App.js
@@ -1,9 +1,16 @@
-import React from 'react';
+import React, { useState } from 'react';
export const App = () => {
+ const [step, setStep] = useState(1);
+
+ const handleStepincrease = () => {
+ setStep(step + 1);
+ }
return (
-
- Find me in src/app.js!
-
+ <>
+
+ Current step: {step}
+ Next
+ >
);
}
diff --git a/code/src/components/Color.js b/code/src/components/Color.js
new file mode 100644
index 000000000..e69de29bb
diff --git a/code/src/components/Favouriteplace.js b/code/src/components/Favouriteplace.js
new file mode 100644
index 000000000..038605558
--- /dev/null
+++ b/code/src/components/Favouriteplace.js
@@ -0,0 +1,12 @@
+import React from 'react';
+
+export const FavouritePlace = ({ favouriteplace, setFavouritePlace }) => {
+ const handleFavouritePlaceChange = (event) => {
+ setFavouritePlaceChange(event.target.value);
+ }
+}
+return (
+ <>
+ Wich place in the world do you wanna be at right now?
+ >
+)
\ No newline at end of file
diff --git a/code/src/components/Food.js b/code/src/components/Food.js
new file mode 100644
index 000000000..5c955b8fd
--- /dev/null
+++ b/code/src/components/Food.js
@@ -0,0 +1,20 @@
+Import React from 'react';
+
+const FoodOption = [
+ 'The biggest cake you ever seen?',
+ 'Buffé with all your favourite food?',
+ 'Fruits and berries in piles?',
+ 'Ice cream that never melt and never ends?',
+];
+
+export const Food = ({ food, setFood }) => {
+ const handleFoodChange = (event) => {
+ setFood(event.target.value);
+ }
+}
+return (
+ <>
+ What do you wanna eat on your party?
+
+ >
+)
\ No newline at end of file
diff --git a/code/src/components/Name.js b/code/src/components/Name.js
new file mode 100644
index 000000000..3b4898dca
--- /dev/null
+++ b/code/src/components/Name.js
@@ -0,0 +1,13 @@
+import React from 'react';
+
+export const Name = ({ name, setName }) =>
+ const handleNameChange = (event) => {
+ setName(event.target.value);
+ }
+ return (
+ <>
+ Crappy day? Lets have a party!
+ What's your name?
+
+ >
+ )
\ No newline at end of file
diff --git a/code/src/components/Result.js b/code/src/components/Result.js
new file mode 100644
index 000000000..e69de29bb
From 27621ca3383b3725b72a5acdbf614a89895258f2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andrea=20Hedstr=C3=B6m?=
Date: Wed, 15 Mar 2023 10:05:37 +0100
Subject: [PATCH 02/21] added functions and buttons
---
code/src/components/Color.js | 0
code/src/components/Confetti.js | 2 ++
code/src/components/Drink.js | 17 +++++++++++++++++
code/src/components/Favouriteplace.js | 1 +
code/src/components/Food.js | 13 ++++++++++++-
code/src/components/Party.js | 15 +++++++++++++++
code/src/components/Result.js | 0
7 files changed, 47 insertions(+), 1 deletion(-)
delete mode 100644 code/src/components/Color.js
create mode 100644 code/src/components/Confetti.js
create mode 100644 code/src/components/Drink.js
create mode 100644 code/src/components/Party.js
delete mode 100644 code/src/components/Result.js
diff --git a/code/src/components/Color.js b/code/src/components/Color.js
deleted file mode 100644
index e69de29bb..000000000
diff --git a/code/src/components/Confetti.js b/code/src/components/Confetti.js
new file mode 100644
index 000000000..968290fa1
--- /dev/null
+++ b/code/src/components/Confetti.js
@@ -0,0 +1,2 @@
+import React from 'react';
+
diff --git a/code/src/components/Drink.js b/code/src/components/Drink.js
new file mode 100644
index 000000000..5eb0c99c8
--- /dev/null
+++ b/code/src/components/Drink.js
@@ -0,0 +1,17 @@
+inport React from 'react';
+
+export const Drink = ({ drink, setDrink }) => {
+ const handleDrinkChange = (event) => {
+ setDrink(event.target.value);
+ }
+}
+return (
+ And what do you wanna drink on this special day?
+
+ Select drink
+ Coffee for sure!
+ Umbrella drinks in rainbow colors!
+ Sparkling soda in a large glas!
+ Smoothie with a straw
+
+)
\ No newline at end of file
diff --git a/code/src/components/Favouriteplace.js b/code/src/components/Favouriteplace.js
index 038605558..6706097a5 100644
--- a/code/src/components/Favouriteplace.js
+++ b/code/src/components/Favouriteplace.js
@@ -8,5 +8,6 @@ export const FavouritePlace = ({ favouriteplace, setFavouritePlace }) => {
return (
<>
Wich place in the world do you wanna be at right now?
+
>
)
\ No newline at end of file
diff --git a/code/src/components/Food.js b/code/src/components/Food.js
index 5c955b8fd..bf4263283 100644
--- a/code/src/components/Food.js
+++ b/code/src/components/Food.js
@@ -15,6 +15,17 @@ export const Food = ({ food, setFood }) => {
return (
<>
What do you wanna eat on your party?
-
+
+ {FoodOption.map((group) => (
+
+
+ {group}
+
+ ))}
+
+
>
)
\ No newline at end of file
diff --git a/code/src/components/Party.js b/code/src/components/Party.js
new file mode 100644
index 000000000..b360eba77
--- /dev/null
+++ b/code/src/components/Party.js
@@ -0,0 +1,15 @@
+Import React from 'react';
+
+export const Party = ({ name, favouriteplace, food, drink }) => {
+ return (
+ <>
+ Crappy days will come and go but right now, imagine that you
+ are at {favouriteplace}, eating {food} and drinking {drink}.
+ Your favouritemusic is on and wherever you are - do a little dance!
+ No one knows that you're having a party RIGHT NOW, for YOU!
+ Need more paryfeelin? Push partybutton!
+
+
+ >
+ )
+}
\ No newline at end of file
diff --git a/code/src/components/Result.js b/code/src/components/Result.js
deleted file mode 100644
index e69de29bb..000000000
From 3e991f85f6414e2369a11a4be47560421f437e1f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andrea=20Hedstr=C3=B6m?=
Date: Wed, 15 Mar 2023 10:20:39 +0100
Subject: [PATCH 03/21] added all steps in App.js
---
code/src/App.js | 37 ++++++++++++++++++++++++++++++++----
code/src/components/Party.js | 2 +-
2 files changed, 34 insertions(+), 5 deletions(-)
diff --git a/code/src/App.js b/code/src/App.js
index 651c9dde1..f184f2383 100644
--- a/code/src/App.js
+++ b/code/src/App.js
@@ -1,16 +1,45 @@
import React, { useState } from 'react';
+import { Name } from 'components/Name';
+import { FavouritePlace } from 'components/Favouriteplace';
+import { Food } from 'components/Food';
+import { Drink } from 'components/Drink';
+import { Party } from 'components/Party';
+
export const App = () => {
const [step, setStep] = useState(1);
+ const [name, setName] = useState('');
+ const [favoruiteplace, setFavouritePlace] = useState('');
+ const [food, setFood] = useState('');
+ const [drink, setDrink] = useState('');
+
- const handleStepincrease = () => {
+ const handleStepIncrease = () => {
setStep(step + 1);
}
return (
<>
-
- Current step: {step}
+ {step === 1 && (
+
+ )}
+ {step === 2 && (
+
+ )}
+ {step === 3 && (
+
+ )}
+ {step === 4 && (
+
+ )}
+ {step >= 5 && (
+
+ )}
+ {step > 5 && (
+ <>
+ Current step: {step}
Next
>
+ )}
+ >
);
-}
+};
diff --git a/code/src/components/Party.js b/code/src/components/Party.js
index b360eba77..f5df2e844 100644
--- a/code/src/components/Party.js
+++ b/code/src/components/Party.js
@@ -11,5 +11,5 @@ export const Party = ({ name, favouriteplace, food, drink }) => {
>
- )
+ );
}
\ No newline at end of file
From 76768a895d3f41a7a3835c318103b8c9255a8741 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andrea=20Hedstr=C3=B6m?=
Date: Wed, 15 Mar 2023 11:10:31 +0100
Subject: [PATCH 04/21] got the structure to work
---
code/src/App.js | 47 +++++++++++++--------------
code/src/components/Drink.js | 38 +++++++++++++---------
code/src/components/Favouriteplace.js | 13 --------
code/src/components/Food.js | 38 +++++++++++-----------
code/src/components/Name.js | 23 ++++++-------
code/src/components/Party.js | 16 ++++-----
code/src/components/Place.js | 13 ++++++++
7 files changed, 98 insertions(+), 90 deletions(-)
delete mode 100644 code/src/components/Favouriteplace.js
create mode 100644 code/src/components/Place.js
diff --git a/code/src/App.js b/code/src/App.js
index f184f2383..1b39dea2b 100644
--- a/code/src/App.js
+++ b/code/src/App.js
@@ -1,7 +1,7 @@
import React, { useState } from 'react';
import { Name } from 'components/Name';
-import { FavouritePlace } from 'components/Favouriteplace';
+import { Place } from 'components/Place';
import { Food } from 'components/Food';
import { Drink } from 'components/Drink';
import { Party } from 'components/Party';
@@ -9,37 +9,36 @@ import { Party } from 'components/Party';
export const App = () => {
const [step, setStep] = useState(1);
const [name, setName] = useState('');
- const [favoruiteplace, setFavouritePlace] = useState('');
+ const [place, setPlace] = useState('');
const [food, setFood] = useState('');
const [drink, setDrink] = useState('');
-
const handleStepIncrease = () => {
setStep(step + 1);
}
return (
<>
- {step === 1 && (
-
- )}
- {step === 2 && (
-
- )}
- {step === 3 && (
-
- )}
- {step === 4 && (
-
- )}
- {step >= 5 && (
-
- )}
- {step > 5 && (
- <>
- Current step: {step}
- Next
- >
- )}
+ {step === 1 && (
+
+ )}
+ {step === 2 && (
+
+ )}
+ {step === 3 && (
+
+ )}
+ {step === 4 && (
+
+ )}
+ {step >= 5 && (
+
+ )}
+ {step < 5 && (
+ <>
+ Current step: {step}
+ Next
+ >
+ )}
>
);
};
diff --git a/code/src/components/Drink.js b/code/src/components/Drink.js
index 5eb0c99c8..d8e65b103 100644
--- a/code/src/components/Drink.js
+++ b/code/src/components/Drink.js
@@ -1,17 +1,25 @@
-inport React from 'react';
+import React from 'react';
export const Drink = ({ drink, setDrink }) => {
- const handleDrinkChange = (event) => {
- setDrink(event.target.value);
- }
-}
-return (
- And what do you wanna drink on this special day?
-
- Select drink
- Coffee for sure!
- Umbrella drinks in rainbow colors!
- Sparkling soda in a large glas!
- Smoothie with a straw
-
-)
\ No newline at end of file
+ const handleDrinkChange = (event) => {
+ setDrink(event.target.value);
+ }
+ return (
+
+
And what do you wanna drink on this special day?
+
+
+ Select drink
+ Coffee for sure!
+ Umbrella drinks in rainbow colors!
+ Sparkling soda in a large glas!
+ Smoothie with a straw
+
+
+
+ )
+}
\ No newline at end of file
diff --git a/code/src/components/Favouriteplace.js b/code/src/components/Favouriteplace.js
deleted file mode 100644
index 6706097a5..000000000
--- a/code/src/components/Favouriteplace.js
+++ /dev/null
@@ -1,13 +0,0 @@
-import React from 'react';
-
-export const FavouritePlace = ({ favouriteplace, setFavouritePlace }) => {
- const handleFavouritePlaceChange = (event) => {
- setFavouritePlaceChange(event.target.value);
- }
-}
-return (
- <>
- Wich place in the world do you wanna be at right now?
-
- >
-)
\ No newline at end of file
diff --git a/code/src/components/Food.js b/code/src/components/Food.js
index bf4263283..3772c0167 100644
--- a/code/src/components/Food.js
+++ b/code/src/components/Food.js
@@ -1,31 +1,31 @@
-Import React from 'react';
+import React from 'react';
const FoodOption = [
- 'The biggest cake you ever seen?',
- 'Buffé with all your favourite food?',
- 'Fruits and berries in piles?',
- 'Ice cream that never melt and never ends?',
+ 'The biggest cake you ever seen?',
+ 'Buffé with all your favourite food?',
+ 'Fruits and berries in piles?',
+ 'Ice cream that never melt and never ends?',
];
export const Food = ({ food, setFood }) => {
- const handleFoodChange = (event) => {
- setFood(event.target.value);
- }
-}
-return (
+ const handleFoodChange = (event) => {
+ setFood(event.target.value);
+ }
+ return (
<>
- What do you wanna eat on your party?
-
+
>
-)
\ No newline at end of file
+ )
+}
diff --git a/code/src/components/Name.js b/code/src/components/Name.js
index 3b4898dca..2d9c53c0b 100644
--- a/code/src/components/Name.js
+++ b/code/src/components/Name.js
@@ -1,13 +1,14 @@
import React from 'react';
-export const Name = ({ name, setName }) =>
- const handleNameChange = (event) => {
- setName(event.target.value);
- }
- return (
- <>
- Crappy day? Lets have a party!
- What's your name?
-
- >
- )
\ No newline at end of file
+export const Name = ({ name, setName }) => {
+ const handleNameChange = (event) => {
+ setName(event.target.value);
+ }
+ return (
+ <>
+ Crappy day? Lets have a party!
+ What's your name?
+
+ >
+ )
+}
\ No newline at end of file
diff --git a/code/src/components/Party.js b/code/src/components/Party.js
index f5df2e844..28f3f81ed 100644
--- a/code/src/components/Party.js
+++ b/code/src/components/Party.js
@@ -1,13 +1,13 @@
-Import React from 'react';
+import React from 'react';
-export const Party = ({ name, favouriteplace, food, drink }) => {
- return (
- <>
- Crappy days will come and go but right now, imagine that you
- are at {favouriteplace}, eating {food} and drinking {drink}.
- Your favouritemusic is on and wherever you are - do a little dance!
+export const Party = ({ name, place, food, drink }) => {
+ return (
+ <>
+
{name}! Crappy days will come and go but for now, imagine that you
+ are at {place}, eating {food} and drinking {drink}.
+ Your favouritemusic is on and wherever you are right now - do a little dance!
No one knows that you're having a party RIGHT NOW, for YOU!
- Need more paryfeelin? Push partybutton!
+ Need more paryfeeling? Push partybutton!
>
diff --git a/code/src/components/Place.js b/code/src/components/Place.js
new file mode 100644
index 000000000..2bfb40024
--- /dev/null
+++ b/code/src/components/Place.js
@@ -0,0 +1,13 @@
+import React from 'react';
+
+export const Place = ({ place, setPlace }) => {
+ const handlePlaceChange = (event) => {
+ setPlaceChange(event.target.value);
+ }
+ return (
+ <>
+ Wich place in the world do you wanna be at right now?
+
+ >
+)
+}
\ No newline at end of file
From 7e6fae33332e38611c0625c99523a4092a7bbfee Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andrea=20Hedstr=C3=B6m?=
Date: Wed, 15 Mar 2023 23:58:00 +0100
Subject: [PATCH 05/21] added CSS
---
code/src/App.js | 18 ++++++++----
code/src/components/Drink.js | 18 ++++++------
code/src/components/Food.js | 4 ++-
code/src/components/Name.js | 9 +++++-
code/src/components/Party.js | 1 +
code/src/components/Place.js | 2 ++
code/src/index.css | 54 ++++++++++++++++++++++++++++++++++++
7 files changed, 90 insertions(+), 16 deletions(-)
diff --git a/code/src/App.js b/code/src/App.js
index 1b39dea2b..856fb1a1d 100644
--- a/code/src/App.js
+++ b/code/src/App.js
@@ -17,7 +17,7 @@ export const App = () => {
setStep(step + 1);
}
return (
- <>
+
{step === 1 && (
)}
@@ -31,14 +31,20 @@ export const App = () => {
)}
{step >= 5 && (
-
- )}
+
+ )}
{step < 5 && (
<>
-
Current step: {step}
-
Next
+
+ NEXT
+
+
+
>
)}
- >
+
+
);
};
diff --git a/code/src/components/Drink.js b/code/src/components/Drink.js
index d8e65b103..c319d46b3 100644
--- a/code/src/components/Drink.js
+++ b/code/src/components/Drink.js
@@ -5,21 +5,23 @@ export const Drink = ({ drink, setDrink }) => {
setDrink(event.target.value);
}
return (
-
+ <>
+
And what do you wanna drink on this special day?
-
+
+
Select drink
- Coffee for sure!
- Umbrella drinks in rainbow colors!
- Sparkling soda in a large glas!
- Smoothie with a straw
+ Coffee for sure!
+ Umbrella drinks in rainbow colors!
+ Sparkling soda in a large glas!
+ Smoothie with a straw
-
+ >
)
}
\ No newline at end of file
diff --git a/code/src/components/Food.js b/code/src/components/Food.js
index 3772c0167..29168eba0 100644
--- a/code/src/components/Food.js
+++ b/code/src/components/Food.js
@@ -13,8 +13,10 @@ export const Food = ({ food, setFood }) => {
}
return (
<>
+
What do you wanna eat on your party?
-
+
+
{FoodOption.map((group) => (
{
}
return (
<>
- Crappy day? Lets have a party!
+
+
Crappy day?
+ Lets throw a party!
+
+
+
+
>
)
}
\ No newline at end of file
diff --git a/code/src/components/Party.js b/code/src/components/Party.js
index 28f3f81ed..5cd771edc 100644
--- a/code/src/components/Party.js
+++ b/code/src/components/Party.js
@@ -9,6 +9,7 @@ export const Party = ({ name, place, food, drink }) => {
No one knows that you're having a party RIGHT NOW, for YOU!
Need more paryfeeling? Push partybutton!
+ PARTYBUTTON
>
);
diff --git a/code/src/components/Place.js b/code/src/components/Place.js
index 2bfb40024..c7e773be3 100644
--- a/code/src/components/Place.js
+++ b/code/src/components/Place.js
@@ -6,7 +6,9 @@ export const Place = ({ place, setPlace }) => {
}
return (
<>
+
Wich place in the world do you wanna be at right now?
+
>
)
diff --git a/code/src/index.css b/code/src/index.css
index 4a1df4db7..980f4e7e6 100644
--- a/code/src/index.css
+++ b/code/src/index.css
@@ -11,3 +11,57 @@ code {
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
monospace;
}
+
+body {
+ background-color: #E87EA1;
+}
+
+.survey-container {
+ display: flex;
+ flex-direction: column;
+ align-self: center;
+ align-items: center;
+ justify-content: center;
+ width: 400px;
+ height: 400px;
+ border-radius: 30px;
+ margin-top: 100px;
+ background-color: rgba(255, 255, 255, 0.158);
+}
+
+.header {
+ color: #fffef3
+
+}
+
+.question {
+ font-size: 20px;
+ color: white;
+}
+
+.step {
+ margin-top: 20px;
+ color: rgb(205, 67, 150);
+}
+
+button {
+ padding: 5px;
+ margin: 10px;
+ border-radius: 10px;
+ border-color: rgb(222, 143, 143);
+ border-style: double;
+ font-size: 15px;
+ color: white;
+ background-color: #ff5858;
+}
+
+input {
+ border-radius: 5px;
+ border-style: none;
+ margin-bottom: 20px;
+}
+
+.foodBtn {
+ display: flex;
+ flex-direction: column;
+}
\ No newline at end of file
From 1e7fb2b4940cb0971d06819a82470c8e712b04a2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andrea=20Hedstr=C3=B6m?=
Date: Thu, 16 Mar 2023 00:46:44 +0100
Subject: [PATCH 06/21] added fontsizes and CSS for mobile-view
---
code/src/components/Food.js | 8 ++++----
code/src/components/Party.js | 14 ++++++++------
code/src/components/Place.js | 2 +-
code/src/index.css | 23 ++++++++++++++---------
4 files changed, 27 insertions(+), 20 deletions(-)
diff --git a/code/src/components/Food.js b/code/src/components/Food.js
index 29168eba0..c95937961 100644
--- a/code/src/components/Food.js
+++ b/code/src/components/Food.js
@@ -1,10 +1,10 @@
import React from 'react';
const FoodOption = [
- 'The biggest cake you ever seen?',
- 'Buffé with all your favourite food?',
- 'Fruits and berries in piles?',
- 'Ice cream that never melt and never ends?',
+ 'The biggest 🎂 you ever seen?',
+ 'Buffé with all your favourite food?🍲',
+ '🍐🍊🥝🍇🍉 in piles?',
+ '🍦 that never melts?',
];
export const Food = ({ food, setFood }) => {
diff --git a/code/src/components/Party.js b/code/src/components/Party.js
index 5cd771edc..8a23e9cd0 100644
--- a/code/src/components/Party.js
+++ b/code/src/components/Party.js
@@ -3,13 +3,15 @@ import React from 'react';
export const Party = ({ name, place, food, drink }) => {
return (
<>
- {name}! Crappy days will come and go but for now, imagine that you
- are at {place}, eating {food} and drinking {drink}.
- Your favouritemusic is on and wherever you are right now - do a little dance!
- No one knows that you're having a party RIGHT NOW, for YOU!
- Need more paryfeeling? Push partybutton!
+
+
{name}!
+
Imagine you are in your favourite place {place}, eating {food} and drinking {drink}. Your favouritemusic is on so do a little dance now! Yes, common!
+
+ It's been a crappy day but you know what? Tomorrow, you get a new change.
+ Lets celebrate that by pushing the magic partybutton!
-
PARTYBUTTON
+
+ MAGIC PARTYBUTTON
>
);
diff --git a/code/src/components/Place.js b/code/src/components/Place.js
index c7e773be3..7a38fd710 100644
--- a/code/src/components/Place.js
+++ b/code/src/components/Place.js
@@ -7,7 +7,7 @@ export const Place = ({ place, setPlace }) => {
return (
<>
-
Wich place in the world do you wanna be at right now?
+
Write a favourite place or somewhere you want to be right now.
>
diff --git a/code/src/index.css b/code/src/index.css
index 980f4e7e6..b03d4888b 100644
--- a/code/src/index.css
+++ b/code/src/index.css
@@ -22,10 +22,11 @@ body {
align-self: center;
align-items: center;
justify-content: center;
- width: 400px;
- height: 400px;
+ width: 100%;
+ height: 450px;
border-radius: 30px;
- margin-top: 100px;
+ margin-top: 80px;
+
background-color: rgba(255, 255, 255, 0.158);
}
@@ -35,8 +36,12 @@ body {
}
.question {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
font-size: 20px;
color: white;
+ padding: 13px;
}
.step {
@@ -47,12 +52,11 @@ body {
button {
padding: 5px;
margin: 10px;
- border-radius: 10px;
- border-color: rgb(222, 143, 143);
- border-style: double;
- font-size: 15px;
- color: white;
- background-color: #ff5858;
+ border-radius: 7px;
+ border-style: none;
+ font-size: 12px;
+ color: rgb(255, 255, 255);
+ background-color: #ac3e62;
}
input {
@@ -64,4 +68,5 @@ input {
.foodBtn {
display: flex;
flex-direction: column;
+ color: white;
}
\ No newline at end of file
From 969ea29b62bf0ee161198d471bcbc93d9fbda4aa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andrea=20Hedstr=C3=B6m?=
Date: Thu, 16 Mar 2023 23:38:14 +0100
Subject: [PATCH 07/21] added confetti.js
---
code/public/index.html | 8 +++-
code/src/App.js | 4 +-
code/src/components/Drink.js | 11 +++---
code/src/components/Food.js | 22 ++++++-----
code/src/components/Name.js | 4 +-
code/src/components/Party.js | 31 ++++++++++++----
code/src/components/Place.js | 4 +-
code/src/index.css | 71 +++++++++++++++++++++++++++++-------
package-lock.json | 17 +++++++++
package.json | 5 +++
10 files changed, 134 insertions(+), 43 deletions(-)
create mode 100644 package-lock.json
create mode 100644 package.json
diff --git a/code/public/index.html b/code/public/index.html
index e6730aa66..2b5a27fc3 100644
--- a/code/public/index.html
+++ b/code/public/index.html
@@ -13,7 +13,13 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
- Technigo React App
+ Party Planner
+
+
+
+
+
+
diff --git a/code/src/App.js b/code/src/App.js
index 856fb1a1d..404b4a153 100644
--- a/code/src/App.js
+++ b/code/src/App.js
@@ -36,10 +36,10 @@ export const App = () => {
{step < 5 && (
<>
- NEXT
+ Next
-
STEP {step}/5
+
STEP {step}/5 TIL' PARTY START!
>
diff --git a/code/src/components/Drink.js b/code/src/components/Drink.js
index c319d46b3..9e9caf1c2 100644
--- a/code/src/components/Drink.js
+++ b/code/src/components/Drink.js
@@ -7,7 +7,8 @@ export const Drink = ({ drink, setDrink }) => {
return (
<>
-
And what do you wanna drink on this special day?
+
Sounds delicious!
+
And something to drink?
{
value={drink}
onChange={handleDrinkChange} >
Select drink
- Coffee for sure!
- Umbrella drinks in rainbow colors!
- Sparkling soda in a large glas!
- Smoothie with a straw
+ Coffee!☕️
+ Tropical drinks!🍹
+ Sparkling soda!🥤
+ Smoothie!🍓
>
diff --git a/code/src/components/Food.js b/code/src/components/Food.js
index c95937961..6c17c4afe 100644
--- a/code/src/components/Food.js
+++ b/code/src/components/Food.js
@@ -1,10 +1,10 @@
import React from 'react';
-const FoodOption = [
- 'The biggest 🎂 you ever seen?',
- 'Buffé with all your favourite food?🍲',
- '🍐🍊🥝🍇🍉 in piles?',
- '🍦 that never melts?',
+const foodOption = [
+ 'the biggest 🎂 you ever seen',
+ 'buffé with all your favourite food🍲',
+ '🍐🍊🥝🍇🍉 in piles',
+ '🍦 that never melts',
];
export const Food = ({ food, setFood }) => {
@@ -14,13 +14,15 @@ export const Food = ({ food, setFood }) => {
return (
<>
-
What do you wanna eat on your party?
+
On this amazing party you prefer to eat...
- {FoodOption.map((group) => (
-
- (
+
+
{group}
diff --git a/code/src/components/Name.js b/code/src/components/Name.js
index 091bf1c14..21a1a132f 100644
--- a/code/src/components/Name.js
+++ b/code/src/components/Name.js
@@ -7,8 +7,8 @@ export const Name = ({ name, setName }) => {
return (
<>
-
Crappy day?
- Lets throw a party!
+ Crappy day?
+ Lets throw a party!
What's your name?
diff --git a/code/src/components/Party.js b/code/src/components/Party.js
index 8a23e9cd0..c5c5c2808 100644
--- a/code/src/components/Party.js
+++ b/code/src/components/Party.js
@@ -1,18 +1,33 @@
import React from 'react';
+import JSConfetti from 'js-confetti';
+
+const jsConfetti = new JSConfetti();
export const Party = ({ name, place, food, drink }) => {
return (
<>
-
-
{name}!
-
Imagine you are in your favourite place {place}, eating {food} and drinking {drink}. Your favouritemusic is on so do a little dance now! Yes, common!
+
+
{name}
+
+
+
🌪! Now imagine you are in your favourite place {place}
+
eating {food} and drinking {drink}.
+
Your favourite music is on and we're having a party just for YOU!
- It's been a crappy day but you know what? Tomorrow, you get a new change.
+ I know, it's been a crappy day but tomorrow - You get a new change!
Lets celebrate that by pushing the magic partybutton!
-
MAGIC PARTYBUTTON
-
- >
+
+
+ {(jsConfetti.addConfetti({
+ confettiRadius: 8,
+ confettiNumber: 500,
+ confettiColors:[
+ '#ff0a54', '#efe378', '#ff7096', '#ff85a1', '#fbb1bd', '#78cfef',
+ ],
+ }))}}>MAGIC PARTYBUTTON
+
+ >
);
-}
\ No newline at end of file
+};
\ No newline at end of file
diff --git a/code/src/components/Place.js b/code/src/components/Place.js
index 7a38fd710..38bc91bdb 100644
--- a/code/src/components/Place.js
+++ b/code/src/components/Place.js
@@ -2,14 +2,16 @@ import React from 'react';
export const Place = ({ place, setPlace }) => {
const handlePlaceChange = (event) => {
- setPlaceChange(event.target.value);
+ setPlace(event.target.value);
}
return (
<>
Write a favourite place or somewhere you want to be right now.
+
+
>
)
}
\ No newline at end of file
diff --git a/code/src/index.css b/code/src/index.css
index b03d4888b..91e679678 100644
--- a/code/src/index.css
+++ b/code/src/index.css
@@ -13,7 +13,7 @@ code {
}
body {
- background-color: #E87EA1;
+ background-color: #f784b6;
}
.survey-container {
@@ -26,47 +26,90 @@ body {
height: 450px;
border-radius: 30px;
margin-top: 80px;
-
- background-color: rgba(255, 255, 255, 0.158);
+
}
.header {
- color: #fffef3
+ font-family: 'Roboto' sans-serif;
+ color: #fffef3;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ margin: 2px;
+
+}
+.header span {
+ color: white;
+ font-family: 'Pacifico', cursive;
+ text-shadow: 1px 1px 2px rgb(219, 77, 241), 0 0 25px rgb(138, 138, 205), 0 0 5px rgb(216, 152, 206);
+
}
.question {
display: flex;
flex-direction: column;
align-items: center;
- font-size: 20px;
+ margin-left: 30px;
+ margin-right: 30px;
+ font-size: 23px;
color: white;
+ font-family: 'Roboto' sans-serif;
padding: 13px;
}
.step {
margin-top: 20px;
- color: rgb(205, 67, 150);
+ color: rgb(255, 255, 255);
+ font-family: 'Roboto' sans-serif;
+ font-weight: bold;
}
-button {
- padding: 5px;
+.step-btn button {
+ padding: 5px 12px 5px 12px;
margin: 10px;
- border-radius: 7px;
- border-style: none;
- font-size: 12px;
+ border-radius: 8px;;
+ border-color: #ffffff;
+ font-size: 20px;
+ font-family: 'Roboto' sans-serif;
color: rgb(255, 255, 255);
- background-color: #ac3e62;
+ background-color: #c86181;
}
-input {
+.step-btn button:hover {
+ color: #f784b6;
+ background: #f784b6;
+}
+
+.answer-input input {
border-radius: 5px;
+ width: 180px;
+ height: 30px;
border-style: none;
margin-bottom: 20px;
+ font-size: 23px;
}
.foodBtn {
display: flex;
flex-direction: column;
- color: white;
+ color: #ffffff;
+ font-size: 20px;
+}
+
+.select {
+ font-size: 18px;
+}
+
+.party-btn button {
+ padding: 8px;
+ font-family: 'Roboto' sans-serif;
+ border-color: #ffffff;
+ border-style: double;
+ border-radius: 10px;
+ font-size: 18px;
+ color: rgb(255, 255, 255);
+ background-color: #c86181;
+
+
}
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
new file mode 100644
index 000000000..12f37a296
--- /dev/null
+++ b/package-lock.json
@@ -0,0 +1,17 @@
+{
+ "name": "project-survey",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "": {
+ "dependencies": {
+ "js-confetti": "^0.11.0"
+ }
+ },
+ "node_modules/js-confetti": {
+ "version": "0.11.0",
+ "resolved": "https://registry.npmjs.org/js-confetti/-/js-confetti-0.11.0.tgz",
+ "integrity": "sha512-Hc7I3VI4r4H0nq5q/oQK+JJwGoYRYVHK72fGk8E9Ay1dbh+aiZ9yl0yFp1K4oYeq7YFDQAndYChwqLPA3QWQuA=="
+ }
+ }
+}
diff --git a/package.json b/package.json
new file mode 100644
index 000000000..535b44ce2
--- /dev/null
+++ b/package.json
@@ -0,0 +1,5 @@
+{
+ "dependencies": {
+ "js-confetti": "^0.11.0"
+ }
+}
From 2cd6fea05c4fed7f3095c19ed87ff7b5a9d0a0c6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andrea=20Hedstr=C3=B6m?=
Date: Fri, 17 Mar 2023 00:00:57 +0100
Subject: [PATCH 08/21] added styling
---
code/src/components/Drink.js | 2 +-
code/src/index.css | 13 ++++++++-----
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/code/src/components/Drink.js b/code/src/components/Drink.js
index 9e9caf1c2..487c4719d 100644
--- a/code/src/components/Drink.js
+++ b/code/src/components/Drink.js
@@ -16,7 +16,7 @@ export const Drink = ({ drink, setDrink }) => {
id="drink"
value={drink}
onChange={handleDrinkChange} >
- Select drink
+ Menu
Coffee!☕️
Tropical drinks!🍹
Sparkling soda!🥤
diff --git a/code/src/index.css b/code/src/index.css
index 91e679678..bc3c7c2da 100644
--- a/code/src/index.css
+++ b/code/src/index.css
@@ -69,7 +69,7 @@ body {
padding: 5px 12px 5px 12px;
margin: 10px;
border-radius: 8px;;
- border-color: #ffffff;
+ border-style: none;
font-size: 20px;
font-family: 'Roboto' sans-serif;
color: rgb(255, 255, 255);
@@ -77,8 +77,8 @@ body {
}
.step-btn button:hover {
- color: #f784b6;
- background: #f784b6;
+ color: #ffffff;
+ background: #f8a659;
}
.answer-input input {
@@ -99,13 +99,16 @@ body {
.select {
font-size: 18px;
+ background-color: #f3c7d6;
+ padding: 5px;
+ border-radius: 10px;
+ border-color: none;
}
.party-btn button {
padding: 8px;
font-family: 'Roboto' sans-serif;
- border-color: #ffffff;
- border-style: double;
+ border-style: none;
border-radius: 10px;
font-size: 18px;
color: rgb(255, 255, 255);
From ba5ca04a3b73e35ee3999f018e0e0de950dc05b2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andrea=20Hedstr=C3=B6m?=
Date: Fri, 17 Mar 2023 00:13:29 +0100
Subject: [PATCH 09/21] added box-shadow for buttons
---
code/src/index.css | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/code/src/index.css b/code/src/index.css
index bc3c7c2da..0dea2d1b2 100644
--- a/code/src/index.css
+++ b/code/src/index.css
@@ -77,8 +77,8 @@ body {
}
.step-btn button:hover {
- color: #ffffff;
- background: #f8a659;
+ background: #cb3978;
+ box-shadow: 1px 1px 2px rgb(255, 173, 209), 0 0 25px rgb(255, 255, 255), 0 0 5px rgb(255, 62, 226);
}
.answer-input input {
@@ -112,7 +112,10 @@ body {
border-radius: 10px;
font-size: 18px;
color: rgb(255, 255, 255);
- background-color: #c86181;
-
+ background-color: #fc5a88;
+}
+.party-btn button:hover {
+ background: #cb3978;
+ box-shadow: 1px 1px 2px rgb(255, 173, 209), 0 0 25px rgb(246, 237, 243), 0 0 5px rgb(255, 62, 226);
}
\ No newline at end of file
From 2819f5547568b6a185c1198c7db777f439ec89cd Mon Sep 17 00:00:00 2001
From: Andrea
Date: Sun, 19 Mar 2023 01:08:49 +0100
Subject: [PATCH 10/21] added background-img
---
code/public/index.html | 13 +++---
code/src/App.js | 8 ++--
code/src/components/Confetti.js | 2 -
code/src/components/Drink.js | 12 +++---
code/src/components/Food.js | 10 ++---
code/src/components/Name.js | 4 +-
code/src/components/Party.js | 11 +++--
code/src/components/Place.js | 2 +-
code/src/components/glitter.png | Bin 0 -> 42310 bytes
code/src/index.css | 74 +++++++++++++++++++++++++-------
10 files changed, 91 insertions(+), 45 deletions(-)
delete mode 100644 code/src/components/Confetti.js
create mode 100644 code/src/components/glitter.png
diff --git a/code/public/index.html b/code/public/index.html
index 2b5a27fc3..4ec1773ed 100644
--- a/code/public/index.html
+++ b/code/public/index.html
@@ -14,17 +14,20 @@
Learn how to configure a non-root public URL by running `npm run build`.
-->
Party Planner
+
-
-
-
-
-
+
+
+
+
+
+
You need to enable JavaScript to run this app.
+