diff --git a/web/App.svelte b/web/App.svelte index d8c5c21..3aa5121 100644 --- a/web/App.svelte +++ b/web/App.svelte @@ -13,13 +13,13 @@ contentType = res.headers.get("Content-Type"); - let m; - while ((m = regex.exec(res.headers.get("Content-Disposition"))) !== null) { + let match; + while ((match = regex.exec(res.headers.get("Content-Disposition"))) !== null) { // This is necessary to avoid infinite loops with zero-width matches - if (m.index === regex.lastIndex) { + if (match.index === regex.lastIndex) { regex.lastIndex++; } - filename = m[1]; + filename = match[1]; } document.title = filename; @@ -29,19 +29,24 @@
-
{slug}
-
- {#if component === null} + {#if component === null} + Loading data... + {:else} + {#await component} Loading data... - {:else} - {#await component} - Loading data... - {:then v } - - {/await} - {/if} -
+ {:then v } + + {/await} + {/if}
diff --git a/web/index.css b/web/index.css new file mode 100644 index 0000000..c935256 --- /dev/null +++ b/web/index.css @@ -0,0 +1,4 @@ +body { + background-color: #0d1117; + font-family: sans-serif; +} \ No newline at end of file diff --git a/web/main.ts b/web/main.ts index 83e5976..cd53a6b 100644 --- a/web/main.ts +++ b/web/main.ts @@ -1,4 +1,5 @@ import App from "./App.svelte"; +import "./index.css"; const app = new App({ target: document.body, diff --git a/web/opener/Text.svelte b/web/opener/Text.svelte index e355703..eeca54a 100644 --- a/web/opener/Text.svelte +++ b/web/opener/Text.svelte @@ -12,7 +12,35 @@ import { onMount } from "svelte"; }); -
- Text opener +
+
{filename}
{ content }
+ + \ No newline at end of file