Commit 61426829 authored by Evan You's avatar Evan You

improve list item for jobs/ask

parent fa452764
<template>
<li class="news-item">
<span class="score">{{ item.score }}</span>
<span class="title">
<template v-if="item.url">
<a :href="item.url" target="_blank">{{ item.title }}</a>
<span>({{ item.url | host }})</span>
......@@ -8,15 +9,19 @@
<template v-else>
<router-link :to="'/item/' + item.id">{{ item.title }}</router-link>
</template>
</span>
<br>
by
<router-link :to="'/user/' + item.by">
{{ item.by }}
</router-link>
{{ item.time | timeAgo }} ago |
<router-link :to="'/item/' + item.id">
{{ item.descendants }} comments
</router-link>
<span class="meta">
<span v-if="item.type !== 'job'" class="by">
by <router-link :to="'/user/' + item.by">{{ item.by }}</router-link>
</span>
<span class="time">
{{ item.time | timeAgo }} ago
</span>
<span v-if="item.type !== 'job'" class="comments-link">
| <router-link :to="'/item/' + item.id">{{ item.descendants }} comments</router-link>
</span>
</span>
</li>
</template>
......
......@@ -12,7 +12,7 @@
| {{ item.descendants }} comments
</p>
</div>
<ul class="item-view-comments">
<ul v-if="item.kids" class="item-view-comments">
<comment v-for="id in item.kids" :id="id"></comment>
</ul>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment