]> git.r.bdr.sh - rbdr/dasein/blob - app/components/post.js
bb72189f8121b1cf5ebe49b77e4ac786b5e7fd10
[rbdr/dasein] / app / components / post.js
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 });