From 0a4a1ab30c7a4b40ae6afec025e13bf6780f092c Mon Sep 17 00:00:00 2001 From: Tobias Berger Date: Mon, 27 Sep 2021 13:27:14 +0200 Subject: [PATCH] Add Resource Table --- src/components/ResourceTable.svelte | 151 +++++++++++++++++++++++++++- 1 file changed, 150 insertions(+), 1 deletion(-) diff --git a/src/components/ResourceTable.svelte b/src/components/ResourceTable.svelte index ea68458..40472c5 100644 --- a/src/components/ResourceTable.svelte +++ b/src/components/ResourceTable.svelte @@ -1,8 +1,157 @@ -
Resource Table goes here
+ + +
+ + + + + + + + + {#each grouped as [categoryName, resources]} + toggleCollapsed(categoryName)} + class="subhead" + tabindex="0" + role="button" + > + + + + {#if !collapsed.includes(categoryName)} + {#each resources as [resourceName, resource], index} + + + + + + {/each} + {/if} + {/each} + +
{collapsed.includes(categoryName) ? "▲" : "▼"}

{categoryName}

{resourceName}{resource.amount}{Math.round(100 * resource.change) / 100}/s
+