From eb3e5e5ade5fbdddea5732aff3f8fd65f58011f1 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Sat, 22 Apr 2023 21:06:32 +0100 Subject: [PATCH] Adds components for showing Docker stats and markdown docs --- src/lib/DockerStats.svelte | 77 ++++++++++++++++++++++++++++++++++ src/lib/MdContent.svelte | 85 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 162 insertions(+) create mode 100644 src/lib/DockerStats.svelte create mode 100644 src/lib/MdContent.svelte diff --git a/src/lib/DockerStats.svelte b/src/lib/DockerStats.svelte new file mode 100644 index 0000000..7825f88 --- /dev/null +++ b/src/lib/DockerStats.svelte @@ -0,0 +1,77 @@ + + + +
+ {#each makeRenderData() as stat} +
+ {stat.label}: + {stat.value} +
+ {/each} +
+ + \ No newline at end of file diff --git a/src/lib/MdContent.svelte b/src/lib/MdContent.svelte new file mode 100644 index 0000000..2a7629f --- /dev/null +++ b/src/lib/MdContent.svelte @@ -0,0 +1,85 @@ + + +
+

Container Documentation

+ {#if content} + + {#if showDocs} +

{@html snarkdown(content)}

+ {/if} + + {:else if multiContent && multiContent.length > 0} + {#each multiContent as { name, description, content, visible }} +

{name} Documentation

+

{description || ''}

+ + {#if visible} +

{@html snarkdown(content)}

+ {/if} + {/each} + {/if} +
+ + \ No newline at end of file