diff --git a/src/components/objects/Problem.svelte b/src/components/objects/Problem.svelte
index b0ec1b4..2b845c8 100644
--- a/src/components/objects/Problem.svelte
+++ b/src/components/objects/Problem.svelte
@@ -1,21 +1,26 @@
+ export let problem:Problem;
+ export let depth:number;
+
+ $: depthColor = getDepthColor(depth)
+
+ let openState: boolean
+ $: focusProblem = openState ? "problem focus-problem" : "problem"
-
+
+
- {problem.Title}
- {#if problem.Summary}{problem.Summary}
{/if}
+ {problem.Title}
+ {#if problem.Summary}{problem.Summary}
{/if}
- {#if problem.FullText}{problem.FullText}
{/if}
+ {#if problem.FullText}{problem.FullText}
{/if}
{#if problem.Children}
@@ -24,4 +29,62 @@ $: border = depth > 0 ? "dotted purple" : "dotted purple"
{/if}
{/each}
-{/if}
\ No newline at end of file
+{/if}
+
+
diff --git a/src/lib/helpers/ProblemDepthColor.ts b/src/lib/helpers/ProblemDepthColor.ts
new file mode 100644
index 0000000..5b6ae7d
--- /dev/null
+++ b/src/lib/helpers/ProblemDepthColor.ts
@@ -0,0 +1,31 @@
+const color = [82, 255, 255] // starting color for problem border
+const colorIncrement = 70
+
+// write a function where the color depends on the depth according to this formula:
+// the initial color is rgb(82, 255, 255)
+// as the depth increases, g is decremented by 0x0F until it reaches a minimum of 82
+// then r is decremented by 0x0F until it reaches a maximum of 255
+// then b is decremented by 0x0F until it reaches a minimum of 82
+export const getDepthColor = (depth: number): string => {
+ let [r, g, b] = color;
+
+ // decrement g until it reaches a minimum of 82
+ while (depth > 0 && g > 82) {
+ g -= colorIncrement;
+ depth--;
+ }
+
+ // decrement r until it reaches a maximum of 255
+ while (depth > 0 && r < 255) {
+ r += colorIncrement;
+ depth--;
+ }
+
+ // decrement b until it reaches a minimum of 82
+ while (depth > 0 && b > 82) {
+ b -= colorIncrement;
+ depth--;
+ }
+
+ return `rgb(${r}, ${g}, ${b})`;
+}
\ No newline at end of file
diff --git a/src/routes/styles.css b/src/routes/styles.css
index beb03b6..c2b441c 100644
--- a/src/routes/styles.css
+++ b/src/routes/styles.css
@@ -7,3 +7,7 @@
width: 100%;
height: 100%;
}
+
+html {
+ overflow-x: hidden;
+}
\ No newline at end of file