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(() => {
|
const visiblePronouns = computed(() => {
|
||||||
return props.pronouns
|
return props.pronouns
|
||||||
.map((pronoun): { pronoun: Pronoun, display?: string } | undefined => {
|
.map((pronoun): Pronoun | undefined => {
|
||||||
if (typeof pronoun === 'string') {
|
if (typeof pronoun === 'string') {
|
||||||
const parsed = buildPronoun(pronounsData, pronoun, config, translator);
|
const parsed = buildPronoun(pronounsData, pronoun, config, translator);
|
||||||
if (parsed) {
|
if (parsed) {
|
||||||
parsed.description = '';
|
parsed.description = '';
|
||||||
if (pronoun.includes('&')) {
|
return parsed;
|
||||||
return { pronoun: parsed };
|
|
||||||
} else {
|
|
||||||
return { pronoun: parsed, display: pronoun };
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else if (!pronoun.hidden) {
|
} else if (!pronoun.hidden) {
|
||||||
return { pronoun };
|
return pronoun;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.filter((entry) => entry !== undefined);
|
.filter((entry) => entry !== undefined);
|
||||||
@ -39,10 +35,9 @@ const addSlash = (link: string): string => {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<ul>
|
<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}`)">
|
<nuxt-link :to="addSlash(`${config.pronouns.prefix || ''}/${pronoun.canonicalName}`)">
|
||||||
<strong v-if="display">{{ display }}</strong>
|
<strong><Spelling :text="pronoun.name(glue)" /></strong><small v-if="pronoun.smallForm">/<Spelling :text="pronoun.morphemes[pronoun.smallForm] ?? undefined" /></small>
|
||||||
<strong v-else><Spelling :text="pronoun.name(glue)" /></strong><small v-if="pronoun.smallForm">/<Spelling :text="pronoun.morphemes[pronoun.smallForm] ?? undefined" /></small>
|
|
||||||
<template v-if="pronoun.description">
|
<template v-if="pronoun.description">
|
||||||
–
|
–
|
||||||
<small><Spelling :text="pronoun.description as string" /></small>
|
<small><Spelling :text="pronoun.description as string" /></small>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user