2018-11-01 11:50:04 +00:00
|
|
|
<template>
|
|
|
|
<div>
|
2018-11-14 08:53:06 +00:00
|
|
|
<ContentTitle :title="contentData.title" :author="contentData.author" :publishDate="contentData.publish_date">
|
2018-11-02 05:59:02 +00:00
|
|
|
<slot></slot>
|
2018-11-14 08:53:06 +00:00
|
|
|
</ContentTitle>
|
2018-11-01 11:50:04 +00:00
|
|
|
<section class="article-content-section">
|
|
|
|
<div class='container'>
|
2018-11-01 14:21:33 +00:00
|
|
|
<div class="content" v-html="contentData.content"></div>
|
2018-11-01 11:50:04 +00:00
|
|
|
<div class="text-right">
|
|
|
|
</div>
|
|
|
|
<div class="mt-3 text-right">
|
|
|
|
<a class="text-muted" href="/report"><i class="octicon octicon-issue-opened" title="Report"></i> Report a
|
|
|
|
Mistake</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<script>
|
2018-11-14 08:53:06 +00:00
|
|
|
import ContentTitle from './ContentTitle.vue'
|
2018-11-01 11:50:04 +00:00
|
|
|
export default {
|
|
|
|
props: ['content', 'type'],
|
2018-11-13 11:54:07 +00:00
|
|
|
name: 'Article',
|
2018-11-01 11:50:04 +00:00
|
|
|
data() {
|
|
|
|
return {
|
2018-11-01 14:21:33 +00:00
|
|
|
contentData: ''
|
2018-11-01 11:50:04 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
mounted() {
|
2018-11-14 08:53:06 +00:00
|
|
|
this.getContent().then(data => this.contentData = data);
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
getContent() {
|
|
|
|
return frappe.db.get_doc(this.type, this.content)
|
|
|
|
}
|
2018-11-02 05:59:02 +00:00
|
|
|
},
|
|
|
|
components: {
|
2018-11-14 08:53:06 +00:00
|
|
|
ContentTitle
|
2018-11-01 11:50:04 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|