This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Zaimki/components/Literature.vue

47 lines
1.5 KiB
Vue
Raw Normal View History

2020-07-22 13:19:23 -07:00
<template>
<div v-if="config.sources.enabled && Object.keys(sources).length">
2020-07-22 13:19:23 -07:00
<h2 class="h4">
<nuxt-link :to="'/' + config.sources.route">
2020-09-23 11:34:35 -07:00
<Icon v="books"/>
2021-12-02 08:18:25 -08:00
<T>sources.headerLong</T><T>quotation.colon</T>
2020-09-23 11:34:35 -07:00
</nuxt-link>
2020-07-22 13:19:23 -07:00
</h2>
2020-12-10 07:23:39 -08:00
<section v-for="(optionSources, option) in sources" v-if="optionSources">
<h3 class="h5">
<nuxt-link :to="'/' + option">
<span v-if="option.includes('&')">
<T>pronouns.alt.header</T>
<small>({{ option.replace(/&/g, glue) }})</small>
</span>
<span v-else-if="option">
{{ getPronoun(pronouns, option).description }}
<small>({{ getPronoun(pronouns, option).name(glue) }})</small>
</span>
</nuxt-link>
</h3>
2020-12-10 07:23:39 -08:00
<SourceList :pronoun="pronoun" :sources="optionSources"/>
</section>
2020-07-22 13:19:23 -07:00
</div>
</template>
<script>
import { pronouns } from "../src/data";
import { getPronoun } from "../src/buildPronoun";
2020-07-22 13:19:23 -07:00
export default {
props: {
pronoun: { },
2020-07-22 13:19:23 -07:00
sources: { required: true },
},
data() {
return {
pronouns,
getPronoun: getPronoun,
glue: ' ' + this.$t('pronouns.or') + ' ',
}
2020-07-22 13:19:23 -07:00
}
}
</script>