diff --git a/frontend/src/routes/@[username]/+page.svelte b/frontend/src/routes/@[username]/+page.svelte index 05098ad..5652414 100644 --- a/frontend/src/routes/@[username]/+page.svelte +++ b/frontend/src/routes/@[username]/+page.svelte @@ -11,7 +11,7 @@ import PartialMemberCard from "$lib/components/PartialMemberCard.svelte"; import FallbackImage from "$lib/components/FallbackImage.svelte"; import { userStore } from "$lib/store"; - import { pronounDisplay, userAvatars, WordStatus } from "$lib/api/entities"; + import { pronounDisplay, userAvatars, WordStatus, type Member } from "$lib/api/entities"; import { PUBLIC_BASE_URL } from "$env/static/public"; export let data: PageData; @@ -19,50 +19,14 @@ let bio: string | null; $: bio = data.bio ? sanitizeHtml(marked.parse(data.bio)) : null; + let memberPage: number = 0; + let memberSlice: Member[] = []; + $: member = data.members.slice(memberPage * 20, memberPage + 1 * 20); + const favNames = data.names.filter((entry) => entry.status === WordStatus.Favourite); const favPronouns = data.pronouns.filter((entry) => entry.status === WordStatus.Favourite); - - @{data.name} - pronouns.cc - - - - - {#if data.avatar} - - {/if} - - {#if favNames.length !== 0 && favPronouns.length !== 0} - - {:else if favNames.length !== 0} - - {:else if favPronouns.length !== 0} - - {:else if data.bio && data.bio !== ""} - - {:else} - - {/if} - -
{#if $userStore && $userStore.id === data.id} @@ -102,8 +66,8 @@
{#if data.names.length > 0}
-

Names

-
    +

    Names

    +
      {#each data.names as name}
    • {name.value}
    • {/each} @@ -112,8 +76,8 @@ {/if} {#if data.pronouns.length > 0}
      -

      Pronouns

      -
        +

        Pronouns

        +
          {#each data.pronouns as pronouns}
        • @@ -144,3 +108,43 @@ {/if}
+ + + @{data.name} - pronouns.cc + + + + + {#if data.avatar} + + {/if} + + {#if favNames.length !== 0 && favPronouns.length !== 0} + + {:else if favNames.length !== 0} + + {:else if favPronouns.length !== 0} + + {:else if data.bio && data.bio !== ""} + + {:else} + + {/if} + diff --git a/frontend/src/routes/@[username]/[memberName]/+page.svelte b/frontend/src/routes/@[username]/[memberName]/+page.svelte index 2e4f35d..56bdaac 100644 --- a/frontend/src/routes/@[username]/[memberName]/+page.svelte +++ b/frontend/src/routes/@[username]/[memberName]/+page.svelte @@ -21,6 +21,68 @@ const favPronouns = data.pronouns.filter((entry) => entry.status === WordStatus.Favourite); +
+
+ +
+
+
+
+ +
+
+

{data.display_name ?? data.name}

+
{data.name} (@{data.user.name})
+ {#if bio} +
+

{@html bio}

+ {/if} +
+ {#if data.links.length > 0} +
+
    + {#each data.links as link} +
  • {link}
  • + {/each} +
+
+ {/if} +
+
+ {#if data.names.length > 0} +
+

Names

+
    + {#each data.names as name} +
  • {name.value}
  • + {/each} +
+
+ {/if} + {#if data.pronouns.length > 0} +
+

Pronouns

+
    + {#each data.pronouns as pronouns} +
  • + + +
  • + {/each} +
+
+ {/if} + {#each data.fields as field} +
+ +
+ {/each} +
+
+
+ {data.display_name ?? data.name} - @{data.user.name} - pronouns.cc @@ -62,65 +124,3 @@ {/if} - -
-
- -
-
-
-
- -
-
-

{data.display_name ?? data.name}

-
{data.name} (@{data.user.name})
- {#if bio} -
-

{@html bio}

- {/if} -
- {#if data.links.length > 0} -
-
    - {#each data.links as link} -
  • {link}
  • - {/each} -
-
- {/if} -
-
- {#if data.names.length > 0} -
-

Names

-
    - {#each data.names as name} -
  • {name.value}
  • - {/each} -
-
- {/if} - {#if data.pronouns.length > 0} -
-

Pronouns

-
    - {#each data.pronouns as pronouns} -
  • - - -
  • - {/each} -
-
- {/if} - {#each data.fields as field} -
- -
- {/each} -
-
-