grupuj zaimki na /literatura podobnie jak na stronie głównej

This commit is contained in:
Avris 2020-08-24 10:38:12 +02:00
parent fbe44e1644
commit 27b817d5cb
3 changed files with 14 additions and 11 deletions

View File

@ -30,11 +30,11 @@
</p>
<ul class="list-unstyled">
<li v-for="(template, pronoun) in templates" :key="pronoun" :class="separators.includes(pronoun) ? 'mt-3 mb-1' : 'my-1'">
<li v-for="(template, pronoun) in templates" :key="pronoun" :class="separators.includes(template.name()) ? 'mt-3 mb-1' : 'my-1'">
<nuxt-link :to="addSlash('/' + pronoun)">
<strong>{{template.name()}}</strong>
{{template.description}}
<small>{{template.description}}</small>
</nuxt-link>
</li>
<li class="mt-3 mb-1">
@ -238,7 +238,7 @@
</template>
<script>
import { examples, templates, getSources } from "~/src/data";
import { examples, templates, getSources, separators } from "~/src/data";
import Compressor from "../src/compressor";
import { getTemplate } from "../src/buildTemplate";
@ -257,7 +257,7 @@
customise: false,
separators: ['ono/jego', 'onu', 'oni', 'onæ', 'vono'],
separators: separators,
}
},
computed: {

View File

@ -9,20 +9,21 @@
<LiteratureMenu all/>
<section>
<ul>
<li v-for="template in templates" v-if="template.sources.length">
<ul class="list-unstyled">
<li v-for="template in templates" v-if="template.sources.length" :class="separators.includes(template.name()) ? 'mt-3 mb-1' : 'my-1'">
<a :href="'#' + toId(template.name())">
{{ template.description }}
<small v-if="template.name">({{ template.name() }})</small>
<strong>{{ template.name() }}</strong>
<small>{{ template.description }}</small>
</a>
</li>
<li v-for="(sources, multiple) in sourcesForMultipleForms">
<li v-for="(sources, multiple) in sourcesForMultipleForms" :class="separators.includes(multiple) ? 'mt-3 mb-1' : 'my-1'">
<a :href="'#' + toId(multiple)">
Formy wymienne
<small>({{ multiple.replace(/&/g, ' lub ') }})</small>
</a>
</li>
<li>
<li class="mt-3 mb-1">
<a href="#inne">
Inne formy
</a>
@ -95,7 +96,7 @@
</template>
<script>
import { templates, sources, sourcesForMultipleForms } from '../src/data'
import { templates, sources, sourcesForMultipleForms, separators } from '../src/data'
import { Source } from "../src/classes";
export default {
@ -105,6 +106,7 @@
sourcesForMultipleForms: sourcesForMultipleForms,
sourceTypes: Source.TYPES,
filter: '',
separators: separators,
};
},
mounted() {

View File

@ -75,3 +75,4 @@ export const nounTemplates = [
new NounTemplate(['er'], ['ra'], ['rum'], ['rowie'], ['ry'], ['ra']),
];
export const separators = ['ono/jego', 'onu/jenu', 'oni/ich', 'onæ/jæ', 'vono/vego', 'on&ona'];