}
diff --git a/client/src/components/level.css b/client/src/components/level.css
index 862b1bf..fd6579f 100644
--- a/client/src/components/level.css
+++ b/client/src/components/level.css
@@ -26,6 +26,7 @@
.inventory-panel, .exercise-panel, .doc-panel, .introduction-panel {
height: 100%;
+ width: 100%;
overflow: auto;
position: relative;
}
diff --git a/client/src/components/level.tsx b/client/src/components/level.tsx
index 22c16ca..406f92f 100644
--- a/client/src/components/level.tsx
+++ b/client/src/components/level.tsx
@@ -392,10 +392,9 @@ function IntroductionPanel({gameInfo, impressum, closeImpressum}) {
return
- {text?.map((t =>
- t.trim() ?
-
- : <>>
+ {text?.filter(t => t.trim()).map(((t, i) =>
+
))}
{impressum ? : null}
diff --git a/client/src/components/welcome.css b/client/src/components/welcome.css
index 84fee15..94e17e3 100644
--- a/client/src/components/welcome.css
+++ b/client/src/components/welcome.css
@@ -58,59 +58,6 @@ h5, h6 {
font-style: italic;
}
-/***************/
-/* SVG Graphic */
-/***************/
-
-svg .world-title-wrapper, svg .level-title-wrapper div {
- overflow: visible;
-}
-
-svg .world-title-wrapper div, svg .level-title-wrapper div {
- width: 100%;
- height: 100%;
-}
-
-svg .world-title-wrapper div, svg .level-title-wrapper div {
- display: flex;
- align-items:center;
- justify-content:center;
- overflow: visible;
-
-}
-
-svg .world-title, svg .level-title {
- color: white;
- margin: 0;
- padding: 0;
- text-align: center;
-}
-
-svg .world-title {
- font-weight: 700;
-}
-
-svg .level-title {
- font-weight: 400;
- opacity: 0;
- transition: opacity .3s;
-}
-
-svg .level:hover .level-title {
- opacity: 1;
-}
-
-svg .disabled {
- cursor: default;
-}
-
-.world-selection {
- display: block;
- margin-left: auto;
- margin-right: auto;
- margin-top: 2em;
-}
-
/******************/
/* Privacy Button */
/******************/
diff --git a/client/src/components/welcome.tsx b/client/src/components/welcome.tsx
index 36c6f29..1fd637e 100644
--- a/client/src/components/welcome.tsx
+++ b/client/src/components/welcome.tsx
@@ -35,9 +35,11 @@ function IntroductionPanel({introduction}: {introduction: string}) {
return
- {text?.map((t =>
+ {text?.map(((t, i) =>
t.trim() ?
-
+
: <>>
))}
diff --git a/client/src/components/world_tree.css b/client/src/components/world_tree.css
index a327076..f343eed 100644
--- a/client/src/components/world_tree.css
+++ b/client/src/components/world_tree.css
@@ -1,3 +1,53 @@
+svg .world-title-wrapper, svg .level-title-wrapper div {
+ overflow: visible;
+}
+
+svg .world-title-wrapper div, svg .level-title-wrapper div {
+ width: 100%;
+ height: 100%;
+}
+
+svg .world-title-wrapper div, svg .level-title-wrapper div {
+ display: flex;
+ align-items:center;
+ justify-content:center;
+ overflow: visible;
+
+}
+
+svg .world-title, svg .level-title {
+ color: white;
+ margin: 0;
+ padding: 0;
+ text-align: center;
+}
+
+svg .world-title {
+ font-weight: 700;
+}
+
+svg .level-title {
+ font-weight: 400;
+ opacity: 0;
+ transition: opacity .3s;
+}
+
+svg .level:hover .level-title {
+ opacity: 1;
+}
+
+svg .disabled {
+ cursor: default;
+}
+
+.world-selection {
+ display: block;
+ margin-left: auto;
+ margin-right: auto;
+ margin-top: 2em;
+ max-width: 100%;
+}
+
.world-selection-menu {
padding: .5em 1em;
position: absolute;
diff --git a/client/src/components/world_tree.tsx b/client/src/components/world_tree.tsx
index 3e54ed8..93043a9 100644
--- a/client/src/components/world_tree.tsx
+++ b/client/src/components/world_tree.tsx
@@ -268,7 +268,7 @@ export function WorldTreePanel({worlds, worldSize}:
let elems = Array.from(document.getElementsByClassName("playable-world"))
if (elems.length) {
// it seems that the last element is the one furthest up in the tree
- // TODO: I think they appear in random order. Check there position and select the lowest one
+ // TODO: I think they appear in random order. Check their position and select the lowest one
// of these positions to scroll to.
let elem = elems[0]
console.debug(`scrolling to ${elem.textContent}`)
@@ -299,7 +299,8 @@ export function WorldTreePanel({worlds, worldSize}:
// if the origin world is not completed, mark the target world as non-playable
if (!sourceCompleted) {completed[edge[1]][0] = false}
svgElements.push(
-
+ ${edge[1]}`}
+ source={nodes[edge[0]]} target={nodes[edge[1]]} unlocked={sourceCompleted}/>
)
}
@@ -343,10 +344,9 @@ export function WorldTreePanel({worlds, worldSize}:
return