fix(frontend): fix meta tags

This commit is contained in:
Sam 2023-03-14 22:26:21 +01:00
parent dcf36465ea
commit c4d7acc3f6
No known key found for this signature in database
GPG Key ID: B4EF20DDE721CAA1
2 changed files with 9 additions and 7 deletions

View File

@ -234,7 +234,7 @@
{:else if data.bio && data.bio !== ""}
<meta
property="og:description"
content="{data.bio.slice(0, 500)}${data.bio.length > 500 ? '…' : ''}"
content="{data.bio.slice(0, 500)}{data.bio.length > 500 ? '…' : ''}"
/>
{:else}
<meta property="og:description" content="@{data.name} on pronouns.cc" />

View File

@ -109,24 +109,26 @@
{#if favNames.length !== 0 && favPronouns.length !== 0}
<meta
property="og:description"
content="{data.name} goes by {favNames.map((x) => x.value).join(', ')} and uses {favPronouns
.map((x) => pronounDisplay(x))
.join(', ')} pronouns."
content="{data.display_name ?? data.name} goes by {favNames
.map((x) => x.value)
.join(', ')} and uses {favPronouns.map((x) => pronounDisplay(x)).join(', ')} pronouns."
/>
{:else if favNames.length !== 0}
<meta
property="og:description"
content="{data.name} goes by {favNames.map((x) => x.value).join(', ')}."
content="{data.display_name ?? data.name} goes by {favNames.map((x) => x.value).join(', ')}."
/>
{:else if favPronouns.length !== 0}
<meta
property="og:description"
content="{data.name} uses {favPronouns.map((x) => pronounDisplay(x)).join(', ')} pronouns."
content="{data.display_name ?? data.name} uses {favPronouns
.map((x) => pronounDisplay(x))
.join(', ')} pronouns."
/>
{:else if data.bio && data.bio !== ""}
<meta
property="og:description"
content="{data.bio.slice(0, 500)}${data.bio.length > 500 ? '…' : ''}"
content="{data.bio.slice(0, 500)}{data.bio.length > 500 ? '…' : ''}"
/>
{:else}
<meta property="og:description" content="{data.name} (@{data.user.name}) on pronouns.cc" />