Add legal information operation site

This commit is contained in:
thiloho
2024-09-08 16:42:32 +02:00
parent 9a8a333823
commit 8121be1d96
15 changed files with 542 additions and 8 deletions

View File

@@ -49,6 +49,9 @@
<li>
<a href="/website/{id}/collaborators">Collaborators</a>
</li>
<li>
<a href="/website/{id}/legal-information">Legal information</a>
</li>
<li>
<a href="/website/{id}/publish">Publish</a>
</li>

View File

@@ -50,4 +50,4 @@
</main>
{/if}
<Footer text={footerAdditionalText} />
<Footer text={footerAdditionalText} isIndexPage={false} />

View File

@@ -1,11 +1,14 @@
<script lang="ts">
const { text }: { text: string } = $props();
const { text, isIndexPage = true }: { text: string; isIndexPage?: boolean } = $props();
</script>
<footer>
<div class="container">
<small>
{@html text}
{@html text.replace(
"!!legal",
`<a href="${isIndexPage ? "./legal-information" : "../legal-information"}">Legal information</a>`
)}
</small>
</div>
</footer>

View File

@@ -42,4 +42,4 @@
</main>
{/if}
<Footer text={footerAdditionalText} />
<Footer text={footerAdditionalText} isIndexPage={false} />

View File

@@ -150,7 +150,7 @@ export const md = (markdownContent: string, showToc = true) => {
};
export const handleImagePaste = async (event: ClipboardEvent, API_BASE_PREFIX: string) => {
const clipboardItems = Array.from(event.clipboardData?.items || []);
const clipboardItems = Array.from(event.clipboardData?.items ?? []);
const file = clipboardItems.find((item) => item.type.startsWith("image/"));
if (!file) return null;