]> git.r.bdr.sh - rbdr/dasein/blob - app/components/comment.js
33ce2c791ad391e4b7db8cdc5a5ed8aeac126e61
[rbdr/dasein] / app / components / comment.js
1 import Vue from 'vue';
2
3 const internals = {};
4
5 export default internals.CommentComponent = Vue.component('comment', {
6 template: '<article class="comment">' +
7 '<aside class="comment-meta">' +
8 '<img :src="comment.userImage" v-bind:alt="\'Avatar for @\' + comment.userId">' +
9 '<a v-bind:href="\'https://twitter.com/\' + comment.userId">{{comment.userName}}</a> said on ' +
10 '<time v-bind:datetime="comment.timestamp | datetime">{{comment.timestamp | usertime}}</time>' +
11 '</aside>' +
12 '<div class="comment-content">{{comment.content}}</div>' +
13 '</article>',
14
15 props: ['comment']
16 });
17