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

46 lines
1.4 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"/>
<T>sources.headerLong</T>:
2020-09-23 11:34:35 -07:00
</nuxt-link>
2020-07-22 13:19:23 -07:00
</h2>
<section v-for="(optionSources, option) in sources">
<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>
{{ getPronoun(pronouns, option).description }}
<small>({{ getPronoun(pronouns, option).name(glue) }})</small>
</span>
</nuxt-link>
</h3>
2020-12-04 13:09:57 -08:00
<SourceList :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: {
sources: { required: true },
},
data() {
return {
pronouns,
getPronoun: getPronoun,
glue: ' ' + this.$t('pronouns.or') + ' ',
}
2020-07-22 13:19:23 -07:00
}
}
</script>