Commit 61426829 authored by Evan You's avatar Evan You

improve list item for jobs/ask

parent fa452764
<template> <template>
<li class="news-item"> <li class="news-item">
<span class="score">{{ item.score }}</span> <span class="score">{{ item.score }}</span>
<template v-if="item.url"> <span class="title">
<a :href="item.url" target="_blank">{{ item.title }}</a> <template v-if="item.url">
<span>({{ item.url | host }})</span> <a :href="item.url" target="_blank">{{ item.title }}</a>
</template> <span>({{ item.url | host }})</span>
<template v-else> </template>
<router-link :to="'/item/' + item.id">{{ item.title }}</router-link> <template v-else>
</template> <router-link :to="'/item/' + item.id">{{ item.title }}</router-link>
</template>
</span>
<br> <br>
by <span class="meta">
<router-link :to="'/user/' + item.by"> <span v-if="item.type !== 'job'" class="by">
{{ item.by }} by <router-link :to="'/user/' + item.by">{{ item.by }}</router-link>
</router-link> </span>
{{ item.time | timeAgo }} ago | <span class="time">
<router-link :to="'/item/' + item.id"> {{ item.time | timeAgo }} ago
{{ item.descendants }} comments </span>
</router-link> <span v-if="item.type !== 'job'" class="comments-link">
| <router-link :to="'/item/' + item.id">{{ item.descendants }} comments</router-link>
</span>
</span>
</li> </li>
</template> </template>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
| {{ item.descendants }} comments | {{ item.descendants }} comments
</p> </p>
</div> </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> <comment v-for="id in item.kids" :id="id"></comment>
</ul> </ul>
</div> </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