aboutsummaryrefslogtreecommitdiff
path: root/app/components/comment.js
blob: 33ce2c791ad391e4b7db8cdc5a5ed8aeac126e61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import Vue from 'vue';

const internals = {};

export default internals.CommentComponent = Vue.component('comment', {
  template: '<article class="comment">' +
      '<aside class="comment-meta">' +
      '<img :src="comment.userImage" v-bind:alt="\'Avatar for @\' + comment.userId">' +
      '<a v-bind:href="\'https://twitter.com/\' + comment.userId">{{comment.userName}}</a> said on ' +
      '<time v-bind:datetime="comment.timestamp | datetime">{{comment.timestamp | usertime}}</time>' +
      '</aside>' +
      '<div class="comment-content">{{comment.content}}</div>' +
      '</article>',

  props: ['comment']
});