From 29b5ace0b213011d50188617cadab16fb98dec06 Mon Sep 17 00:00:00 2001
From: Annaselvine <120709649+AnnaElvine@users.noreply.github.com>
Date: Wed, 15 Mar 2023 12:04:57 +0100
Subject: [PATCH 01/20] testing
---
code/package-lock.json | 49 -----------------------------------
code/src/App.js | 44 ++++++++++++++++++++++++++++---
code/src/components/Drink.js | 13 ++++++++++
code/src/components/Food.js | 35 +++++++++++++++++++++++++
code/src/components/Name.js | 14 ++++++++++
code/src/components/Result.js | 12 +++++++++
package-lock.json | 6 +++++
7 files changed, 120 insertions(+), 53 deletions(-)
create mode 100644 code/src/components/Drink.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
create mode 100644 package-lock.json
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..99db7864c 100644
--- a/code/src/App.js
+++ b/code/src/App.js
@@ -1,9 +1,45 @@
-import React from 'react';
+import React, { useState } from 'react';
+import { Name } from 'components/Name';
+import { Food } from 'components/Food';
+import { Drink } from 'components/Drink';
+import { Result } from 'components/Result';
+
+/* mothership (parent) COMPONENT ? */
export const App = () => {
+ /* Is this VARIBLES ? */
+ const [step, setStep] = useState(1);
+ const [name, setName] = useState(2);
+ const [food, setFood] = useState(3);
+ const [drink, setDrink] = useState(4);
+ /* FUNCTION */
+ const handleStepIncrease = () => {
+ /* Is this also a varible? */
+ setStep(step + 1);
+ }
+
return (
-
- Find me in src/app.js!
-
+ <>
+ {step === 1 && (
+
+ )}
+ {step === 2 && (
+
+ )}
+ {step === 3 && (
+
+ )}
+ {step >= 4 && (
+
+ )}
+
+ {step < 4 && (
+ <>
+ Current step: {step}
+ Next step
+ >
+ )}
+ >
);
}
+
diff --git a/code/src/components/Drink.js b/code/src/components/Drink.js
new file mode 100644
index 000000000..5ab372bb6
--- /dev/null
+++ b/code/src/components/Drink.js
@@ -0,0 +1,13 @@
+import React from 'react'
+
+export const Drink = ({ drink, setDrink }) => {
+ const handleDrinkChange = (event) => {
+ setDrink(event.target.value);
+ }
+ return (
+ <>
+ What is your fave drink
+
+ >
+ );
+}
diff --git a/code/src/components/Food.js b/code/src/components/Food.js
new file mode 100644
index 000000000..45d72cae5
--- /dev/null
+++ b/code/src/components/Food.js
@@ -0,0 +1,35 @@
+import React from 'react'
+
+/* a food component? food is the PROPS? */
+export const Food = ({ food, setFood }) => {
+/* a function? */
+/* Anna, don´t forget to put a ( after return and a ) to close */
+ const handleFoodChange = (event) => {
+ /* is this a varible? */
+ setFood(event.target.value);
+ }
+ return (
+ <>
+ What is your fave food?
+
+ >
+ );
+}
+
+/* what is object destructuring? */
+/* when do I use the { } ? */
+/* why is the { } in the food component? */
+/* is the type=TEXT the event? */
+/* value and onChange is connecting what? app.js? */
+/* what does return do? */
+/* what does the statehook do? */
+/* what is use state? */
+/* does the parent component always has to be in App.js? */
+/* what is the App.js file? why is it like the mothership of all js.files? */
+/* import { Name } from 'components/Name'; why do I need { crumelurs } here in the import? */
+
+/* {step === 1 && (
+
+ )} */
+/* what does the === mean? why Name name={name} and setName{setName} <-- Is setName a function
+that allaows the user to enter different names? Ex Anna? Jonas? Kalle? */
diff --git a/code/src/components/Name.js b/code/src/components/Name.js
new file mode 100644
index 000000000..8ba1f8741
--- /dev/null
+++ b/code/src/components/Name.js
@@ -0,0 +1,14 @@
+import React from 'react';
+
+/* is this a child component? (name component) to the parent in app.js? ? */
+export const Name = ({ name, setName }) => {
+ const handleNameChange = (event) => {
+ setName(event.target.value);
+ }
+ return (
+ <>
+ What is 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..0a707a34c
--- /dev/null
+++ b/code/src/components/Result.js
@@ -0,0 +1,12 @@
+import React from 'react';
+
+export const Result = ({ name, food, drink }) => {
+ return (
+ <>
+ Your name is {name}!
+ Your favourite food is {food}, yummi!😋
+ Your favourite drink is {drink}!
+ >
+ );
+}
+
diff --git a/package-lock.json b/package-lock.json
new file mode 100644
index 000000000..4a12561e3
--- /dev/null
+++ b/package-lock.json
@@ -0,0 +1,6 @@
+{
+ "name": "project-survey",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {}
+}
From 88c90082d6e3f76b1bd1dcf122b49df9265b230c Mon Sep 17 00:00:00 2001
From: Annaselvine <120709649+AnnaElvine@users.noreply.github.com>
Date: Wed, 15 Mar 2023 18:13:31 +0100
Subject: [PATCH 02/20] .
---
code/src/App.js | 9 +++++----
code/src/components/Drink.js | 22 +++++++++++++++++++++-
code/src/components/Food.js | 6 +++---
code/src/components/Radiobutton.js | 17 +++++++++++++++++
code/src/components/Result.js | 6 +++---
5 files changed, 49 insertions(+), 11 deletions(-)
create mode 100644 code/src/components/Radiobutton.js
diff --git a/code/src/App.js b/code/src/App.js
index 99db7864c..1ee1d7452 100644
--- a/code/src/App.js
+++ b/code/src/App.js
@@ -4,14 +4,15 @@ import { Name } from 'components/Name';
import { Food } from 'components/Food';
import { Drink } from 'components/Drink';
import { Result } from 'components/Result';
+import { RadioButton } from 'components/Radiobutton';
/* mothership (parent) COMPONENT ? */
export const App = () => {
/* Is this VARIBLES ? */
const [step, setStep] = useState(1);
- const [name, setName] = useState(2);
- const [food, setFood] = useState(3);
- const [drink, setDrink] = useState(4);
+ const [name, setName] = useState();
+ const [food, setFood] = useState();
+ const [drink, setDrink] = useState();
/* FUNCTION */
const handleStepIncrease = () => {
/* Is this also a varible? */
@@ -21,7 +22,7 @@ export const App = () => {
return (
<>
{step === 1 && (
-
+ /* alla the name.js codestuff is in NAME */
)}
{step === 2 && (
diff --git a/code/src/components/Drink.js b/code/src/components/Drink.js
index 5ab372bb6..ae5fec16a 100644
--- a/code/src/components/Drink.js
+++ b/code/src/components/Drink.js
@@ -1,13 +1,33 @@
import React from 'react'
+import { RadioButton } from './Radiobutton';
export const Drink = ({ drink, setDrink }) => {
const handleDrinkChange = (event) => {
setDrink(event.target.value);
}
+
return (
<>
- What is your fave drink
+ What is your fave drink?
+
+
+
+
>
);
}
+
+/* What is your fave drink?
+
+ Coffee
+
+
+
+
+ Tea
+
+
+
+ Water
+ */
\ No newline at end of file
diff --git a/code/src/components/Food.js b/code/src/components/Food.js
index 45d72cae5..61e5db4e3 100644
--- a/code/src/components/Food.js
+++ b/code/src/components/Food.js
@@ -1,8 +1,8 @@
import React from 'react'
-/* a food component? food is the PROPS? */
+/* a food component - food is the PROPS! */
export const Food = ({ food, setFood }) => {
-/* a function? */
+/* a function inside a component */
/* Anna, don´t forget to put a ( after return and a ) to close */
const handleFoodChange = (event) => {
/* is this a varible? */
@@ -16,7 +16,7 @@ export const Food = ({ food, setFood }) => {
);
}
-/* what is object destructuring? */
+/* what is object destructuring? (food and setFood) */
/* when do I use the { } ? */
/* why is the { } in the food component? */
/* is the type=TEXT the event? */
diff --git a/code/src/components/Radiobutton.js b/code/src/components/Radiobutton.js
new file mode 100644
index 000000000..2d0766e11
--- /dev/null
+++ b/code/src/components/Radiobutton.js
@@ -0,0 +1,17 @@
+import React from 'react'
+
+/* radio button component */
+/* export,const,food = decloration */
+/* = other side is argument */
+export const RadioButton = () => {
+ return (
+
+ {/* // eslint-disable-next-line jsx-a11y/label-has-associated-control */}
+ Some text here
+
+
+
+
+ );
+};
+/* export default RadioButton; */
\ No newline at end of file
diff --git a/code/src/components/Result.js b/code/src/components/Result.js
index 0a707a34c..2373fb541 100644
--- a/code/src/components/Result.js
+++ b/code/src/components/Result.js
@@ -3,9 +3,9 @@ import React from 'react';
export const Result = ({ name, food, drink }) => {
return (
<>
- Your name is {name}!
- Your favourite food is {food}, yummi!😋
- Your favourite drink is {drink}!
+ Your name is {name}! 💗
+ Your favourite food is 🌮{food}, yummi!😋
+ Your favourite drink is {drink}, 🍸 delich!
>
);
}
From f434760120987417ec3d369c26fa053926479b4a Mon Sep 17 00:00:00 2001
From: Annaselvine <120709649+AnnaElvine@users.noreply.github.com>
Date: Fri, 17 Mar 2023 11:35:36 +0100
Subject: [PATCH 03/20] a
---
code/src/App.js | 20 ++++++++----------
code/src/components/Drink.js | 33 ------------------------------
code/src/components/Food.js | 3 +--
code/src/components/Name.js | 17 ++++++++-------
code/src/components/Radiobutton.js | 17 ---------------
code/src/components/Result.js | 6 +++---
code/src/components/ZodiacSign.js | 29 ++++++++++++++++++++++++++
code/src/index.css | 1 +
8 files changed, 53 insertions(+), 73 deletions(-)
delete mode 100644 code/src/components/Drink.js
create mode 100644 code/src/components/ZodiacSign.js
diff --git a/code/src/App.js b/code/src/App.js
index 1ee1d7452..55b7248bd 100644
--- a/code/src/App.js
+++ b/code/src/App.js
@@ -2,20 +2,18 @@ import React, { useState } from 'react';
import { Name } from 'components/Name';
import { Food } from 'components/Food';
-import { Drink } from 'components/Drink';
+import { ZodiacSign } from 'components/ZodiacSign';
import { Result } from 'components/Result';
-import { RadioButton } from 'components/Radiobutton';
+/* import { RadioButton } from 'components/Radiobutton'; */
-/* mothership (parent) COMPONENT ? */
export const App = () => {
/* Is this VARIBLES ? */
const [step, setStep] = useState(1);
const [name, setName] = useState();
const [food, setFood] = useState();
- const [drink, setDrink] = useState();
- /* FUNCTION */
+ const [sign, setSign] = useState();
+
const handleStepIncrease = () => {
- /* Is this also a varible? */
setStep(step + 1);
}
@@ -25,22 +23,22 @@ export const App = () => {
/* alla the name.js codestuff is in NAME */
)}
{step === 2 && (
-
+
)}
{step === 3 && (
-
+
)}
{step >= 4 && (
-
+
)}
{step < 4 && (
<>
- Current step: {step}
+ hej {step}
Next step
>
)}
>
);
}
-
+/* current step hanterar nästa steg knappen */
diff --git a/code/src/components/Drink.js b/code/src/components/Drink.js
deleted file mode 100644
index ae5fec16a..000000000
--- a/code/src/components/Drink.js
+++ /dev/null
@@ -1,33 +0,0 @@
-import React from 'react'
-import { RadioButton } from './Radiobutton';
-
-export const Drink = ({ drink, setDrink }) => {
- const handleDrinkChange = (event) => {
- setDrink(event.target.value);
- }
-
- return (
- <>
- What is your fave drink?
-
-
-
-
-
- >
- );
-}
-
-/* What is your fave drink?
-
- Coffee
-
-
-
-
- Tea
-
-
-
- Water
- */
\ No newline at end of file
diff --git a/code/src/components/Food.js b/code/src/components/Food.js
index 61e5db4e3..9aefddca2 100644
--- a/code/src/components/Food.js
+++ b/code/src/components/Food.js
@@ -3,14 +3,13 @@ import React from 'react'
/* a food component - food is the PROPS! */
export const Food = ({ food, setFood }) => {
/* a function inside a component */
-/* Anna, don´t forget to put a ( after return and a ) to close */
const handleFoodChange = (event) => {
/* is this a varible? */
setFood(event.target.value);
}
return (
<>
- What is your fave food?
+ What kind of food do you like?
>
);
diff --git a/code/src/components/Name.js b/code/src/components/Name.js
index 8ba1f8741..4fd43e504 100644
--- a/code/src/components/Name.js
+++ b/code/src/components/Name.js
@@ -1,14 +1,17 @@
import React from 'react';
-/* is this a child component? (name component) to the parent in app.js? ? */
export const Name = ({ name, setName }) => {
const handleNameChange = (event) => {
setName(event.target.value);
}
return (
- <>
- What is your name?
-
- >
- );
-}
\ No newline at end of file
+ //
+
+
bla bla bla
+
+ Hello there, whats your name?
+
+
+
)
+}
+/* NR 1 */
\ No newline at end of file
diff --git a/code/src/components/Radiobutton.js b/code/src/components/Radiobutton.js
index 2d0766e11..e69de29bb 100644
--- a/code/src/components/Radiobutton.js
+++ b/code/src/components/Radiobutton.js
@@ -1,17 +0,0 @@
-import React from 'react'
-
-/* radio button component */
-/* export,const,food = decloration */
-/* = other side is argument */
-export const RadioButton = () => {
- return (
-
- {/* // eslint-disable-next-line jsx-a11y/label-has-associated-control */}
- Some text here
-
-
-
-
- );
-};
-/* export default RadioButton; */
\ No newline at end of file
diff --git a/code/src/components/Result.js b/code/src/components/Result.js
index 2373fb541..1cb745cb7 100644
--- a/code/src/components/Result.js
+++ b/code/src/components/Result.js
@@ -1,11 +1,11 @@
import React from 'react';
-export const Result = ({ name, food, drink }) => {
+export const Result = ({ name, food, sign }) => {
return (
<>
Your name is {name}! 💗
-
Your favourite food is 🌮{food}, yummi!😋
-
Your favourite drink is {drink}, 🍸 delich!
+
You are a {sign}
+
You like {food}, Yummi!
>
);
}
diff --git a/code/src/components/ZodiacSign.js b/code/src/components/ZodiacSign.js
new file mode 100644
index 000000000..e3d01cd39
--- /dev/null
+++ b/code/src/components/ZodiacSign.js
@@ -0,0 +1,29 @@
+import React from 'react'
+
+export const ZodiacSign = ({ sign, setSign }) => {
+ const handleZodiacSignChange = (event) => {
+ setSign(event.target.value);
+ }
+
+ const zodiacSigns = [
+ 'Aries', 'Taurus', 'Gemini', 'Cancer', 'Leo', 'Virgo',
+ 'Libra', 'Scorpio', 'Sagittarius', 'Capricorn', 'Aquarius', 'Pisces'
+ ];
+ return (
+
+
Select your Zodiac Sign:
+
+ {sign && (
+
You have selected {sign} as your Zodiac Sign.
+ )}
+
+ );
+}
+/* NR 2 */
\ No newline at end of file
diff --git a/code/src/index.css b/code/src/index.css
index 4a1df4db7..ae78cf2c8 100644
--- a/code/src/index.css
+++ b/code/src/index.css
@@ -5,6 +5,7 @@ body {
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
+ background-color: rgb(130, 176, 143);
}
code {
From d025a7d8bc403cd0f61861113fced1eaa59b8902 Mon Sep 17 00:00:00 2001
From: Annaselvine <120709649+AnnaElvine@users.noreply.github.com>
Date: Fri, 17 Mar 2023 13:53:53 +0100
Subject: [PATCH 04/20] .
---
code/src/App.js | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/code/src/App.js b/code/src/App.js
index 55b7248bd..d1afe14ad 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 { Food } from 'components/Food';
+import { Kitty } from 'components/Kitty';
import { ZodiacSign } from 'components/ZodiacSign';
import { Result } from 'components/Result';
/* import { RadioButton } from 'components/Radiobutton'; */
@@ -10,8 +10,8 @@ export const App = () => {
/* Is this VARIBLES ? */
const [step, setStep] = useState(1);
const [name, setName] = useState();
- const [food, setFood] = useState();
const [sign, setSign] = useState();
+ const [signmeeter, setSignmeeter] = useState(5);
const handleStepIncrease = () => {
setStep(step + 1);
@@ -26,10 +26,10 @@ export const App = () => {
)}
{step === 3 && (
-
+
)}
{step >= 4 && (
-
+
)}
{step < 4 && (
From 3dd4d48b4361db3527e1756ccf6e9dadd77a8c8b Mon Sep 17 00:00:00 2001
From: Annaselvine <120709649+AnnaElvine@users.noreply.github.com>
Date: Fri, 17 Mar 2023 16:15:33 +0100
Subject: [PATCH 05/20] did some stuff
---
code/src/App.js | 17 +++++----
code/src/components/Food.js | 34 ------------------
code/src/components/Kitty.js | 22 ++++++++++++
code/src/components/Name.js | 7 ++--
code/src/components/Radiobutton.js | 0
code/src/components/Result.js | 5 +--
code/src/components/Selector.js | 30 ++++++++++++++++
code/src/components/ZodiacSign.js | 10 +++---
code/src/index.css | 58 ++++++++++++++++++++++++++----
9 files changed, 128 insertions(+), 55 deletions(-)
delete mode 100644 code/src/components/Food.js
create mode 100644 code/src/components/Kitty.js
delete mode 100644 code/src/components/Radiobutton.js
create mode 100644 code/src/components/Selector.js
diff --git a/code/src/App.js b/code/src/App.js
index d1afe14ad..78dbfad0f 100644
--- a/code/src/App.js
+++ b/code/src/App.js
@@ -4,6 +4,7 @@ import { Name } from 'components/Name';
import { Kitty } from 'components/Kitty';
import { ZodiacSign } from 'components/ZodiacSign';
import { Result } from 'components/Result';
+import { Selector } from 'components/Selector'
/* import { RadioButton } from 'components/Radiobutton'; */
export const App = () => {
@@ -12,6 +13,7 @@ export const App = () => {
const [name, setName] = useState();
const [sign, setSign] = useState();
const [signmeeter, setSignmeeter] = useState(5);
+ const [selector, setSelector] = useState();
const handleStepIncrease = () => {
setStep(step + 1);
@@ -28,15 +30,18 @@ export const App = () => {
{step === 3 && (
)}
- {step >= 4 && (
+ {step === 4 && (
+
+ )}
+ {step >= 5 && (
)}
- {step < 4 && (
- <>
-
hej {step}
-
Next step
- >
+ {step < 5 && (
+
)}
>
);
diff --git a/code/src/components/Food.js b/code/src/components/Food.js
deleted file mode 100644
index 9aefddca2..000000000
--- a/code/src/components/Food.js
+++ /dev/null
@@ -1,34 +0,0 @@
-import React from 'react'
-
-/* a food component - food is the PROPS! */
-export const Food = ({ food, setFood }) => {
-/* a function inside a component */
- const handleFoodChange = (event) => {
- /* is this a varible? */
- setFood(event.target.value);
- }
- return (
- <>
-
What kind of food do you like?
-
- >
- );
-}
-
-/* what is object destructuring? (food and setFood) */
-/* when do I use the { } ? */
-/* why is the { } in the food component? */
-/* is the type=TEXT the event? */
-/* value and onChange is connecting what? app.js? */
-/* what does return do? */
-/* what does the statehook do? */
-/* what is use state? */
-/* does the parent component always has to be in App.js? */
-/* what is the App.js file? why is it like the mothership of all js.files? */
-/* import { Name } from 'components/Name'; why do I need { crumelurs } here in the import? */
-
-/* {step === 1 && (
-
- )} */
-/* what does the === mean? why Name name={name} and setName{setName} <-- Is setName a function
-that allaows the user to enter different names? Ex Anna? Jonas? Kalle? */
diff --git a/code/src/components/Kitty.js b/code/src/components/Kitty.js
new file mode 100644
index 000000000..c6eade803
--- /dev/null
+++ b/code/src/components/Kitty.js
@@ -0,0 +1,22 @@
+import React from 'react'
+
+export const Kitty = ({ milk, signmeeter, setSignmeeter }) => {
+ const handleSignMeeter = (event) => {
+ setSignmeeter(event.target.value);
+ }
+ return (
+
+
How much of a {milk} are you?
+
+
+
+
+
+ {milk && (
+
That much {milk} huh?
+ )}
+
+ );
+}
+
+/* NR 3 */
\ No newline at end of file
diff --git a/code/src/components/Name.js b/code/src/components/Name.js
index 4fd43e504..0ac097cb4 100644
--- a/code/src/components/Name.js
+++ b/code/src/components/Name.js
@@ -7,11 +7,12 @@ export const Name = ({ name, setName }) => {
return (
//
-
bla bla bla
+
Welcome to this Astro survey
- Hello there, whats your name?
+ First of all, what´s your name?
-
)
+
+ )
}
/* NR 1 */
\ No newline at end of file
diff --git a/code/src/components/Radiobutton.js b/code/src/components/Radiobutton.js
deleted file mode 100644
index e69de29bb..000000000
diff --git a/code/src/components/Result.js b/code/src/components/Result.js
index 1cb745cb7..783b28aba 100644
--- a/code/src/components/Result.js
+++ b/code/src/components/Result.js
@@ -1,11 +1,12 @@
import React from 'react';
-export const Result = ({ name, food, sign }) => {
+export const Result = ({ name, sign }) => {
return (
<>
Your name is {name}! 💗
You are a {sign}
-
You like {food}, Yummi!
+
You are the laid back kind of {sign}
+
Wow that´s totally awesome!
>
);
}
diff --git a/code/src/components/Selector.js b/code/src/components/Selector.js
new file mode 100644
index 000000000..e55d24605
--- /dev/null
+++ b/code/src/components/Selector.js
@@ -0,0 +1,30 @@
+import React from 'react'
+
+export const Selector = ({ milk, selector, setSelector }) => {
+ const handleSelector = (event) => {
+ setSelector(event.target.value);
+ }
+ return (
+
+
What kind of {milk} are you?
+
+
+ );
+}
+
+/*
What´s your Zodiac sign?
+
+
+ Aries
+ Taurus
+ Gemini
+ Cancer
+ Leo
+ Virgo
+ Libra
+ Scorpio
+ Sagittarius
+ Capricorn
+ Aquarius
+ Pisces
+ */
\ No newline at end of file
diff --git a/code/src/components/ZodiacSign.js b/code/src/components/ZodiacSign.js
index e3d01cd39..db449c8c7 100644
--- a/code/src/components/ZodiacSign.js
+++ b/code/src/components/ZodiacSign.js
@@ -14,14 +14,16 @@ export const ZodiacSign = ({ sign, setSign }) => {
Select your Zodiac Sign:
);
-}
+} */
/* NR 3 */
\ No newline at end of file
diff --git a/code/src/components/Result.js b/code/src/components/Result.js
index 783b28aba..bf44fe825 100644
--- a/code/src/components/Result.js
+++ b/code/src/components/Result.js
@@ -1,11 +1,11 @@
import React from 'react';
-export const Result = ({ name, sign }) => {
+export const Result = ({ name, sign, item }) => {
return (
<>
Your name is {name}! 💗
You are a {sign}
- You are the laid back kind of {sign}
+ You are the {item} laid back kind of {sign}
Wow that´s totally awesome!
>
);
diff --git a/code/src/components/Selector.js b/code/src/components/Selector.js
index e55d24605..86a9aaf56 100644
--- a/code/src/components/Selector.js
+++ b/code/src/components/Selector.js
@@ -1,6 +1,76 @@
-import React from 'react'
+import React from 'react';
-export const Selector = ({ milk, selector, setSelector }) => {
+const howMuch = ['okey', 'a lot', 'to much', 'im extreme'];
+
+export const Selector = ({ select, setSelect }) => {
+ return (
+ <>
+
+
How much are you?
+
+
+
+ >
+ );
+}
+
+/* export const Selector = ({ select, setSelect }) => {
+ const howmuch = [
+ 'Not so much', 'Okey', 'Extreme'
+ ];
+
+ return (
+
+
+
How much {select} are you?
+
+
+ );
+} */
+
+/* NR 4 */
+
+/* export const Selector = ({ milk, selector, setSelector }) => {
const handleSelector = (event) => {
setSelector(event.target.value);
}
@@ -10,21 +80,4 @@ export const Selector = ({ milk, selector, setSelector }) => {
);
-}
-
-/* What´s your Zodiac sign?
-
-
- Aries
- Taurus
- Gemini
- Cancer
- Leo
- Virgo
- Libra
- Scorpio
- Sagittarius
- Capricorn
- Aquarius
- Pisces
- */
\ No newline at end of file
+} */
\ No newline at end of file
diff --git a/code/src/components/ZodiacSign.js b/code/src/components/ZodiacSign.js
index db449c8c7..c797c60de 100644
--- a/code/src/components/ZodiacSign.js
+++ b/code/src/components/ZodiacSign.js
@@ -1,31 +1,54 @@
import React from 'react'
export const ZodiacSign = ({ sign, setSign }) => {
- const handleZodiacSignChange = (event) => {
+/* const handleZodiacSignChange = (event) => {
setSign(event.target.value);
- }
+ } */
- const zodiacSigns = [
- 'Aries', 'Taurus', 'Gemini', 'Cancer', 'Leo', 'Virgo',
- 'Libra', 'Scorpio', 'Sagittarius', 'Capricorn', 'Aquarius', 'Pisces'
- ];
return (
+
+
What's your zodiac?
+
+ {sign && (
+
Okey, so you're a {sign}, cool!
+ )}
+
+ )
+}
+/* return (
Select your Zodiac Sign:
+
+
+ );
+} */
+/* NR 2 */
+
+/* {zodiacSigns.map((signselector) => (
- ))}
-
- {sign && (
- Okey, so you´re a {sign}, cool!
- )}
-
- );
-}
-/* NR 2 */
\ No newline at end of file
+ ))} */
+/* const zodiacSigns = [
+ 'Aries', 'Taurus', 'Gemini', 'Cancer', 'Leo', 'Virgo',
+ 'Libra', 'Scorpio', 'Sagittarius', 'Capricorn', 'Aquarius', 'Pisces'
+ ]; */
\ No newline at end of file
diff --git a/code/src/index.css b/code/src/index.css
index 1efee662c..1dde69967 100644
--- a/code/src/index.css
+++ b/code/src/index.css
@@ -5,56 +5,70 @@ body {
/*background-image: url("https://images.pexels.com/photos/3934512/pexels-photo-3934512.jpeg");
background-size: 50%;*/
}
-
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
monospace;
}
-.zodiac-container {
- border: 1px solid red;
- display: flex;
- flex-direction: column;
+html {
text-align: center;
- margin: 9px;
-}
-.zodiac-container h2 {
- text-align: center;
-}
-.zodiac-container p {
- border: 1px solid green;
- padding: 5px;
}
-.signs {
- display: flex;
- flex-direction: column;
- justify-content: center;
-}
-
+/* PAGE 1 */
.name-container {
display: flex;
- border: 1px solid black;
+ /*border: 1px solid black;*/
flex-direction: column;
align-items: center;
text-align: center;
+ padding-top: 175px;
}
-.name-container h2 {
+/*.name-container h2 {
border: 2px solid green;
-}
-
-.button {
+}*/
+ button {
text-align: center;
+ background-color: rgb(255, 255, 255);
+ color: rgb(38, 38, 38);
+ width: 79px;
+ border-radius: 30px;
+}
+button:hover {
+background-color: #89426c;
+}
+.button p {
+ color: transparent;
}
label {
padding: 5px;
}
-.background-image {
+/*.background-image {
height: 50%;
width: 50%;
-}
+}*/
+/* PAGE 3 */
.signmeeter {
text-align: center;
+}
+
+.zodiac-container {
+ border: 1px solid red;
+ display: flex;
+ flex-direction: column;
+ text-align: center;
+ margin: 9px;
+}
+.zodiac-container h2 {
+ text-align: center;
+}
+.zodiac-container p {
+ border: 1px solid green;
+ padding: 5px;
+}
+.signs {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
}
\ No newline at end of file
From 769767dc0ddcc1510c9655f47e0ecc3e488a57fc Mon Sep 17 00:00:00 2001
From: Annaselvine <120709649+AnnaElvine@users.noreply.github.com>
Date: Sun, 19 Mar 2023 14:06:39 +0100
Subject: [PATCH 07/20] fixed background and some small stuff
---
code/src/App.js | 1 -
code/src/components/Name.js | 14 +--
code/src/components/Selector.js | 46 +--------
code/src/components/ZodiacSign.js | 48 +++-------
code/src/index.css | 149 ++++++++++++++++++++++++++----
5 files changed, 157 insertions(+), 101 deletions(-)
diff --git a/code/src/App.js b/code/src/App.js
index 54a33dce9..41e9b00bb 100644
--- a/code/src/App.js
+++ b/code/src/App.js
@@ -36,7 +36,6 @@ export const App = () => {
{step >= 4 && (
)}
-
{step < 5 && (
{step}
diff --git a/code/src/components/Name.js b/code/src/components/Name.js
index 0ac097cb4..c2d38b469 100644
--- a/code/src/components/Name.js
+++ b/code/src/components/Name.js
@@ -6,12 +6,14 @@ export const Name = ({ name, setName }) => {
}
return (
//
-
-
Welcome to this Astro survey
-
- First of all, what´s your name?
-
-
+
+
+
Welcome to this Astro survey
+
+ First of all, what´s your name?
+
+
+
)
}
diff --git a/code/src/components/Selector.js b/code/src/components/Selector.js
index 86a9aaf56..d43bcaf59 100644
--- a/code/src/components/Selector.js
+++ b/code/src/components/Selector.js
@@ -5,7 +5,7 @@ const howMuch = ['okey', 'a lot', 'to much', 'im extreme'];
export const Selector = ({ select, setSelect }) => {
return (
<>
-
+
How much are you?
@@ -38,46 +38,4 @@ export const Selector = ({ select, setSelect }) => {
>
);
}
-
-/* export const Selector = ({ select, setSelect }) => {
- const howmuch = [
- 'Not so much', 'Okey', 'Extreme'
- ];
-
- return (
-
-
-
How much {select} are you?
-
-
- );
-} */
-
-/* NR 4 */
-
-/* export const Selector = ({ milk, selector, setSelector }) => {
- const handleSelector = (event) => {
- setSelector(event.target.value);
- }
- return (
-
-
What kind of {milk} are you?
-
-
- );
-} */
\ No newline at end of file
+/* NR 3 */
diff --git a/code/src/components/ZodiacSign.js b/code/src/components/ZodiacSign.js
index c797c60de..e288a1c81 100644
--- a/code/src/components/ZodiacSign.js
+++ b/code/src/components/ZodiacSign.js
@@ -6,19 +6,25 @@ export const ZodiacSign = ({ sign, setSign }) => {
} */
return (
-
-
What's your zodiac?
-
- {sign && (
-
Okey, so you're a {sign}, cool!
- )}
+
+ {sign && (
+
Okey, so you're a {sign}, cool!
+ )}
+
)
}
diff --git a/code/src/index.css b/code/src/index.css
index e96d12e70..7fb1ae228 100644
--- a/code/src/index.css
+++ b/code/src/index.css
@@ -35,7 +35,7 @@ html {
position: relative;
align-items: center;
bottom: 94px;
- color:#ffe27b;
+ color:#f2f2f2;
}
.welcome h2 {
text-shadow: 10px;
@@ -78,11 +78,7 @@ background-color: #ffe27b;
label {
padding: 5px;
}
-input {
- color: black;
- position: relative;
- bottom: 30px;
-}
+
/*.background-image {
height: 50%;
width: 50%;
@@ -154,7 +150,7 @@ form.zodiacs {
top: 190px;
}
-/*page 3*/
+/*page 3 HOW MUCH*/
.howmuch-container {
display: flex;
position: relative;
@@ -186,4 +182,39 @@ form.zodiacs {
flex-direction: column;
bottom: 100px;
position: relative;
+}
+form {
+ position: relative;
+ /* bottom: 60px; */
+ /* size: 29px; */
+ /* text-align: center; */
+ font-size: 20px;
+ background: #19273c;
+ width: 150px;
+ display: flex;
+ justify-content: center;
+ flex-direction: column;
+ left: 435px;
+}
+.Okey p {
+ background-color: #19273c;
+ font-size: 25px;
+}
+
+.result {
+ display: flex;
+ position: relative;
+ flex-direction: column;
+ padding-top: 92px;
+ height: 400px;
+ box-sizing: border-box;
+ margin: auto;
+ border-radius: 10px;
+ box-shadow: black;
+ box-shadow: 10px;
+ box-shadow: 10px 5px 5px #26262659;
+ top: 140px;
+ text-shadow: -3px 2px #1a1919;
+ background: #2121218a;
+ font-size: 20px;
}
\ No newline at end of file
From 96300a4501b0d96703fd11766782bae23ad22941 Mon Sep 17 00:00:00 2001
From: Annaselvine <120709649+AnnaElvine@users.noreply.github.com>
Date: Mon, 20 Mar 2023 09:51:16 +0100
Subject: [PATCH 09/20] Update README.md
---
README.md | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/README.md b/README.md
index 50e5933d0..f963a421c 100644
--- a/README.md
+++ b/README.md
@@ -2,12 +2,11 @@
Replace this readme with your own information about your project.
-Start by briefly describing the assignment in a sentence or two. Keep it short and to the point.
-
+I´ve done a Zodiac survey. Not 100% done!
## The problem
-Describe how you approached to problem, and what tools and techniques you used to solve it. How did you plan? What technologies did you use? If you had more time, what would be next?
+:)
## View it live
-Every project should be deployed somewhere. Be sure to include the link to the deployed project so that the viewer can click around and see what it's all about.
+https://zodiac-survey.netlify.app/
From 455adde1748fa4cbf2610ac07c68da5e5e6a3a1c Mon Sep 17 00:00:00 2001
From: Annaselvine <120709649+AnnaElvine@users.noreply.github.com>
Date: Fri, 24 Mar 2023 12:35:25 +0100
Subject: [PATCH 10/20] All work as it should, only some styling left
---
code/src/App.js | 15 ++++++---------
code/src/components/Kitty.js | 22 ----------------------
code/src/components/Result.js | 10 +++++-----
code/src/components/Selector.js | 6 +++---
code/src/components/ZodiacSign.js | 2 +-
code/src/index.css | 27 ++++++++++++++++-----------
6 files changed, 31 insertions(+), 51 deletions(-)
delete mode 100644 code/src/components/Kitty.js
diff --git a/code/src/App.js b/code/src/App.js
index 41e9b00bb..b3c8eff65 100644
--- a/code/src/App.js
+++ b/code/src/App.js
@@ -1,18 +1,14 @@
import React, { useState } from 'react';
import { Name } from 'components/Name';
-/* import { Kitty } from 'components/Kitty'; */
import { ZodiacSign } from 'components/ZodiacSign';
import { Result } from 'components/Result';
import { Selector } from 'components/Selector'
-/* import { RadioButton } from 'components/Radiobutton'; */
export const App = () => {
- /* Is this VARIBLES ? */
const [step, setStep] = useState(1);
const [name, setName] = useState();
const [sign, setSign] = useState();
- /* const [signmeeter, setSignmeeter] = useState(5); */
const [select, setSelect] = useState();
const handleStepIncrease = () => {
@@ -21,20 +17,21 @@ export const App = () => {
return (
<>
+ {/* Whats your name? */}
{step === 1 && (
/* alla the name.js codestuff is in NAME */
)}
+ {/* Choose your Zodiac sign */}
{step === 2 && (
)}
- {/* {step === 3 && (
-
- )} */}
+ {/* How much *sign* are you? */}
{step === 3 && (
-
+
)}
+ {/* Your name is, you are */}
{step >= 4 && (
-
+
)}
{step < 5 && (
diff --git a/code/src/components/Kitty.js b/code/src/components/Kitty.js
deleted file mode 100644
index 13c4fb39c..000000000
--- a/code/src/components/Kitty.js
+++ /dev/null
@@ -1,22 +0,0 @@
-/* import React from 'react'
-
-export const Kitty = ({ milk, signmeeter, setSignmeeter }) => {
- const handleSignMeeter = (event) => {
- setSignmeeter(event.target.value);
- }
- return (
-
-
How much of a {milk} are you?
-
-
-
-
-
- {milk && (
-
That much {milk} huh?
- )}
-
- );
-} */
-
-/* NR 3 */
\ No newline at end of file
diff --git a/code/src/components/Result.js b/code/src/components/Result.js
index 181e5228a..36f0d6a38 100644
--- a/code/src/components/Result.js
+++ b/code/src/components/Result.js
@@ -1,12 +1,12 @@
import React from 'react';
-export const Result = ({ name, sign, item }) => {
+export const Result = ({ name, sign, select }) => {
return (
-
Your name is {name}! 💗
-
You are a {sign}
-
You are the {item} laid back kind of {sign}
-
Wow that´s totally awesome!
+
Okey {name}!
+
Your zodiac sign is {sign}
+
You are the {select} type of {sign}!
+
More {sign}´s to the people!!!
);
}
diff --git a/code/src/components/Selector.js b/code/src/components/Selector.js
index d43bcaf59..0b2e04602 100644
--- a/code/src/components/Selector.js
+++ b/code/src/components/Selector.js
@@ -1,12 +1,12 @@
import React from 'react';
-const howMuch = ['okey', 'a lot', 'to much', 'im extreme'];
+const howMuch = ['Normal', 'A lot', 'Im extreme'];
-export const Selector = ({ select, setSelect }) => {
+export const Selector = ({ select, setSelect, sign }) => {
return (
<>
-
How much are you?
+ How much {sign} are you?
diff --git a/code/src/components/ZodiacSign.js b/code/src/components/ZodiacSign.js
index e21392a99..1acc68cfb 100644
--- a/code/src/components/ZodiacSign.js
+++ b/code/src/components/ZodiacSign.js
@@ -29,7 +29,7 @@ export const ZodiacSign = ({ sign, setSign }) => {
{sign && (
-
Okey, so you're a {sign}, cool!
+
Okey, so you're a {sign}, cool!
)}
diff --git a/code/src/index.css b/code/src/index.css
index 7fb1ae228..02f06b922 100644
--- a/code/src/index.css
+++ b/code/src/index.css
@@ -59,6 +59,16 @@ html {
cursor: pointer;
bottom: 25px;
}
+/*.button button {
+ text-align: center;
+ background-color: rgb(240, 240, 240);
+ color: rgb(23, 23, 23);
+ width: 79px;
+ border-radius: 30px;
+ position: relative;
+ cursor: pointer;
+ bottom: 80px;
+}*/
/* button container */
div.button {
@@ -130,24 +140,17 @@ label {
}
.choose-container h2 {
position: relative;
- bottom: 111px;
+ bottom: 167px;
font-size: 50px;
}
-.button button {
- text-align: center;
- background-color: rgb(240, 240, 240);
- color: rgb(23, 23, 23);
- width: 79px;
- border-radius: 30px;
- position: relative;
- cursor: pointer;
- bottom: 80px;
-}
+
form.zodiacs {
display: flex;
flex-direction: column;
position: absolute;
top: 190px;
+ right: auto;
+ left: auto;
}
/*page 3 HOW MUCH*/
@@ -199,6 +202,8 @@ form {
.Okey p {
background-color: #19273c;
font-size: 25px;
+ position: relative;
+ top: -96px;
}
.result {
From fd15923b10326dc311799ed47e5a8f8b8aeb8a5a Mon Sep 17 00:00:00 2001
From: Annaselvine <120709649+AnnaElvine@users.noreply.github.com>
Date: Fri, 24 Mar 2023 12:37:00 +0100
Subject: [PATCH 11/20] Update README.md
---
README.md | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/README.md b/README.md
index f963a421c..561817f8a 100644
--- a/README.md
+++ b/README.md
@@ -1,11 +1,6 @@
# Survey form with React
-Replace this readme with your own information about your project.
-
-I´ve done a Zodiac survey. Not 100% done!
-## The problem
-
-:)
+This is my Zodiac survey! 💫
## View it live
From dc6964d2e23bb797ece65b23a78915a7b32d19df Mon Sep 17 00:00:00 2001
From: Annaselvine <120709649+AnnaElvine@users.noreply.github.com>
Date: Fri, 24 Mar 2023 13:42:10 +0100
Subject: [PATCH 12/20] only a button fix left, then all done
---
code/src/App.js | 2 +-
code/src/components/Name.js | 2 +-
code/src/components/Selector.js | 46 +++++++++++++-------------
code/src/index.css | 58 ++++++++++++---------------------
4 files changed, 45 insertions(+), 63 deletions(-)
diff --git a/code/src/App.js b/code/src/App.js
index b3c8eff65..8b728047c 100644
--- a/code/src/App.js
+++ b/code/src/App.js
@@ -33,7 +33,7 @@ export const App = () => {
{step >= 4 && (
)}
- {step < 5 && (
+ {step < 4 && (
{step}
Let´s go
diff --git a/code/src/components/Name.js b/code/src/components/Name.js
index c2d38b469..475a955f7 100644
--- a/code/src/components/Name.js
+++ b/code/src/components/Name.js
@@ -8,7 +8,7 @@ export const Name = ({ name, setName }) => {
//
-
Welcome to this Astro survey
+
Welcome to my Astro survey
First of all, what´s your name?
diff --git a/code/src/components/Selector.js b/code/src/components/Selector.js
index 0b2e04602..0f66fe74f 100644
--- a/code/src/components/Selector.js
+++ b/code/src/components/Selector.js
@@ -10,30 +10,28 @@ export const Selector = ({ select, setSelect, sign }) => {
>
);
diff --git a/code/src/index.css b/code/src/index.css
index 02f06b922..548914cbe 100644
--- a/code/src/index.css
+++ b/code/src/index.css
@@ -15,6 +15,7 @@ html {
.container {
display: flex;
position: relative;
+ height: 400px;
flex-direction: column;
align-items: center;
text-align: center;
@@ -22,9 +23,6 @@ html {
box-sizing: border-box;
margin: auto;
border-radius: 10px;
- box-shadow: black;
- box-shadow: 10px;
- box-shadow: 10px 5px 5px #26262659;
top: 140px;
text-shadow: -3px 2px #1a1919;
background: #2121218a;
@@ -57,7 +55,6 @@ html {
border-radius: 30px;
position: relative;
cursor: pointer;
- bottom: 25px;
}
/*.button button {
text-align: center;
@@ -71,14 +68,7 @@ html {
}*/
/* button container */
-div.button {
- display: flex;
- flex-direction: column;
- align-items: center;
- /* top: 2px; */
- position: relative;
- bottom: -54px;
-}
+
button:hover {
background-color: #ffe27b;
}
@@ -89,11 +79,6 @@ label {
padding: 5px;
}
-/*.background-image {
- height: 50%;
- width: 50%;
-}*/
-
/* PAGE 3 */
.signmeeter {
text-align: center;
@@ -105,6 +90,7 @@ label {
flex-direction: column;
text-align: center;
margin: 9px;
+ height: 400px;
}
.zodiac-container h2 {
text-align: center;
@@ -155,24 +141,20 @@ form.zodiacs {
/*page 3 HOW MUCH*/
.howmuch-container {
- display: flex;
- position: relative;
- flex-direction: column;
- align-items: center;
- text-align: center;
- padding-top: 175px;
- width: 700px;
- height: 400px;
- box-sizing: border-box;
- margin: auto;
- border-radius: 10px;
- box-shadow: black;
- box-shadow: 10px;
- box-shadow: 10px 5px 5px #26262659;
- top: 140px;
- text-shadow: -3px 2px #1a1919;
- background: #2121218a;
+ display: flex;
+ position: relative;
+ flex-direction: column;
+ align-items: center;
+ height: 400px;
+ box-shadow: black;
+ box-shadow: 10px;
+ box-shadow: 10px 5px 5px #26262659;
+ top: 140px;
+ text-shadow: -3px 2px #1a1919;
+ background: #2121218a;
+ padding: -10px;
}
+
.howmuch-container h4 {
display: flex;
flex-direction: column;
@@ -183,9 +165,11 @@ form.zodiacs {
.radio-activity {
display: flex;
flex-direction: column;
- bottom: 100px;
position: relative;
+ bottom: 102px;
+ font-size: 19px;
}
+
form {
position: relative;
/* bottom: 60px; */
@@ -200,7 +184,7 @@ form {
left: 435px;
}
.Okey p {
- background-color: #19273c;
+ background-color: #d26767;
font-size: 25px;
position: relative;
top: -96px;
@@ -222,4 +206,4 @@ form {
text-shadow: -3px 2px #1a1919;
background: #2121218a;
font-size: 20px;
-}
\ No newline at end of file
+}
From 5a02574b9f2b2510e361fe07dc5b4ffa2b0d21e8 Mon Sep 17 00:00:00 2001
From: Annaselvine <120709649+AnnaElvine@users.noreply.github.com>
Date: Fri, 24 Mar 2023 13:54:10 +0100
Subject: [PATCH 13/20] responsive
---
code/src/index.css | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/code/src/index.css b/code/src/index.css
index 548914cbe..e204e9cd6 100644
--- a/code/src/index.css
+++ b/code/src/index.css
@@ -207,3 +207,18 @@ form {
background: #2121218a;
font-size: 20px;
}
+
+@media only screen and (max-width: 767px) {
+ /* styles for mobile devices */
+ button {
+ text-align: center;
+ background-color: rgb(240, 240, 240);
+ color: rgb(23, 23, 23);
+ width: 79px;
+ border-radius: 30px;
+ position: relative;
+ cursor: pointer;
+ top: 27px;
+}
+
+}
\ No newline at end of file
From f039272bdd02f6d557e910ecb6ff79bf485679b9 Mon Sep 17 00:00:00 2001
From: Annaselvine <120709649+AnnaElvine@users.noreply.github.com>
Date: Fri, 24 Mar 2023 14:06:18 +0100
Subject: [PATCH 14/20] ,
---
code/src/index.css | 35 ++++++++++++++++++++++++++++++++++-
1 file changed, 34 insertions(+), 1 deletion(-)
diff --git a/code/src/index.css b/code/src/index.css
index e204e9cd6..039c49e25 100644
--- a/code/src/index.css
+++ b/code/src/index.css
@@ -220,5 +220,38 @@ form {
cursor: pointer;
top: 27px;
}
-
+.Okey p {
+ background-color: #d26767;
+ font-size: 25px;
+ position: relative;
+ top: -149px;
+}
+.result p {
+ display: flex;
+ position: relative;
+ flex-direction: column;
+ bottom: 22px;
+ text-shadow: -3px 2px #1a1919;
+ font-size: 20px;
+}
+.howmuch-container h4 {
+ display: flex;
+ flex-direction: column;
+ position: absolute;
+ bottom: 247px;
+ font-size: 30px;
+}
+/*.welcome h2 {
+ text-shadow: 10px;
+ font-size: 34px;
+ font-family: emoji;
+ position: relative;
+ top: -46px;
+}
+.welcome p {
+ text-shadow: 10px;
+ font-size: 23px;
+ position: relative;
+ bottom: 48px;
+} */
}
\ No newline at end of file
From 254a41020f7b93856b703b6df7e90e4d593983f1 Mon Sep 17 00:00:00 2001
From: Annaselvine <120709649+AnnaElvine@users.noreply.github.com>
Date: Wed, 29 Mar 2023 11:47:06 +0200
Subject: [PATCH 15/20] small changes
---
code/src/App.js | 12 +++++++++++-
code/src/components/Selector.js | 13 ++++++++++++-
code/src/index.css | 2 +-
3 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/code/src/App.js b/code/src/App.js
index 8b728047c..9f5410d18 100644
--- a/code/src/App.js
+++ b/code/src/App.js
@@ -14,7 +14,12 @@ export const App = () => {
const handleStepIncrease = () => {
setStep(step + 1);
}
-
+ const restartQuiz = () => {
+ setStep(1);
+ setName('');
+ setSign('');
+ setSelect('');
+ }
return (
<>
{/* Whats your name? */}
@@ -39,6 +44,11 @@ export const App = () => {
Let´s go
)}
+ {step >= 4 && (
+
+ Start over
+
+ )}
>
);
}
diff --git a/code/src/components/Selector.js b/code/src/components/Selector.js
index 0f66fe74f..9fb93f554 100644
--- a/code/src/components/Selector.js
+++ b/code/src/components/Selector.js
@@ -1,5 +1,5 @@
import React from 'react';
-
+/* values */
const howMuch = ['Normal', 'A lot', 'Im extreme'];
export const Selector = ({ select, setSelect, sign }) => {
@@ -33,6 +33,17 @@ export const Selector = ({ select, setSelect, sign }) => {
))}
+
+ {select === 'Normal' && (
+
It´s good to be {select} too I guess!
+ )}
+ {select === 'A lot' && (
+
Okey, so you're a {select}, cool!
+ )}
+ {select === 'Im extreme' && (
+
Okey, so you're a {select}, cool!
+ )}
+
>
);
}
diff --git a/code/src/index.css b/code/src/index.css
index 039c49e25..40f8383e8 100644
--- a/code/src/index.css
+++ b/code/src/index.css
@@ -3,7 +3,7 @@ body {
background-color: rgb(58, 58, 58);
color: white;
background-image: url("https://nypost.com/wp-content/uploads/sites/2/2021/11/astrology-sun-moon-rising-signs-1-copy.jpg?quality=75&strip=all");
- background-size: 100%;
+ background-size: 100%; /* cover */
font-family: emoji;
}
From 4a2f46f34f95e5df4d1d4a0ea790c139781311b2 Mon Sep 17 00:00:00 2001
From: Annaselvine <120709649+AnnaElvine@users.noreply.github.com>
Date: Sun, 2 Apr 2023 11:58:08 +0200
Subject: [PATCH 16/20] fixed small stuff
---
code/src/components/Selector.js | 6 +-
code/src/index.css | 268 +++++++++++++++++++++++---------
2 files changed, 194 insertions(+), 80 deletions(-)
diff --git a/code/src/components/Selector.js b/code/src/components/Selector.js
index 9fb93f554..86fcffa29 100644
--- a/code/src/components/Selector.js
+++ b/code/src/components/Selector.js
@@ -35,13 +35,13 @@ export const Selector = ({ select, setSelect, sign }) => {
{select === 'Normal' && (
-
It´s good to be {select} too I guess!
+
{select} is pretty good too, I guess! 👵🏻
)}
{select === 'A lot' && (
-
Okey, so you're a {select}, cool!
+
Sugar & spice, {select}, is nice! 🌶🔥
)}
{select === 'Im extreme' && (
-
Okey, so you're a {select}, cool!
+
The {select}´s turn´s the world upside down. You go you wild thing 😎
)}
>
diff --git a/code/src/index.css b/code/src/index.css
index 40f8383e8..c8ffee73f 100644
--- a/code/src/index.css
+++ b/code/src/index.css
@@ -34,6 +34,7 @@ html {
align-items: center;
bottom: 94px;
color:#f2f2f2;
+ left: -15px;
}
.welcome h2 {
text-shadow: 10px;
@@ -55,20 +56,12 @@ html {
border-radius: 30px;
position: relative;
cursor: pointer;
+ left: -13px;
+ bottom: -4px;
}
-/*.button button {
- text-align: center;
- background-color: rgb(240, 240, 240);
- color: rgb(23, 23, 23);
- width: 79px;
- border-radius: 30px;
- position: relative;
- cursor: pointer;
- bottom: 80px;
-}*/
-/* button container */
+/* button container */
button:hover {
background-color: #ffe27b;
}
@@ -79,33 +72,9 @@ label {
padding: 5px;
}
-/* PAGE 3 */
-.signmeeter {
- text-align: center;
-}
-.zodiac-container {
- border: 1px solid red;
- display: flex;
- flex-direction: column;
- text-align: center;
- margin: 9px;
- height: 400px;
-}
-.zodiac-container h2 {
- text-align: center;
-}
-.zodiac-container p {
- border: 1px solid green;
- padding: 5px;
-}
-.signs {
- display: flex;
- flex-direction: column;
- justify-content: center;
-}
-/*page 2 choose sign select dropdown */
+/* PAGE 2 choose sign select dropdown */
.choose-container {
display: flex;
position: relative;
@@ -121,7 +90,7 @@ label {
box-shadow: 10px;
box-shadow: 10px 5px 5px #26262659;
top: 140px;
- text-shadow: -3px 2px #1a1919;
+ /* text-shadow: -3px 2px #1a1919; */
background: #2121218a;
}
.choose-container h2 {
@@ -129,22 +98,38 @@ label {
bottom: 167px;
font-size: 50px;
}
-
form.zodiacs {
+ position: relative;
+ left: -15px;
+ top: -170px;
+}
+
+.zodiac-container {
+ border: 1px solid red;
display: flex;
flex-direction: column;
- position: absolute;
- top: 190px;
- right: auto;
- left: auto;
+ text-align: center;
+ margin: 9px;
+ height: 400px;
+}
+.zodiac-container h2 {
+ text-align: center;
+}
+.zodiac-container p {
+ border: 1px solid green;
+ padding: 5px;
+}
+.signs {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
}
-/*page 3 HOW MUCH*/
+/* PAGE 3 - how much */
.howmuch-container {
display: flex;
position: relative;
flex-direction: column;
- align-items: center;
height: 400px;
box-shadow: black;
box-shadow: 10px;
@@ -152,29 +137,33 @@ form.zodiacs {
top: 140px;
text-shadow: -3px 2px #1a1919;
background: #2121218a;
- padding: -10px;
}
-
.howmuch-container h4 {
display: flex;
flex-direction: column;
position: absolute;
bottom: 280px;
font-size: 30px;
+ right: 485px;
}
+/* how much: normal, a lot, im extreme radio buttons */
.radio-activity {
- display: flex;
- flex-direction: column;
- position: relative;
- bottom: 102px;
- font-size: 19px;
+ left: 568px;
+ position: absolute;
+ top: 235px;
+}
+/* answer how much */
+.HowMuch p {
+ background-blend-mode: overlay;
+ font-size: 20px;
+ background: #d26767;
+ width: 300px;
+ position: absolute;
+ top: 350px;
+ right: 506px;
}
-
form {
position: relative;
- /* bottom: 60px; */
- /* size: 29px; */
- /* text-align: center; */
font-size: 20px;
background: #19273c;
width: 150px;
@@ -183,21 +172,18 @@ form {
flex-direction: column;
left: 435px;
}
+/* PAGE 4 - results */
.Okey p {
background-color: #d26767;
font-size: 25px;
position: relative;
- top: -96px;
+ top: -125px;
}
-
.result {
- display: flex;
position: relative;
- flex-direction: column;
padding-top: 92px;
height: 400px;
box-sizing: border-box;
- margin: auto;
border-radius: 10px;
box-shadow: black;
box-shadow: 10px;
@@ -205,11 +191,46 @@ form {
top: 140px;
text-shadow: -3px 2px #1a1919;
background: #2121218a;
- font-size: 20px;
+ font-size: 25px;
+ text-align: center;
+}
+.result p {
+ margin: 10px;
+ left: -10px;
+ position: relative;
}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/* styles for mobile devices */
@media only screen and (max-width: 767px) {
- /* styles for mobile devices */
button {
text-align: center;
background-color: rgb(240, 240, 240);
@@ -226,32 +247,125 @@ form {
position: relative;
top: -149px;
}
-.result p {
+.result {
display: flex;
position: relative;
flex-direction: column;
- bottom: 22px;
+ padding-top: 92px;
+ height: 400px;
+ box-sizing: border-box;
+ margin: auto;
+ border-radius: 10px;
+ box-shadow: black;
+ box-shadow: 10px;
+ box-shadow: 10px 5px 5px #26262659;
+ top: 140px;
text-shadow: -3px 2px #1a1919;
+ background: #2121218a;
font-size: 20px;
}
+.result p {
+ display: flex;
+ flex-direction: column;
+ bottom: 43px;
+ text-shadow: -3px 2px #1a1919;
+ font-size: 22px;
+ margin: 7px;
+}
.howmuch-container h4 {
display: flex;
flex-direction: column;
- position: absolute;
+ /* position: absolute; */
bottom: 247px;
- font-size: 30px;
+ font-size: 20px;
}
-/*.welcome h2 {
- text-shadow: 10px;
- font-size: 34px;
- font-family: emoji;
+.howmuch-container {
+ display: flex;
position: relative;
- top: -46px;
+ flex-direction: column;
+ align-items: center;
+ height: 400px;
+ box-shadow: black;
+ box-shadow: 10px;
+ box-shadow: 10px 5px 5px #26262659;
+ top: 140px;
+ text-shadow: -3px 2px #1a1919;
+ background: #2121218a;
+ padding: -10px;
+ max-width: 370px;
}
-.welcome p {
- text-shadow: 10px;
- font-size: 23px;
+.radio-activity {
+ display: flex;
+ flex-direction: column;
+ bottom: 324px;
+ display: flex;
+ font-size: 19px;
+ left: 119px;
+}
+.howmuch-container h4 {
+ display: flex;
+ flex-direction: column;
+ bottom: 280px;
+ font-size: 24px;
+ right: 501px;
+}
+.HowMuch p {
+ background-blend-mode: overlay;
+ font-size: 20px;
+ background: #000000bf;
+ width: 300px;
+ position: absolute;
+ top: 360px;
+ right: 40px;
+}
+form.zodiacs {
+ display: flex;
+ flex-direction: column;
+ position: absolute;
+ top: 190px;
+ left: 108px;
+}
+}
+/* styles for tablet devices */
+/*@media only screen and (min-width: 820px) {
+ form.zodiacs {
+ display: flex;
+ flex-direction: column;
+ position: absolute;
+ top: 190px;
+ right: auto;
+ left: 325px;
+}
+.radio-activity {
+ display: flex;
+ flex-direction: column;
+ position: relative;
+ bottom: 845px;
+ font-size: 19px;
+ display: flex;
+ flex-direction: column;
+ position: absolute;
+ font-size: 19px;
+ left: 325px;
+}
+.HowMuch p {
+ background-blend-mode: overlay;
+ font-size: 20px;
+ background: #d26767;
+ width: 300px;
+ position: absolute;
+ top: 337px;
+ right: 276px;
+}
+button {
+ text-align: center;
+ background-color: rgb(240, 240, 240);
+ color: rgb(23, 23, 23);
+ width: 79px;
+ border-radius: 30px;
position: relative;
- bottom: 48px;
-} */
-}
\ No newline at end of file
+ cursor: pointer;
+ left: -13px;
+ bottom: -35px;
+}
+} */
\ No newline at end of file
From 9919c7c0129a4a0e8f7ddea7e0d6f6a4f1927c7e Mon Sep 17 00:00:00 2001
From: Annaselvine <120709649+AnnaElvine@users.noreply.github.com>
Date: Sun, 2 Apr 2023 12:07:00 +0200
Subject: [PATCH 17/20] done!
---
code/src/index.css | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/code/src/index.css b/code/src/index.css
index c8ffee73f..82217534e 100644
--- a/code/src/index.css
+++ b/code/src/index.css
@@ -241,6 +241,16 @@ form {
cursor: pointer;
top: 27px;
}
+.welcome {
+ display: flex;
+ flex-direction: column;
+ position: relative;
+ align-items: center;
+ bottom: 137px;
+ color: #f2f2f2;
+ left: -7px;
+}
+
.Okey p {
background-color: #d26767;
font-size: 25px;
@@ -272,13 +282,6 @@ form {
font-size: 22px;
margin: 7px;
}
-.howmuch-container h4 {
- display: flex;
- flex-direction: column;
- /* position: absolute; */
- bottom: 247px;
- font-size: 20px;
-}
.howmuch-container {
display: flex;
position: relative;
@@ -297,17 +300,17 @@ form {
.radio-activity {
display: flex;
flex-direction: column;
- bottom: 324px;
display: flex;
font-size: 19px;
left: 119px;
+ top: 246px;
}
.howmuch-container h4 {
display: flex;
flex-direction: column;
bottom: 280px;
font-size: 24px;
- right: 501px;
+ right: 39px;
}
.HowMuch p {
background-blend-mode: overlay;
@@ -315,8 +318,8 @@ form {
background: #000000bf;
width: 300px;
position: absolute;
- top: 360px;
right: 40px;
+ top: 348px;
}
form.zodiacs {
display: flex;
From 8eeb5e07ba7fdb2301e7efb028c458f7b2caf77e Mon Sep 17 00:00:00 2001
From: Annaselvine <120709649+AnnaElvine@users.noreply.github.com>
Date: Sun, 2 Apr 2023 12:17:23 +0200
Subject: [PATCH 18/20] tablet fix, all done!
---
code/src/index.css | 29 ++++++++++++++++++-----------
1 file changed, 18 insertions(+), 11 deletions(-)
diff --git a/code/src/index.css b/code/src/index.css
index 82217534e..ce85628bf 100644
--- a/code/src/index.css
+++ b/code/src/index.css
@@ -330,7 +330,7 @@ form.zodiacs {
}
}
/* styles for tablet devices */
-/*@media only screen and (min-width: 820px) {
+@media only screen and (min-width: 767px) and (max-width: 1024px) {
form.zodiacs {
display: flex;
flex-direction: column;
@@ -338,27 +338,34 @@ form.zodiacs {
top: 190px;
right: auto;
left: 325px;
-}
-.radio-activity {
+ }
+ .howmuch-container h4 {
display: flex;
flex-direction: column;
+ position: absolute;
+ bottom: 280px;
+ font-size: 30px;
+ right: 297px;
+}
+.Okey p {
+ background-color: #d26767;
+ font-size: 25px;
position: relative;
- bottom: 845px;
- font-size: 19px;
- display: flex;
- flex-direction: column;
+ top: -68px;
+}
+.radio-activity {
position: absolute;
+ top: 209px;
font-size: 19px;
left: 325px;
}
.HowMuch p {
- background-blend-mode: overlay;
- font-size: 20px;
background: #d26767;
width: 300px;
position: absolute;
- top: 337px;
right: 276px;
+ font-size: 20px;
+ top: 352px;
}
button {
text-align: center;
@@ -371,4 +378,4 @@ button {
left: -13px;
bottom: -35px;
}
-} */
\ No newline at end of file
+}
From 707eb32ec1557246a0ff004bf44a6e20123ee66d Mon Sep 17 00:00:00 2001
From: Annaselvine <120709649+AnnaElvine@users.noreply.github.com>
Date: Sun, 2 Apr 2023 12:20:10 +0200
Subject: [PATCH 19/20] .
---
code/src/index.css | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/src/index.css b/code/src/index.css
index ce85628bf..813dd2fb6 100644
--- a/code/src/index.css
+++ b/code/src/index.css
@@ -337,7 +337,7 @@ form.zodiacs {
position: absolute;
top: 190px;
right: auto;
- left: 325px;
+ left: 303px;
}
.howmuch-container h4 {
display: flex;
From 9de5ec16d6c62acba2ad3388f6733d0f51df3e35 Mon Sep 17 00:00:00 2001
From: Annaselvine <120709649+AnnaElvine@users.noreply.github.com>
Date: Sun, 2 Apr 2023 12:25:17 +0200
Subject: [PATCH 20/20] .
---
code/src/index.css | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/code/src/index.css b/code/src/index.css
index 813dd2fb6..533ca64a9 100644
--- a/code/src/index.css
+++ b/code/src/index.css
@@ -336,8 +336,7 @@ form.zodiacs {
flex-direction: column;
position: absolute;
top: 190px;
- right: auto;
- left: 303px;
+ left: 293px;
}
.howmuch-container h4 {
display: flex;
@@ -345,27 +344,28 @@ form.zodiacs {
position: absolute;
bottom: 280px;
font-size: 30px;
- right: 297px;
+ right: 220px;
}
.Okey p {
background-color: #d26767;
font-size: 25px;
position: relative;
top: -68px;
+ left: -18px;
}
.radio-activity {
position: absolute;
top: 209px;
font-size: 19px;
- left: 325px;
+ left: 300px;
}
.HowMuch p {
background: #d26767;
width: 300px;
position: absolute;
- right: 276px;
font-size: 20px;
top: 352px;
+ right: 257px;
}
button {
text-align: center;