add new sveltekit frontend
This commit is contained in:
commit
fc4334932a
40 changed files with 3802 additions and 0 deletions
16
frontend/src/lib/components/PronounLink.svelte
Normal file
16
frontend/src/lib/components/PronounLink.svelte
Normal file
|
@ -0,0 +1,16 @@
|
|||
<script lang="ts">
|
||||
import type { Pronoun } from "$lib/api/entities";
|
||||
|
||||
export let pronouns: Pronoun;
|
||||
|
||||
let pronounText: string;
|
||||
if (pronouns.display_text) {
|
||||
pronounText = pronouns.display_text;
|
||||
} else {
|
||||
const split = pronouns.pronouns.split("/");
|
||||
if (split.length < 2) pronounText = split.join("/");
|
||||
else pronounText = split.slice(0, 2).join("/")
|
||||
}
|
||||
</script>
|
||||
|
||||
<a href="/pronouns/{pronouns.pronouns}">{pronounText}</a>
|
Loading…
Add table
Add a link
Reference in a new issue