From 3b42fa902d8b8dad4ac2cadb483643252272576d Mon Sep 17 00:00:00 2001 From: Stan Runge Date: Mon, 24 Feb 2025 22:24:33 +0100 Subject: [PATCH] add mobile view --- packages/web/src/routes/progress/+page.svelte | 122 ++++++++++++------ 1 file changed, 84 insertions(+), 38 deletions(-) diff --git a/packages/web/src/routes/progress/+page.svelte b/packages/web/src/routes/progress/+page.svelte index a33469d..73ced57 100755 --- a/packages/web/src/routes/progress/+page.svelte +++ b/packages/web/src/routes/progress/+page.svelte @@ -28,53 +28,99 @@ {#if data.tasks.length > 0}
- - - - - - - - - - {#each data.tasks as task, index} - - - - - - + +
+
+ + {task.currentPoints} / {task.totalPoints} ({( + (task.currentPoints / task.totalPoints) * + 100 + ).toFixed(1)}%) + +
+
{/each} - -
NameTopicsProgress
- - {task.name} - - - + {#if data.tasks.length > 0} + + + + +
+ {#each data.tasks as task} +
+ + {task.name} + +
+
+ Topics: +
{#each task.tasksToTopics as topic}
{topic.topic.name}
{/each} - -
-
-
- - {task.currentPoints} / {task.totalPoints} ({( - (task.currentPoints / task.totalPoints) * - 100 - ).toFixed(1)}%) -
-
+
+ {:else} +

No tasks available. Click "Create" to add a new task.

+ {/if} {:else}

No tasks available. Click "Create" to add a new task.