mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-24 05:05:20 -04:00
(pronouns) show slashes short on pronoun list for nameself and emojiself
This commit is contained in:
parent
1fedcb3fa9
commit
bbc5549184
@ -12,19 +12,15 @@ const config = useConfig();
|
||||
|
||||
const visiblePronouns = computed(() => {
|
||||
return props.pronouns
|
||||
.map((pronoun): { pronoun: Pronoun, display?: string } | undefined => {
|
||||
.map((pronoun): Pronoun | undefined => {
|
||||
if (typeof pronoun === 'string') {
|
||||
const parsed = buildPronoun(pronounsData, pronoun, config, translator);
|
||||
if (parsed) {
|
||||
parsed.description = '';
|
||||
if (pronoun.includes('&')) {
|
||||
return { pronoun: parsed };
|
||||
} else {
|
||||
return { pronoun: parsed, display: pronoun };
|
||||
}
|
||||
return parsed;
|
||||
}
|
||||
} else if (!pronoun.hidden) {
|
||||
return { pronoun };
|
||||
return pronoun;
|
||||
}
|
||||
})
|
||||
.filter((entry) => entry !== undefined);
|
||||
@ -39,10 +35,9 @@ const addSlash = (link: string): string => {
|
||||
|
||||
<template>
|
||||
<ul>
|
||||
<li v-for="{ pronoun, display } in visiblePronouns" :key="pronoun.canonicalName">
|
||||
<li v-for="pronoun in visiblePronouns" :key="pronoun.canonicalName">
|
||||
<nuxt-link :to="addSlash(`${config.pronouns.prefix || ''}/${pronoun.canonicalName}`)">
|
||||
<strong v-if="display">{{ display }}</strong>
|
||||
<strong v-else><Spelling :text="pronoun.name(glue)" /></strong><small v-if="pronoun.smallForm">/<Spelling :text="pronoun.morphemes[pronoun.smallForm] ?? undefined" /></small>
|
||||
<strong><Spelling :text="pronoun.name(glue)" /></strong><small v-if="pronoun.smallForm">/<Spelling :text="pronoun.morphemes[pronoun.smallForm] ?? undefined" /></small>
|
||||
<template v-if="pronoun.description">
|
||||
–
|
||||
<small><Spelling :text="pronoun.description as string" /></small>
|
||||
|
Loading…
x
Reference in New Issue
Block a user