2020-07-22 13:19:23 -07:00
|
|
|
<template>
|
2020-09-28 10:22:36 -07:00
|
|
|
<div v-if="config.sources.enabled && Object.keys(sources).length">
|
2020-07-22 13:19:23 -07:00
|
|
|
<h2 class="h4">
|
2020-09-28 10:22:36 -07:00
|
|
|
<nuxt-link :to="'/' + config.sources.route">
|
2020-09-23 11:34:35 -07:00
|
|
|
<Icon v="books"/>
|
2020-09-28 08:51:26 -07:00
|
|
|
<T>sources.headerLong</T>:
|
2020-09-23 11:34:35 -07:00
|
|
|
</nuxt-link>
|
2020-07-22 13:19:23 -07:00
|
|
|
</h2>
|
|
|
|
|
2020-07-27 08:26:40 -07:00
|
|
|
<section v-for="(optionSources, option) in sources">
|
|
|
|
<h3 class="h5">
|
|
|
|
<nuxt-link :to="'/' + option">
|
|
|
|
<span v-if="option.includes('&')">
|
2020-09-28 08:51:26 -07:00
|
|
|
<T>template.alt.header</T>
|
|
|
|
<small>({{ option.replace(/&/g, glue) }})</small>
|
2020-07-27 08:26:40 -07:00
|
|
|
</span>
|
|
|
|
<span v-else>
|
|
|
|
{{ getTemplate(templates, option).description }}
|
2020-09-28 08:51:26 -07:00
|
|
|
<small>({{ getTemplate(templates, option).name(glue) }})</small>
|
2020-07-27 08:26:40 -07:00
|
|
|
</span>
|
|
|
|
</nuxt-link>
|
|
|
|
</h3>
|
|
|
|
|
|
|
|
<ul class="list-unstyled">
|
|
|
|
<li v-for="source in optionSources" class="my-2">
|
|
|
|
<Source :name="source"/>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</section>
|
2020-07-22 13:19:23 -07:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2020-07-27 08:26:40 -07:00
|
|
|
import { templates } from "../src/data";
|
|
|
|
import { getTemplate } from "../src/buildTemplate";
|
|
|
|
|
2020-07-22 13:19:23 -07:00
|
|
|
export default {
|
|
|
|
props: {
|
|
|
|
sources: { required: true },
|
2020-07-27 08:26:40 -07:00
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
templates: templates,
|
|
|
|
getTemplate: getTemplate,
|
2020-09-28 10:22:36 -07:00
|
|
|
glue: ' ' + this.$t('template.or') + ' ',
|
2020-07-27 08:26:40 -07:00
|
|
|
}
|
2020-07-22 13:19:23 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|