From 704a2c43d01a4a8c954f6405b88a7d537fe0063c Mon Sep 17 00:00:00 2001 From: Maxime Cannoodt Date: Mon, 4 Jul 2022 21:21:55 +0200 Subject: [PATCH] more page titles --- webapp/src/lib/components/MarkdownRenderer.svelte | 3 +++ webapp/src/routes/__layout.svelte | 4 ++++ webapp/src/routes/about.svelte | 6 +++++- webapp/src/routes/index.svelte | 15 ++++++++++++++- webapp/src/routes/install.svelte | 6 +++++- 5 files changed, 31 insertions(+), 3 deletions(-) diff --git a/webapp/src/lib/components/MarkdownRenderer.svelte b/webapp/src/lib/components/MarkdownRenderer.svelte index f169705..66ce942 100644 --- a/webapp/src/lib/components/MarkdownRenderer.svelte +++ b/webapp/src/lib/components/MarkdownRenderer.svelte @@ -22,6 +22,9 @@ const options = { ...marked.defaults, breaks: true }; + /** + * Searches for the first major header in the document to use as page title. + */ function setTitle() { const tags = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6']; for (const tag of tags) { diff --git a/webapp/src/routes/__layout.svelte b/webapp/src/routes/__layout.svelte index b6f318e..10704a0 100644 --- a/webapp/src/routes/__layout.svelte +++ b/webapp/src/routes/__layout.svelte @@ -29,6 +29,10 @@ } + + {import.meta.env.VITE_BRANDING} + +
diff --git a/webapp/src/routes/about.svelte b/webapp/src/routes/about.svelte index f793e6a..6ce6802 100644 --- a/webapp/src/routes/about.svelte +++ b/webapp/src/routes/about.svelte @@ -1,4 +1,8 @@ -
+ + About | {import.meta.env.VITE_BRANDING} + + +

About

diff --git a/webapp/src/routes/index.svelte b/webapp/src/routes/index.svelte index f6a6079..4d963e7 100644 --- a/webapp/src/routes/index.svelte +++ b/webapp/src/routes/index.svelte @@ -1 +1,14 @@ -

Homepage.

+ + {import.meta.env.VITE_BRANDING} | Create share links for Obsidian in one click + + +
+

{import.meta.env.VITE_BRANDING}

+

+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut + labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco + laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in + voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat + non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. +

+
diff --git a/webapp/src/routes/install.svelte b/webapp/src/routes/install.svelte index 21224c3..f8d6cf8 100644 --- a/webapp/src/routes/install.svelte +++ b/webapp/src/routes/install.svelte @@ -1,4 +1,8 @@ -
+ + Get the plugin | {import.meta.env.VITE_BRANDING} + + +

Installing the plugin