Skip to content

Commit 4408b4f

Browse files
committed
chore: update example
1 parent e1a4d8b commit 4408b4f

5 files changed

Lines changed: 34 additions & 4 deletions

File tree

packages/scratch-gui/src/components/cards/cards.jsx

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,14 +192,22 @@ const renderSimpleMarkdown = text => {
192192
});
193193
};
194194

195-
const TextStep = ({title, text, image}) => (<Fragment>
195+
const TextStep = ({title, text, image, video}) => (<Fragment>
196196
<div className={styles.stepTitle}>
197197
{title}
198198
</div>
199199
<div className={styles.stepText}>
200200
{renderSimpleMarkdown(text)}
201201
</div>
202-
{image ? (
202+
{video ? (
203+
<div className={styles.stepVideo}>
204+
<video
205+
controls
206+
style={{width: '466px', maxHeight: '257px'}}
207+
src={video}
208+
/>
209+
</div>
210+
) : image ? (
203211
<div className={styles.stepImageContainer}>
204212
<img
205213
className={styles.stepImage}
@@ -214,7 +222,8 @@ const TextStep = ({title, text, image}) => (<Fragment>
214222
TextStep.propTypes = {
215223
image: PropTypes.string,
216224
text: PropTypes.string.isRequired,
217-
title: PropTypes.node.isRequired
225+
title: PropTypes.node.isRequired,
226+
video: PropTypes.string
218227
};
219228

220229
const VideoUrlStep = ({title, video}) => (<Fragment>
@@ -495,6 +504,7 @@ const Cards = props => {
495504
image={steps[step].image}
496505
text={steps[step].text}
497506
title={steps[step].title}
507+
video={steps[step].video}
498508
/>
499509
) :
500510
steps[step].video ? (
-475 Bytes
Binary file not shown.

packages/scratch-gui/static/kenny-fish/project.json

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,26 @@
11
{
2-
"title": "Kenny Fish",
2+
"title": "Skript kopieren",
33
"sb3": "fish.sb3",
4+
"steps": [
5+
{
6+
"title": "Grüne Flagge drücken",
7+
"text": "Drücke die grüne Flagge, um das Projekt zu starten. Fällt dir etwas auf? Der braune und der blaue Fisch schwimmen hin und her, aber der grüne Fisch bewegt sich nicht!",
8+
"video": "steps/green_flag.mp4"
9+
},
10+
{
11+
"title": "Skript kopieren",
12+
"text": "Klicke auf den braunen Fisch (Fish Brown), um seine Figur auszuwählen. Du siehst sein Skript im Skriptbereich. Ziehe das gesamte Skript mit der rechten Maustaste und wähle \"Kopieren nach Fish Green\", um es zum grünen Fisch zu kopieren.",
13+
"video": "steps/copy.mp4"
14+
},
15+
{
16+
"title": "Skript anpassen",
17+
"text": "Klicke nun auf den grünen Fisch (Fish Green), um seine Figur auszuwählen. Du siehst jetzt das kopierte Skript. Ändere die Zahl im Block \"gehe () er Schritt\", zum Beispiel auf 2, damit der grüne Fisch sich schneller bewegt als die anderen."
18+
},
19+
{
20+
"title": "Ergebnis testen",
21+
"text": "Drücke die grüne Flagge erneut. Jetzt sollten alle drei Fische schwimmen – der grüne Fisch bewegt sich mit einer anderen Geschwindigkeit!"
22+
}
23+
],
424
"backdrops": {
525
"showBuiltin": false,
626
"library": [
557 KB
Binary file not shown.
119 KB
Binary file not shown.

0 commit comments

Comments
 (0)