]> git.r.bdr.sh - rbdr/dasein/blobdiff - app/components/comment.js
Merge branch 'release/1.0.0'
[rbdr/dasein] / app / components / comment.js
diff --git a/app/components/comment.js b/app/components/comment.js
new file mode 100644 (file)
index 0000000..33ce2c7
--- /dev/null
@@ -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']
+});
+