diff --git a/public/res/tour/riddle_1/result.svg b/public/res/tour/riddle_1/result.svg new file mode 100644 index 0000000..f1c31ab --- /dev/null +++ b/public/res/tour/riddle_1/result.svg @@ -0,0 +1,306 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/res/tour/riddle_1/story.svg b/public/res/tour/riddle_1/story.svg new file mode 100644 index 0000000..5b92f22 --- /dev/null +++ b/public/res/tour/riddle_1/story.svg @@ -0,0 +1,577 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/res/tour/riddle_2/result.svg b/public/res/tour/riddle_2/result.svg new file mode 100644 index 0000000..7356b58 --- /dev/null +++ b/public/res/tour/riddle_2/result.svg @@ -0,0 +1,795 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/res/tour/riddle_2/story.svg b/public/res/tour/riddle_2/story.svg new file mode 100644 index 0000000..a20e311 --- /dev/null +++ b/public/res/tour/riddle_2/story.svg @@ -0,0 +1,749 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/res/tour/riddle_3/story.svg b/public/res/tour/riddle_3/story.svg new file mode 100644 index 0000000..c32d0c3 --- /dev/null +++ b/public/res/tour/riddle_3/story.svg @@ -0,0 +1,332 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/res/tour/riddle_4/story.svg b/public/res/tour/riddle_4/story.svg new file mode 100644 index 0000000..b15b92f --- /dev/null +++ b/public/res/tour/riddle_4/story.svg @@ -0,0 +1,277 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/res/tour/riddle_5/story.svg b/public/res/tour/riddle_5/story.svg new file mode 100644 index 0000000..430ee54 --- /dev/null +++ b/public/res/tour/riddle_5/story.svg @@ -0,0 +1,651 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/res/tour/riddle_6/story.svg b/public/res/tour/riddle_6/story.svg new file mode 100644 index 0000000..39ec74d --- /dev/null +++ b/public/res/tour/riddle_6/story.svg @@ -0,0 +1,581 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/res/tour/riddle_7/story.svg b/public/res/tour/riddle_7/story.svg new file mode 100644 index 0000000..7ecad66 --- /dev/null +++ b/public/res/tour/riddle_7/story.svg @@ -0,0 +1,306 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/res/tour/riddle_8/story.svg b/public/res/tour/riddle_8/story.svg new file mode 100644 index 0000000..829d115 --- /dev/null +++ b/public/res/tour/riddle_8/story.svg @@ -0,0 +1,820 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/res/tour/riddle_9/story.svg b/public/res/tour/riddle_9/story.svg new file mode 100644 index 0000000..9345687 --- /dev/null +++ b/public/res/tour/riddle_9/story.svg @@ -0,0 +1,1320 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/components/RiddleScreen.tsx b/src/components/RiddleScreen.tsx index 497ae9c..2319811 100644 --- a/src/components/RiddleScreen.tsx +++ b/src/components/RiddleScreen.tsx @@ -2,6 +2,8 @@ import clsx from "clsx"; import styles from "@/css/RiddleScreen.module.css"; import StyledContainer from "./StyledContainer"; import OldButton from "./OldButton"; +import Riddle_1 from "./riddles/Riddle_1"; +import Riddle_2 from "./riddles/Riddle_2"; interface RiddleScreenProps { riddle: any; @@ -9,6 +11,20 @@ interface RiddleScreenProps { }; export default function RiddleScreen({ riddle, onDismiss }: RiddleScreenProps) { + console.log(riddle); + + const riddleComponents = { + "riddle_1": , + "riddle_2": , + "riddle_3": , + "riddle_4": , + "riddle_5": , + "riddle_6": , + "riddle_7": , + "riddle_8": , + "riddle_9": + }; + return (
Background
- alert("Sprech Funktion einfügen")} /> - alert("Hinweis Funktion einfügen")} /> + alert("Audio einfügen")} /> + alert("Error: Hinweis-Daten nicht geladen")} />
-

Station 1

-

Eine merkwürdige Frage

- -
-
-

Angekommen an den ersten Toren des Burggeländes, werdet ihr von einem Gelehrten angesprochen. Ihr konntet schon von weiter Weg beobachten, dass er jeden anspricht, der passieren will und sich dann etwas in seinem Buch notiert.

-

-

“Seid gegrüßt Fremde, ich nehme an ihr seid dem Ruf von Excalibur gefolgt? Ah ja, das dachte ich mir schon.. Bevor ich euch durchlassen kann, muss ich euch eine Frage stellen. Es gibt keine richtige Antwort und keine falsche. Wichtig ist, dass man eine Antwort findet. Nennt mir bitte danach eure Namen in der Reihenfolge, zuerst die Person mit der schnellsten Antwort und zuletzt der langsamste. Verstanden?

-

Angekommen an den ersten Toren des Burggeländes, werdet ihr von einem Gelehrten angesprochen. Ihr konntet schon von weiter Weg beobachten, dass er jeden anspricht, der passieren will und sich dann etwas in seinem Buch notiert.

-

-

“Seid gegrüßt Fremde, ich nehme an ihr seid dem Ruf von Excalibur gefolgt? Ah ja, das dachte ich mir schon.. Bevor ich euch durchlassen kann, muss ich euch eine Frage stellen. Es gibt keine richtige Antwort und keine falsche. Wichtig ist, dass man eine Antwort findet. Nennt mir bitte danach eure Namen in der Reihenfolge, zuerst die Person mit der schnellsten Antwort und zuletzt der langsamste. Verstanden?

-

Angekommen an den ersten Toren des Burggeländes, werdet ihr von einem Gelehrten angesprochen. Ihr konntet schon von weiter Weg beobachten, dass er jeden anspricht, der passieren will und sich dann etwas in seinem Buch notiert.

-

-

“Seid gegrüßt Fremde, ich nehme an ihr seid dem Ruf von Excalibur gefolgt? Ah ja, das dachte ich mir schon.. Bevor ich euch durchlassen kann, muss ich euch eine Frage stellen. Es gibt keine richtige Antwort und keine falsche. Wichtig ist, dass man eine Antwort findet. Nennt mir bitte danach eure Namen in der Reihenfolge, zuerst die Person mit der schnellsten Antwort und zuletzt der langsamste. Verstanden?

-

Angekommen an den ersten Toren des Burggeländes, werdet ihr von einem Gelehrten angesprochen. Ihr konntet schon von weiter Weg beobachten, dass er jeden anspricht, der passieren will und sich dann etwas in seinem Buch notiert.

-

-

“Seid gegrüßt Fremde, ich nehme an ihr seid dem Ruf von Excalibur gefolgt? Ah ja, das dachte ich mir schon.. Bevor ich euch durchlassen kann, muss ich euch eine Frage stellen. Es gibt keine richtige Antwort und keine falsche. Wichtig ist, dass man eine Antwort findet. Nennt mir bitte danach eure Namen in der Reihenfolge, zuerst die Person mit der schnellsten Antwort und zuletzt der langsamste. Verstanden?

-

Angekommen an den ersten Toren des Burggeländes, werdet ihr von einem Gelehrten angesprochen. Ihr konntet schon von weiter Weg beobachten, dass er jeden anspricht, der passieren will und sich dann etwas in seinem Buch notiert.

-

-

“Seid gegrüßt Fremde, ich nehme an ihr seid dem Ruf von Excalibur gefolgt? Ah ja, das dachte ich mir schon.. Bevor ich euch durchlassen kann, muss ich euch eine Frage stellen. Es gibt keine richtige Antwort und keine falsche. Wichtig ist, dass man eine Antwort findet. Nennt mir bitte danach eure Namen in der Reihenfolge, zuerst die Person mit der schnellsten Antwort und zuletzt der langsamste. Verstanden?

-
-
- alert("Funktion hier einfügen liebe KI")}>ZUR ANTWORTEINGABE +

{riddle["station_name"]}

+

{riddle["station_title"]}

+
+ {riddleComponents[riddle["id"]]}
diff --git a/src/components/riddles/Riddle_1.tsx b/src/components/riddles/Riddle_1.tsx new file mode 100644 index 0000000..b6a33f8 --- /dev/null +++ b/src/components/riddles/Riddle_1.tsx @@ -0,0 +1,143 @@ +import { useState } from "react"; +import OldButton from "../OldButton"; +import styles from "@/css/RiddleStyles.module.css"; +import { useLocalStorage } from "@/hooks/useLocalStorage"; +import { PREF } from "@/utils/const"; +import { Player } from "@/types/player"; +import OldTextInput from "../OldTextInput"; + +export default function Riddle_1() { + const [ playerCountStr, setPlayerCount ] = useLocalStorage(PREF.playerCount, ""); + const playerCount = Number.parseInt(playerCountStr) || 0; + + const [ nameScreen, setNameScreen ] = useState(0); + const [ enteredPlayers, setEnteredPlayers ] = useState([]); + const [ enteredAnswers, setEnteredAnswers ] = useState([]); + + const counterStrings = [ + "Erstes Abenteuermitglied", + "Zweites Abenteuermitglied", + "Drittes Abenteuermitglied", + "Viertes Abenteuermitglied", + "Fünftes Abenteuermitglied", + "Sechstes Abenteuermitglied", + "Siebtes Abenteuermitglied", + "Achtes Abenteuermitglied" + ]; + + const canGoNext = enteredPlayers[nameScreen] !== undefined && enteredPlayers[nameScreen]?.name?.length > 0 && enteredPlayers[nameScreen].gender !== undefined && enteredAnswers[nameScreen] !== undefined && enteredAnswers[nameScreen].length > 0; + const complete = false; + + console.log(enteredPlayers); + + const [ page, setPage ] = useState(1); + const pages = [ + ( +
+
+

An den ersten Toren des Burggeländes erwartet euch ein Gelehrter. Schon von Weitem konntet ihr beobachten, wie er jeden Reisenden anhält, einige Fragen stellt und anschließend sorgfältig etwas in ein großes Buch einträgt.

+

Als ihr näher kommt, mustert er euch aufmerksam, taucht seine Feder in die Tinte und begrüßt euch mit einem wissenden Lächeln: „Seid gegrüßt, Fremde. Dem Ruf von Excalibur gefolgt, nehme ich an? Ja, das dachte ich mir.“

+

Er schlägt eine freie Seite seines Buches auf. „Wer passieren will, muss sich hier eintragen lassen: Name, Anrede – und eine Antwort auf eine einzige Frage.“ Dann hebt er mahnend den Finger.

+

„Dabei gibt es weder eine richtige noch eine falsche Antwort. Ein künftiger Herrscher kann schließlich nicht darauf warten, bis ihm jemand sagt, welche Entscheidung richtig ist. Nennt mir danach eure Namen in der Reihenfolge, in der ihr eure Antwort gefunden habt – zuerst die schnellste Entscheidung, zuletzt die langsamste. Verstanden?“

+
+
+ setPage(1)}>ZUR ANTWORTEINGABE +
+
+ ), + ( +
+
+

Was schuldet ein Herr seinem Gesinde am allermeisten?

+

{counterStrings[nameScreen]}

+
+ + +
+
+

DEIN NAME:

+ { + const value = e.target.value; + const a = [...enteredPlayers]; + a[nameScreen] = { + id: nameScreen, + name: value, + gender: enteredPlayers[nameScreen]?.gender, + }; + setEnteredPlayers(a); + }} + style={{marginBottom: "1.5rem"}} + > +

DEINE ANTWORT:

+ { + const value = e.target.value; + const a = [...enteredAnswers]; + a[nameScreen] = value; + setEnteredAnswers(a); + }} + style={{marginBottom: "1.5rem"}} + > +
+
+ + +
+
+
+ { + setPage(2); + }} disabled={!complete}>EINREICHEN! + setPage(0)}>ZURÜCK +
+
+ ) + ]; + + return pages[page]; +} \ No newline at end of file diff --git a/src/components/riddles/Riddle_2.tsx b/src/components/riddles/Riddle_2.tsx new file mode 100644 index 0000000..34dac1a --- /dev/null +++ b/src/components/riddles/Riddle_2.tsx @@ -0,0 +1,17 @@ +import OldButton from "../OldButton"; +import styles from "@/css/RiddleStyles.module.css"; + +export default function Riddle_2() { + return ( +
+
+

Nun steht ihr vor ihm: Excalibur, dem Schwert des Artus. Kein Lied, keine Sage und kein Gemälde kann ganz auf den Augenblick vorbereiten, in dem die Legende plötzlich aus Stein und Stahl vor einem liegt.

+

Viele Hände haben nach diesem Schwert gegriffen – Ritter, Fürsten und Männer, die sich längst für Könige hielten. Doch der Fels gab es keinem von ihnen preis.

+

Jetzt seid ihr an der Reihe. Die Prophezeiung selbst bestimmt, wer vortreten darf, einer nach dem anderen, bis der Stahl seinen neuen Träger erkennt.

+
+
+ alert("Funktion hier einfügen liebe KI")}>ZUR ANTWORTEINGABE +
+
+ ) +} \ No newline at end of file diff --git a/src/components/screens/Tour.tsx b/src/components/screens/Tour.tsx index fffb71e..b279bf4 100644 --- a/src/components/screens/Tour.tsx +++ b/src/components/screens/Tour.tsx @@ -16,8 +16,8 @@ import OldPopUp from "../OldPopUp"; export default function Tour() { const [ stepStr, setStep ] = useLocalStorage(PREF.step, "0"); - const [ activeRiddle, setActiveRiddle ] = useState(null); - const [ clickedOnMarker, setClickedOnMarker ] = useState(false); + const [ activeRiddle, setActiveRiddle ] = useState("riddle_1"); + const [ clickedMarker, setClickedMarker ] = useState({id:"riddle_1"}); const [ tourCode, setTourCode ] = useLocalStorage(PREF.code, ""); const [ completedRiddlesStr, setCompletedRiddles ] = useLocalStorage(PREF.completed_riddles, ""); const [ playersStr, setPlayers ] = useLocalStorage(PREF.players, ""); @@ -30,6 +30,54 @@ export default function Tour() { const permissionsGranted = gpsStatus === "granted" && cameraStatus === "granted"; + const riddleData = { + "riddle_1": { + "id": "riddle_1", + "station_name": "Station 1", + "station_title": "Der Hüter des Tores" + }, + "riddle_2": { + "id": "riddle_2", + "station_name": "Station 2", + "station_title": "Das Schwert im Stein" + }, + "riddle_3": { + "id": "riddle_3", + "station_name": "Station 3", + "station_title": "Die Stimme des neuen Königs" + }, + "riddle_4": { + "id": "riddle_4", + "station_name": "Station 4", + "station_title": "Stimmen am Wegesrand" + }, + "riddle_5": { + "id": "riddle_5", + "station_name": "Station 5", + "station_title": "Jenseits der bekannten Wege" + }, + "riddle_6": { + "id": "riddle_6", + "station_name": "Station 6", + "station_title": "Die Prüfung der Stille" + }, + "riddle_7": { + "id": "riddle_7", + "station_name": "Station 7", + "station_title": "Lancelots Urteil" + }, + "riddle_8": { + "id": "riddle_8", + "station_name": "Station 8", + "station_title": "Merlins Prüfung" + }, + "riddle_9": { + "id": "riddle_9", + "station_name": "Station 9", + "station_title": "Die Tafelrunde" + } + }; + useEffect(() => { let timerId: string | number | NodeJS.Timeout | undefined; @@ -37,13 +85,71 @@ export default function Tour() { timerId = setTimeout(() => { navigator.geolocation.getCurrentPosition( (position) => { - setMarkers([{ - id: "riddle_one", - title: "Erstes Rätsel", - description: "Test Punkt verschoben vom Standort", - lng: position.coords.longitude + 0.002, - lat: position.coords.latitude, - }]); + setMarkers([ + { + id: "riddle_1", + title: "Erstes Rätsel", + description: "Test Punkt verschoben vom Standort", + lng: position.coords.longitude + 0.002, + lat: position.coords.latitude, + }, + { + id: "riddle_2", + title: "Zweites Rätsel", + description: "Test Punkt verschoben vom Standort", + lng: position.coords.longitude + 0.003, + lat: position.coords.latitude, + }, + { + id: "riddle_3", + title: "Drittes Rätsel", + description: "Test Punkt verschoben vom Standort", + lng: position.coords.longitude + 0.004, + lat: position.coords.latitude, + }, + { + id: "riddle_4", + title: "Viertes Rätsel", + description: "Test Punkt verschoben vom Standort", + lng: position.coords.longitude + 0.005, + lat: position.coords.latitude, + }, + { + id: "riddle_5", + title: "Fünftes Rätsel", + description: "Test Punkt verschoben vom Standort", + lng: position.coords.longitude + 0.006, + lat: position.coords.latitude, + }, + { + id: "riddle_6", + title: "Sechstes Rätsel", + description: "Test Punkt verschoben vom Standort", + lng: position.coords.longitude + 0.007, + lat: position.coords.latitude, + }, + { + id: "riddle_7", + title: "Siebtes Rätsel", + description: "Test Punkt verschoben vom Standort", + lng: position.coords.longitude + 0.008, + lat: position.coords.latitude, + }, + { + id: "riddle_8", + title: "Achtes Rätsel", + description: "Test Punkt verschoben vom Standort", + lng: position.coords.longitude + 0.009, + lat: position.coords.latitude, + }, + { + id: "riddle_9", + title: "Neuntes Rätsel", + description: "Test Punkt verschoben vom Standort", + lng: position.coords.longitude + 0.01, + lat: position.coords.latitude, + }, + ]); }, (error) => { requestPosition(); @@ -59,7 +165,7 @@ export default function Tour() { const _dismissFunc = () => { setActiveRiddle(null); - setClickedOnMarker(false); + setClickedMarker(null); }; const dismissFunc: MouseEventHandler = (e) => { @@ -100,30 +206,29 @@ export default function Tour() {
{ - if (marker.id === "riddle_one") { - setClickedOnMarker(true); - } + console.log(marker); + setClickedMarker(marker["id"]); }}>
-
+
{ activeRiddle === null ?
-

Station 1

-

Eine merkwürdige Frage

+

{riddleData[clickedMarker]?.["station_name"]}

+

{riddleData[clickedMarker]?.["station_title"]}

{ - setActiveRiddle("riddle_one"); + setActiveRiddle(clickedMarker); e.stopPropagation(); }} >STARTEN
: - + }
{ !permissionsGranted ? diff --git a/src/css/OldTextInput.module.css b/src/css/OldTextInput.module.css index 4f99ddc..c06f61d 100644 --- a/src/css/OldTextInput.module.css +++ b/src/css/OldTextInput.module.css @@ -15,7 +15,7 @@ padding: 1rem 2rem; font-size: 1.5rem; --color: #afb2a3; - color: white; + color: black; &::placeholder { color: var(--color); } diff --git a/src/css/RiddleScreen.module.css b/src/css/RiddleScreen.module.css index d7fc703..5b48c2b 100644 --- a/src/css/RiddleScreen.module.css +++ b/src/css/RiddleScreen.module.css @@ -35,21 +35,3 @@ text-align: center; margin-top: 2rem; } - -.buttons { - width: 100%; - display: flex; - flex-direction: column; - align-content: center; -} - -.content { - overflow: scroll; - max-height: 50dvh; -} - -@media screen and (height <= 768px) { - .content { - max-height: 40dvh; - } -} \ No newline at end of file diff --git a/src/css/RiddleStyles.module.css b/src/css/RiddleStyles.module.css new file mode 100644 index 0000000..8ac4361 --- /dev/null +++ b/src/css/RiddleStyles.module.css @@ -0,0 +1,20 @@ +.buttons { + width: 100%; + display: flex; + flex-direction: column; + align-content: center; +} + +.content { + overflow: scroll; + max-height: 50dvh; + p { + margin-bottom: 1rem; + } +} + +@media screen and (height <= 768px) { + .content { + max-height: 40dvh; + } +} diff --git a/src/utils/const.ts b/src/utils/const.ts index f44c79c..54e28b5 100644 --- a/src/utils/const.ts +++ b/src/utils/const.ts @@ -5,4 +5,5 @@ export enum PREF { completed_riddles = "PREF_COMPLETED_RIDDLES", step = "PREF_APP_SCREEN_STEP", playerCount = "PREF_PLAYER_COUNT", + worthyWords = "PREF_WORTHY_ANSWERS", }; \ No newline at end of file