From 1aaf58a7d755d2e6a80e49c4d1ce1b8d0a952270 Mon Sep 17 00:00:00 2001 From: Yuqi Huang Date: Wed, 24 Jan 2024 11:53:22 -0800 Subject: [PATCH] exercise3_tophalf_7 --- src/pages/Exercise3.tsx | 173 +++++++++++++++++++------------------- src/styles/Exercise3.scss | 71 ++++++++-------- 2 files changed, 124 insertions(+), 120 deletions(-) diff --git a/src/pages/Exercise3.tsx b/src/pages/Exercise3.tsx index 554b1511..41ed3422 100644 --- a/src/pages/Exercise3.tsx +++ b/src/pages/Exercise3.tsx @@ -1,4 +1,4 @@ -import {FC, useState} from 'react'; +import { FC, useState } from 'react'; import AppWrapper from '../components/AppWrapper'; import { HeaderSections } from '../types/globalTypes'; import '../styles/Exercise3.scss'; @@ -8,92 +8,91 @@ import Grid from '../components/Grid'; import HintBox from '../components/HintBox'; import NavButtons from '../components/NavButtons'; - const Exercise3: FC = () => { - const [confetti, setConfetti] = useState(false); - const nums = Array.from({length: 24}, (_, index)=>index+1); - const itemSpace = [1, 3, 1, 3, 2, 4, 2, 1, 1, 2, 1, 2, 1]; - const selectedValue = ''; - return( - <> - -
-

Exercise 3

-

- For this exercise, you will be helping Pipi - find the basketball that was stored in the - last lesson and replacing it with a soccer ball. -

-

Instructions

-

- Take PiPi to{' '} - Box I - {' '}by clicking on the correct address. -

- -
-
- -
- -
- -
- -
- -
- -
- -
-
- Pipi -
-

- Pipi now wants to replace the basketball with a soccer ball. - What is the corresponding code to do this? -

-
-

- SoccerBall soccerBall; // ignore the type difference here -

- -
-
-
-
- - - ); + const [confetti, setConfetti] = useState(false); + const nums = Array.from({ length: 24 }, (_, index) => index + 1); + const itemSpace = [1, 3, 1, 3, 2, 4, 2, 1, 1, 2, 1, 2, 1]; + const selectedValue = ''; + return ( + <> + +
+

Exercise 3

+

+ For this exercise, you will be helping Pipi find the basketball that + was stored in the last lesson and replacing it with a soccer ball. +

+

Instructions

+

+ Take PiPi to Box I by clicking on + the correct address. +

+ +
+
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+
+ Pipi +
+

+ Pipi now wants to replace the basketball with a soccer ball. What is + the corresponding code to do this? +

+
+

+ SoccerBall soccerBall; // ignore the type difference here +

+ +
+
+
+
+ + + ); }; -export default Exercise3; \ No newline at end of file +export default Exercise3; diff --git a/src/styles/Exercise3.scss b/src/styles/Exercise3.scss index 9d1ec68e..19bb047b 100644 --- a/src/styles/Exercise3.scss +++ b/src/styles/Exercise3.scss @@ -1,45 +1,50 @@ .wrap { - display: flex; - flex-direction: row; - flex-wrap: nowrap; - margin-bottom: 2.5em; - margin-top: 2.5em; + display: flex; + flex-direction: row; + flex-wrap: nowrap; + margin-bottom: 2.5em; + margin-top: 2.5em; +} + +.pipi{ + position: absolute; + margin-top: -100px; } .frame { - background: #8596BE26; - border-radius: 5px; - height: 359px; - left: 161px; - position: absolute; /* This is crucial for top to work */ - top: 900px; /* Adjust this value to move the frame */ - width: 1118px; - z-index: 1; + background: #8596be26; + border-radius: 5px; + height: 359px; + left: 161px; + position: absolute; /* This is crucial for top to work */ + top: 900px; /* Adjust this value to move the frame */ + width: 1118px; + z-index: 1; } -.text1{ - height: 29px; - margin-left: 50px; - margin-top: 50px; - width: 1021px; +.text1 { + height: 29px; + margin-left: 50px; + margin-top: 50px; + width: 1021px; } -.padding{ - height: 10px; - margin-top: 400px; - z-index: 1; +.padding { + height: 10px; + margin-top: 400px; + z-index: 1; } .button { - background: #EEE; - border: 2px solid #A0A3A3; - border-radius: 4px; - color: #14396A; - font-family: "Helvetica", "Arial", sans-serif; - font-size: 22px; - height: 40px; - margin-left: 50px; - padding: 2px 40px; - text-align: left; - width: 501px; + background: #eee; + border: 2px solid #a0a3a3; + border-radius: 4px; + color: #14396a; + font-family: 'Helvetica', 'Arial', sans-serif; + font-size: 22px; + height: 40px; + margin-left: 50px; + padding: 2px 40px; + text-align: left; + width: 501px; }