]>
Commit | Line | Data |
---|---|---|
1 | import Vue from 'vue'; | |
2 | ||
3 | import CommentsComponent from './comments'; | |
4 | ||
5 | const internals = {}; | |
6 | ||
7 | export default internals.PostComponent = Vue.component('post', { | |
8 | template: '<article class="post">' + | |
9 | '<aside class="post-meta">' + | |
10 | '<img :src="post.userImage" v-bind:alt="\'Avatar for @\' + post.userId">' + | |
11 | '<a v-bind:href="\'https://twitter.com/\' + post.userId">{{post.userName}}</a> said on ' + | |
12 | '<time v-bind:datetime="post.timestamp | datetime">{{post.timestamp | usertime}}</time>' + | |
13 | '</aside>' + | |
14 | '<div class="post-content">{{post.content}}</div>' + | |
15 | '<comments v-bind:postUuid="post.uuid"></post>' + | |
16 | '</article>', | |
17 | ||
18 | props: ['post'], | |
19 | ||
20 | components: { | |
21 | comments: CommentsComponent | |
22 | } | |
23 | }); |