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/Source.vue

28 lines
992 B
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<div v-show="!filter || filter === source.type">
<Icon :v="source.icon()"/>
<strong>{{source.author}}<span v-if="source.author"> </span><em><a v-if="source.link" :href="source.link" target="_blank" rel="noopener">{{source.title}}</a><span v-else>{{source.title}}</span></em></strong><template v-if="source.extra"> ({{source.extra}})</template>, {{source.year}}<template v-if="source.comment">; {{source.comment}}</template>
<ul v-if="source.fragments.length">
<li v-for="fragment in source.fragments">
„<span v-html="fragment.replace(/\n/g, '<br/>')"></span>
</li>
</ul>
</div>
</template>
<script>
import { sources } from '../src/data';
export default {
props: {
name: { required: true },
filter: { default: '' },
},
data() {
return {
source: sources[this.name],
};
},
}
</script>