Skip to content

Commit

Permalink
Merge branch 'main' into 299_pipi_pronoun_consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
Dankco authored Oct 22, 2023
2 parents e3c6ee4 + 44a6fa6 commit c92c717
Show file tree
Hide file tree
Showing 17 changed files with 188 additions and 89 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"devDependencies": {
"@babel/core": "^7.23.0",
"@babel/preset-env": "^7.22.4",
"@babel/preset-react": "^7.18.6",
"@babel/preset-react": "^7.22.15",
"@babel/preset-typescript": "^7.22.11",
"@types/react-copy-to-clipboard": "^5.0.5",
"@typescript-eslint/eslint-plugin": "^4.33.0",
Expand Down
Binary file added public/Slide1lesson7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/Slide2lesson7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/Slide3lesson7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/Slide4lesson7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/Slide5lesson7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/Slide6lesson7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/lesson7array.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import Lesson2_2 from './pages/Lesson2_2';
import Lesson3 from './pages/Lesson3';
import Lesson4 from './pages/Lesson4';
import Lesson5 from './pages/Lesson5';
import Lesson7 from './pages/Lesson7';
import PointerMotivation from './pages/PointerMotivation';

function App(): JSX.Element {
Expand All @@ -27,6 +28,7 @@ function App(): JSX.Element {
<Route path="/exercise-1" element={<Exercise1 />} />
<Route path="/lesson-4" element={<Lesson4 />} />
<Route path="/lesson-5" element={<Lesson5 />} />
<Route path="/lesson-7" element={<Lesson7 />} />
<Route path="/lesson-10" element={<Lesson10 />} />
<Route path="*" element={<Error404 />} />
</Routes>
Expand Down
124 changes: 72 additions & 52 deletions src/pages/Demo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -323,59 +323,79 @@ const Demo: FC = () => {
<div>
<AppWrapper section={HeaderSections.DEMO_SECTION}>
<div className="page-wrapper">
<HintBox text="Try counting the number of boxes PiPi has to visit." />
<HintBox text="This is my really long hint box text! You made a lot of mistakes lol.This is my really long hint box text! You made a lot of mistakes lol.This is my really long hint box text! You made a lot of mistakes lol.This is my really long hint box text! You made a lot of mistakes lol.This is my really long hint box text! You made a lot of mistakes lol.This is my really long hint box text! You made a lot of mistakes lol." />
<Grid
addressNums={nums1}
itemSpaceArray={itemSpaceArray1}
size={40}
handleCorrect={setConfetti}
>
<img className="pipi" src={Pipi} alt="Pipi"></img>
<Box letter="a" num={3} conf={false}></Box>
<div></div>
<Box letter="b" num={2} conf={false}></Box>
<div></div>
<Box letter="c" num={3} conf={false}></Box>
<Box letter="d" num={4} conf={false}></Box>
<div></div>
<Box letter="e" num={2} conf={false}></Box>
</Grid>
<Grid
addressNums={nums2}
itemSpaceArray={itemSpaceArray2}
size={40}
handleCorrect={setConfetti}
>
<Box letter="f" num={5} conf={false}></Box>
<div></div>
<Box letter="g" num={6} conf={false}></Box>
<Box letter="h" num={2} conf={false}></Box>
<div></div>
<Box letter="i" num={4} conf={confetti}></Box>
<Box letter="j" num={1} conf={confetti}></Box>
</Grid>
<Grid
addressNums={nums3}
itemSpaceArray={itemSpaceArray3}
size={40}
handleCorrect={setConfetti}
>
<div></div>
<Box letter="k" num={5} conf={false}></Box>
<div></div>
<Box letter="l" num={4} conf={false}></Box>
<Box letter="m" num={1} conf={false}></Box>
<Box letter="n" num={3} conf={false}></Box>
<div></div>
<Box letter="o" num={4} conf={false}></Box>
</Grid>
<p className="description">
<br></br>
{/* This is the heading and hint section */}
<h1>Demo</h1>
<p>
Pipi wants to find a basketball. but does not know where to look!
The warehouse is full of many boxes full of all kinds of items at
different shelf address numbers. Pipi got a note saying the the
basketball in Box I but can only see the shelf addresses. Can you
help them find the basketball?
</p>
<h1 className="header">Demo</h1>
<img className="ladder" src={LeftLadder} alt="LeftLadder"></img>
<img className="ladder" src={RightLadder} alt="RightLadder"></img>

<h3>Instructions</h3>
<p>
Take Pipi to <span className="highlight">Box i</span> by clicking on
the correct address.
</p>

<HintBox text="Click on the first address occupied by the box (the leftmost one)." />

{/* THE DEMO BOX */}
<div className="wrap">
<img className="ladder" src={LeftLadder} alt="LeftLadder" />
<div className="demobox">
<Grid
addressNums={nums1}
itemSpaceArray={itemSpaceArray1}
size={40}
handleCorrect={setConfetti}
>
<img className="pipi" src={Pipi} alt="Pipi"></img>
<Box letter="a" num={3} conf={false}></Box>
<div></div>
<Box letter="b" num={2} conf={false}></Box>
<div></div>
<Box letter="c" num={3} conf={false}></Box>
<Box letter="d" num={4} conf={false}></Box>
<div></div>
<Box letter="e" num={2} conf={false}></Box>
</Grid>
<Grid
addressNums={nums2}
itemSpaceArray={itemSpaceArray2}
size={40}
handleCorrect={setConfetti}
>
<Box letter="f" num={5} conf={false}></Box>
<div></div>
<Box letter="g" num={6} conf={false}></Box>
<Box letter="h" num={2} conf={false}></Box>
<div></div>
<Box letter="i" num={4} conf={confetti}></Box>
<Box letter="j" num={1} conf={confetti}></Box>
</Grid>
<Grid
addressNums={nums3}
itemSpaceArray={itemSpaceArray3}
size={40}
handleCorrect={setConfetti}
>
<div></div>
<Box letter="k" num={5} conf={false}></Box>
<div></div>
<Box letter="l" num={4} conf={false}></Box>
<Box letter="m" num={1} conf={false}></Box>
<Box letter="n" num={3} conf={false}></Box>
<div></div>
<Box letter="o" num={4} conf={false}></Box>
</Grid>
</div>
<p className="description">
<br></br>
</p>
<img className="ladder" src={RightLadder} alt="RightLadder" />
</div>
<div id="inbox-wrapper">
<AlertInbox header="Hey Pipi, the Box is at address 12!">
{Popup}
Expand Down
53 changes: 53 additions & 0 deletions src/pages/Lesson7.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import { FC } from 'react';
import lesson7array from '../../public/lesson7array.png';
import Slide1lesson7 from '../../public/Slide1lesson7.png';
import Slide2lesson7 from '../../public/Slide2lesson7.png';
import Slide3lesson7 from '../../public/Slide3lesson7.png';
import Slide4lesson7 from '../../public/Slide4lesson7.png';
import Slide5lesson7 from '../../public/Slide5lesson7.png';
import Slide6lesson7 from '../../public/Slide6lesson7.png';
import AppWrapper from '../components/AppWrapper';
import NavButtons from '../components/NavButtons';
import SlideShow from '../components/SlideShow';
import { HeaderSections } from '../types/globalTypes';
import '../styles/PageWrapper.scss';
import '../styles/Lesson7.scss';

const Lesson7: FC = () => {
const imageArray = [];

imageArray.push(<img src={Slide1lesson7} className="lesson7slides" />);
imageArray.push(<img src={Slide2lesson7} className="lesson7slides" />);
imageArray.push(<img src={Slide3lesson7} className="lesson7slides" />);
imageArray.push(<img src={Slide4lesson7} className="lesson7slides" />);
imageArray.push(<img src={Slide5lesson7} className="lesson7slides" />);
imageArray.push(<img src={Slide6lesson7} className="lesson7slides" />);

return (
<div>
<AppWrapper section={HeaderSections.LESSON_7}>
<div className="page-wrapper">
<h1>Arrays and Pointer Arithmetic</h1>
<p>
<b>Array:</b> a line of boxes that are the same size
</p>
<div className="diagram">
<img src={lesson7array} className="pipi"></img>
</div>
<p>
Let&apos;s talk about arrays, since they are helpful for
understanding pointer arithmetic! Arrays are typically used to
represent multiple values of the same type in one data structure. In
memory, arrays are represented by just having values set
contiguously in memory. This means that we can simply add to our
pointer to move the pointer to.
</p>
<SlideShow images={imageArray} />
<NavButtons page={10} />
</div>
</AppWrapper>
</div>
);
};

export default Lesson7;
13 changes: 13 additions & 0 deletions src/styles/Demo.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,16 @@ $header-height: 8vh;
p {
margin: 0;
}

.wrap {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
margin-bottom: 2.5em;
margin-top: 2.5em;
}

.demobox {
margin-left: -40px;
margin-right: -40px;
}
1 change: 1 addition & 0 deletions src/styles/HintBox.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
.hintbox-container {
display: flex;
justify-content: end;
margin-top: 1em;
}

.hintbox {
Expand Down
8 changes: 8 additions & 0 deletions src/styles/Lesson7.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@import './global';

// lesson7slides
// =======================================

.lesson7slides {
width: 55%;
}
1 change: 1 addition & 0 deletions src/styles/ShelfAddress.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@

.address:hover {
background-color: gray;
cursor: pointer;
}
5 changes: 3 additions & 2 deletions src/types/globalTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export enum HeaderSections {
EXERCISE_1 = 'Exercise 1',
LESSON_4 = 'Lesson 4',
LESSON_5 = 'Lesson 5',
LESSON_7 = 'Lesson 7',
LESSON_10 = 'Lesson 10',
}

Expand Down Expand Up @@ -49,9 +50,9 @@ export enum PageOrder {
'/lesson-3',
'/lesson-4',
'/lesson-5',
/*'/lesson-6',
'/lesson-6',
'/lesson-7',
'/lesson-8', */
'/lesson-8',
'/lesson-10',
'/exercise-1',
}
68 changes: 34 additions & 34 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
version "7.22.20"
resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz"

"@babel/helper-validator-option@^7.18.6", "@babel/helper-validator-option@^7.21.0", "@babel/helper-validator-option@^7.22.15", "@babel/helper-validator-option@^7.22.5":
"@babel/helper-validator-option@^7.21.0", "@babel/helper-validator-option@^7.22.15", "@babel/helper-validator-option@^7.22.5":
version "7.22.15"
resolved "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.15.tgz"

Expand Down Expand Up @@ -326,7 +326,7 @@
dependencies:
"@babel/helper-plugin-utils" "^7.8.0"

"@babel/plugin-syntax-jsx@^7.18.6", "@babel/plugin-syntax-jsx@^7.22.5":
"@babel/plugin-syntax-jsx@^7.22.5":
version "7.22.5"
resolved "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.22.5.tgz"
dependencies:
Expand Down Expand Up @@ -662,34 +662,34 @@
dependencies:
"@babel/helper-plugin-utils" "^7.18.6"

"@babel/plugin-transform-react-display-name@^7.18.6":
version "7.18.6"
resolved "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.18.6.tgz"
"@babel/plugin-transform-react-display-name@^7.22.5":
version "7.22.5"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.22.5.tgz#3c4326f9fce31c7968d6cb9debcaf32d9e279a2b"
dependencies:
"@babel/helper-plugin-utils" "^7.18.6"
"@babel/helper-plugin-utils" "^7.22.5"

"@babel/plugin-transform-react-jsx-development@^7.18.6":
version "7.18.6"
resolved "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.18.6.tgz"
"@babel/plugin-transform-react-jsx-development@^7.22.5":
version "7.22.5"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.22.5.tgz#e716b6edbef972a92165cd69d92f1255f7e73e87"
dependencies:
"@babel/plugin-transform-react-jsx" "^7.18.6"
"@babel/plugin-transform-react-jsx" "^7.22.5"

"@babel/plugin-transform-react-jsx@^7.18.6":
version "7.20.13"
resolved "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.20.13.tgz"
"@babel/plugin-transform-react-jsx@^7.22.15", "@babel/plugin-transform-react-jsx@^7.22.5":
version "7.22.15"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.22.15.tgz#7e6266d88705d7c49f11c98db8b9464531289cd6"
dependencies:
"@babel/helper-annotate-as-pure" "^7.18.6"
"@babel/helper-module-imports" "^7.18.6"
"@babel/helper-plugin-utils" "^7.20.2"
"@babel/plugin-syntax-jsx" "^7.18.6"
"@babel/types" "^7.20.7"
"@babel/helper-annotate-as-pure" "^7.22.5"
"@babel/helper-module-imports" "^7.22.15"
"@babel/helper-plugin-utils" "^7.22.5"
"@babel/plugin-syntax-jsx" "^7.22.5"
"@babel/types" "^7.22.15"

"@babel/plugin-transform-react-pure-annotations@^7.18.6":
version "7.18.6"
resolved "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.18.6.tgz"
"@babel/plugin-transform-react-pure-annotations@^7.22.5":
version "7.22.5"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.22.5.tgz#1f58363eef6626d6fa517b95ac66fe94685e32c0"
dependencies:
"@babel/helper-annotate-as-pure" "^7.18.6"
"@babel/helper-plugin-utils" "^7.18.6"
"@babel/helper-annotate-as-pure" "^7.22.5"
"@babel/helper-plugin-utils" "^7.22.5"

"@babel/plugin-transform-regenerator@^7.21.5":
version "7.21.5"
Expand Down Expand Up @@ -866,16 +866,16 @@
"@babel/types" "^7.4.4"
esutils "^2.0.2"

"@babel/preset-react@^7.18.6":
version "7.18.6"
resolved "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.18.6.tgz"
"@babel/preset-react@^7.22.15":
version "7.22.15"
resolved "https://registry.yarnpkg.com/@babel/preset-react/-/preset-react-7.22.15.tgz#9a776892b648e13cc8ca2edf5ed1264eea6b6afc"
dependencies:
"@babel/helper-plugin-utils" "^7.18.6"
"@babel/helper-validator-option" "^7.18.6"
"@babel/plugin-transform-react-display-name" "^7.18.6"
"@babel/plugin-transform-react-jsx" "^7.18.6"
"@babel/plugin-transform-react-jsx-development" "^7.18.6"
"@babel/plugin-transform-react-pure-annotations" "^7.18.6"
"@babel/helper-plugin-utils" "^7.22.5"
"@babel/helper-validator-option" "^7.22.15"
"@babel/plugin-transform-react-display-name" "^7.22.5"
"@babel/plugin-transform-react-jsx" "^7.22.15"
"@babel/plugin-transform-react-jsx-development" "^7.22.5"
"@babel/plugin-transform-react-pure-annotations" "^7.22.5"

"@babel/preset-typescript@^7.22.11":
version "7.22.11"
Expand Down Expand Up @@ -920,7 +920,7 @@
debug "^4.1.0"
globals "^11.1.0"

"@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.20.5", "@babel/types@^7.20.7", "@babel/types@^7.22.15", "@babel/types@^7.22.4", "@babel/types@^7.22.5", "@babel/types@^7.23.0", "@babel/types@^7.4.4":
"@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.20.5", "@babel/types@^7.22.15", "@babel/types@^7.22.4", "@babel/types@^7.22.5", "@babel/types@^7.23.0", "@babel/types@^7.4.4":
version "7.23.0"
resolved "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz"
dependencies:
Expand Down Expand Up @@ -7548,4 +7548,4 @@ yaml@^1.10.0:

yargs-parser@^20.2.1, yargs-parser@^20.2.3:
version "20.2.9"
resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz"
resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz"

0 comments on commit c92c717

Please sign in to comment.