diff options
Diffstat (limited to 'app/components/comment.js')
| -rw-r--r-- | app/components/comment.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/app/components/comment.js b/app/components/comment.js new file mode 100644 index 0000000..33ce2c7 --- /dev/null +++ b/app/components/comment.js @@ -0,0 +1,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'] +}); + |