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

49 lines
1.4 KiB
Vue
Raw Normal View History

2020-07-22 13:19:23 -07:00
<template>
<div v-if="Object.keys(sources).length">
2020-07-22 13:19:23 -07:00
<h2 class="h4">
<Icon v="books"/>
2020-08-25 00:43:21 -07:00
Przykłady z tekstów kultury:
2020-07-22 13:19:23 -07:00
</h2>
<LiteratureMenu/>
<section v-for="(optionSources, option) in sources">
<h3 class="h5">
<nuxt-link :to="'/' + option">
<span v-if="option.includes('&')">
Formy wymienne
<small>({{ option.replace(/&/g, ' lub ') }})</small>
</span>
<span v-else>
{{ getTemplate(templates, option).description }}
<small>({{ getTemplate(templates, option).name() }})</small>
</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>
import { templates } from "../src/data";
import { getTemplate } from "../src/buildTemplate";
2020-07-22 13:19:23 -07:00
export default {
props: {
sources: { required: true },
},
data() {
return {
templates: templates,
getTemplate: getTemplate,
}
2020-07-22 13:19:23 -07:00
}
}
</script>