mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-24 05:05:20 -04:00
(refactor) loop over noun genus instead of writing all cases
This commit is contained in:
parent
90e0438952
commit
b918be44a5
@ -123,40 +123,18 @@ defineExpose({ loadNouns });
|
||||
|
||||
<template #row="s">
|
||||
<template v-if="s">
|
||||
<td>
|
||||
<NounsItem :noun="s.el" gender="masc" />
|
||||
<td v-for="gender in genders" :key="gender">
|
||||
<NounsItem :noun="s.el" :gender="gender" />
|
||||
|
||||
<small v-if="s.el.base && nouns[s.el.base]">
|
||||
<p><strong><T>nouns.edited</T><T>quotation.colon</T></strong></p>
|
||||
<Diff switchable>
|
||||
<template #before><NounsItem :noun="nouns[s.el.base]" gender="masc" /></template>
|
||||
<template #after><NounsItem :noun="s.el" gender="masc" /></template>
|
||||
</Diff>
|
||||
</small>
|
||||
</td>
|
||||
<td>
|
||||
<NounsItem :noun="s.el" gender="fem" />
|
||||
|
||||
<small v-if="s.el.base && nouns[s.el.base]">
|
||||
<p><strong><T>nouns.edited</T><T>quotation.colon</T></strong></p>
|
||||
<Diff switchable>
|
||||
<template #before><NounsItem :noun="nouns[s.el.base]" gender="fem" /></template>
|
||||
<template #after><NounsItem :noun="s.el" gender="fem" /></template>
|
||||
</Diff>
|
||||
</small>
|
||||
</td>
|
||||
<td>
|
||||
<NounsItem :noun="s.el" gender="neutr" />
|
||||
|
||||
<small v-if="s.el.base && nouns[s.el.base]">
|
||||
<p><strong><T>nouns.edited</T><T>quotation.colon</T></strong></p>
|
||||
<Diff switchable>
|
||||
<template #before><NounsItem :noun="nouns[s.el.base]" gender="neutr" /></template>
|
||||
<template #after><NounsItem :noun="s.el" gender="neutr" /></template>
|
||||
<template #before><NounsItem :noun="nouns[s.el.base]" :gender="gender" /></template>
|
||||
<template #after><NounsItem :noun="s.el" :gender="gender" /></template>
|
||||
</Diff>
|
||||
</small>
|
||||
|
||||
<div v-if="s.el.sourcesData.length" class="div-three-columns">
|
||||
<div v-if="gender === 'neutr' && s.el.sourcesData.length" class="div-three-columns">
|
||||
<p><strong><T>sources.referenced</T><T>quotation.colon</T></strong></p>
|
||||
<ul class="list-unstyled">
|
||||
<li v-for="source in s.el.sourcesData" :key="source.id">
|
||||
|
@ -38,14 +38,8 @@ const templates = computed((): (MinimalNoun & { id: string })[] => {
|
||||
<th></th>
|
||||
</template>
|
||||
<template #row="{ el: template }">
|
||||
<td>
|
||||
<NounsItem :noun="template" gender="masc" />
|
||||
</td>
|
||||
<td>
|
||||
<NounsItem :noun="template" gender="fem" />
|
||||
</td>
|
||||
<td>
|
||||
<NounsItem :noun="template" gender="neutr" />
|
||||
<td v-for="gender in genders" :key="gender">
|
||||
<NounsItem :noun="template" :gender="gender" />
|
||||
</td>
|
||||
<th>
|
||||
<ul class="list-unstyled list-btn-concise">
|
||||
|
Loading…
x
Reference in New Issue
Block a user