feat: add markdown help on edit page rather than linking out

This commit is contained in:
Sam 2023-04-03 23:49:02 +02:00
parent 033b9b5904
commit 634530ba06
Signed by: sam
GPG key ID: B4EF20DDE721CAA1
3 changed files with 53 additions and 15 deletions

View file

@ -39,6 +39,7 @@
import { addToast, delToast } from "$lib/toast";
import { memberNameRegex } from "$lib/api/regex";
import { charCount, renderMarkdown } from "$lib/utils";
import MarkdownHelp from "../../MarkdownHelp.svelte";
const MAX_AVATAR_BYTES = 1_000_000;
@ -397,6 +398,7 @@
static.
</p>
<p>
<!-- svelte-ignore a11y-invalid-attribute -->
<a href="" on:click={() => (avatar = "")}>Remove avatar</a>
</p>
</div>
@ -448,15 +450,8 @@
Using {charCount(bio)}/{MAX_DESCRIPTION_LENGTH} characters
</p>
<p class="text-muted my-2">
<Icon name="info-circle-fill" aria-hidden /> Your bio supports limited
<a
class="text-reset"
href="https://commonmark.org/help/"
target="_blank"
rel="noopener noreferrer">Markdown</a
>.
<MarkdownHelp />
</p>
<hr />
{#if bio}
<hr />
<Card>