diff --git a/webapp/src/lib/components/MarkdownRenderer.svelte b/webapp/src/lib/components/MarkdownRenderer.svelte index 34e747c..0f3f6a1 100644 --- a/webapp/src/lib/components/MarkdownRenderer.svelte +++ b/webapp/src/lib/components/MarkdownRenderer.svelte @@ -15,20 +15,30 @@ import ListItem from '$lib/marked/renderers/ListItem.svelte'; export let plaintext: string; + let ref: HTMLDivElement; // @ts-ignore: typing mismatch marked.use({ extensions: extensions }); const options = { ...marked.defaults, breaks: true }; + + function setTitle() { + const res = ref.querySelector('h1'); + if (res) { + document.title = res.innerText; + } + }
+ class="whitespace-pre-line text-black dark:text-white bg-zinc-100 dark:bg-zinc-900 py-3 px-6 border dark:border-zinc-700 mt-4"> diff --git a/webapp/src/routes/note/[id].svelte b/webapp/src/routes/note/[id].svelte index bc93ea2..bd11e9d 100644 --- a/webapp/src/routes/note/[id].svelte +++ b/webapp/src/routes/note/[id].svelte @@ -70,6 +70,13 @@ } + + {import.meta.env.VITE_BRANDING} | Shared note + {#if decryptFailed} + {import.meta.env.VITE_BRANDING} | Error decrypting note + {/if} + + {#if plaintext}