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

20 lines
870 B
Vue
Raw Normal View History

2020-07-22 13:19:23 -07:00
<template>
2020-11-09 11:11:47 -08:00
<div class="my-2">
<Icon :v="source.icon()"/>
2020-11-09 11:11:47 -08:00
<strong><template v-if="source.author">{{source.author.replace('^', '')}}</template><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>
2020-07-22 13:19:23 -07:00
<ul v-if="source.fragments.length">
<li v-for="fragment in source.fragments">
2020-12-03 07:39:40 -08:00
<T>quotation.start</T><span v-html="fragment.replace(/\n/g, '<br/>')"></span><T>quotation.end</T>
2020-07-22 13:19:23 -07:00
</li>
</ul>
</div>
</template>
<script>
export default {
props: {
2020-11-09 11:11:47 -08:00
source: { required: true },
2020-07-22 13:19:23 -07:00
},
}
</script>