Skip to content

Commit 54849d8

Browse files
committed
Merge pull request #9 from jaden/feature/jobs
Display content for job items.
2 parents e8a6b13 + ce8ce62 commit 54849d8

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

src/components/ItemView.vue

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<template>
22
<div class="item-view" v-show="item">
33
<item :item="item"></item>
4+
<p class="itemtext" v-if="hasText" v-html="item.text"></p>
45
<ul class="poll-options" v-if="pollOptions">
56
<li v-for="option in pollOptions">
67
<p>{{option.text}}</p>
@@ -13,7 +14,7 @@
1314
:comment="comment">
1415
</comment>
1516
</ul>
16-
<p v-show="!comments.length">No comments yet.</p>
17+
<p v-show="!comments.length && !isJob">No comments yet.</p>
1718
</div>
1819
</template>
1920

@@ -50,6 +51,16 @@ export default {
5051
: null
5152
}))
5253
}
54+
},
55+
56+
computed: {
57+
isJob () {
58+
return this.item.type === 'job'
59+
},
60+
61+
hasText () {
62+
return this.item.hasOwnProperty('text')
63+
}
5364
}
5465
}
5566
</script>
@@ -73,4 +84,10 @@ export default {
7384
.subtext
7485
color $gray
7586
font-size 11px
87+
.itemtext
88+
color $gray
89+
margin-top 0
90+
margin-bottom 30px
91+
.itemtext p
92+
margin 10px 0
7693
</style>

0 commit comments

Comments
 (0)