Skip to content

Commit

Permalink
finished slides up to 6 (final)
Browse files Browse the repository at this point in the history
  • Loading branch information
CasLinden committed Jun 3, 2023
1 parent a729b47 commit 7666b9e
Show file tree
Hide file tree
Showing 18 changed files with 171 additions and 55 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 10 additions & 10 deletions dist/assets/index-6b9a7c50.js → dist/assets/index-5be04d78.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion dist/assets/index-b525d6a9.css

This file was deleted.

1 change: 1 addition & 0 deletions dist/assets/index-b90ebbde.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
/>

<title>yamanote-line</title>
<script type="module" crossorigin src="/yamanote-line/assets/index-6b9a7c50.js"></script>
<link rel="stylesheet" href="/yamanote-line/assets/index-b525d6a9.css">
<script type="module" crossorigin src="/yamanote-line/assets/index-5be04d78.js"></script>
<link rel="stylesheet" href="/yamanote-line/assets/index-b90ebbde.css">
</head>
<body>
<div id="root"></div>
Expand Down
4 changes: 2 additions & 2 deletions src/assets/arrow-right.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 6 additions & 4 deletions src/components/GameInstructions/GameInstructions.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { useState } from "react";
import SlideZero from "/src/components/GameInstructions/slides/SlideZero";
import SlideOne from "/src/components/GameInstructions/slides/SlideOne.jsx";
import SlideTwo from "/src/components/GameInstructions/slides/SlideTwo.jsx";
import SlideThree from "/src/components/GameInstructions/slides/SlideThree.jsx";
import SlideFour from "/src/components/GameInstructions/slides/SlideFour.jsx";
import SlideFive from "/src/components/GameInstructions/slides/SlideFive.jsx";
import SlideSix from "/src/components/GameInstructions/slides/SlideSix.jsx"
import PrevSlideBtn from "/src/components/GameInstructions/slide-components/PrevSlideBtn";
import NextSlideBtn from "/src/components/GameInstructions/slide-components/NextSlideBtn";
import extraSlideAnimations from "/src/utils/extraSlideAnimations";
Expand All @@ -14,7 +16,7 @@ function GameInstructions() {
const [slideContainerPosition, setSlideContainerPosition] = useState(0);
const [slideIndex, setSlideIndex] = useState(0);

const slideMovements = [160, 0, 0, 320, 320];
const slideMovements = [320, 160, 0, 0, 320, 320, 320]; //px values

const slideIn = (direction) => { // direction: 1 for forward, -1 for backward
if (direction < 0 && slideIndex <= 0) return;
Expand All @@ -27,17 +29,17 @@ function GameInstructions() {
console.log("slideindex", slideIndex)
};


return (
<div className="game-instructions">
<div className="projector-screen">
<div className="slide-container" style={{ left: `${slideContainerPosition}px`}}>
<SlideOne /><SlideTwo /><SlideThree /><SlideFour /><SlideFive />
<SlideZero /><SlideOne /><SlideTwo /><SlideThree /><SlideFour /><SlideFive /><SlideSix />
</div>
</div>
<div className="slide-controls">
{slideContainerPosition === 0 && <NextSlideBtn slideIn={() => slideIn(1)} text="SHOW ME HOW"></NextSlideBtn>}
{slideContainerPosition < 0 && <PrevSlideBtn slideIn={() => slideIn(-1)} />}
<NextSlideBtn slideIn={() => slideIn(1)}></NextSlideBtn>
{slideContainerPosition < 0 && slideIndex < 6 && <NextSlideBtn slideIn={() => slideIn(1)} text="GOT IT"></NextSlideBtn>}
</div>
</div>
);
Expand Down
Loading

0 comments on commit 7666b9e

Please sign in to comment.