File tree Expand file tree Collapse file tree 2 files changed +31
-12
lines changed Expand file tree Collapse file tree 2 files changed +31
-12
lines changed Original file line number Diff line number Diff line change 1515 {{ item.time | timeAgo }} ago
1616 </p >
1717 </div >
18- <div v-if =" item.kids" class =" item-view-comments" >
19- <p class =" item-view-comments-header" >{{ item.descendants }} comments</p >
20- <ul class =" comment-children" >
18+ <div class =" item-view-comments" >
19+ <p class =" item-view-comments-header" >
20+ {{ item.kids ? item.descendants + ' comments' : 'No comments yet.'}}
21+ </p >
22+ <ul v-if =" item.kids" class =" comment-children" >
2123 <comment v-for =" id in item.kids" :id =" id" ></comment >
2224 </ul >
2325 </div >
Original file line number Diff line number Diff line change 22 <div class =" user-view" >
33 <spinner :show =" !user" ></spinner >
44 <template v-if =" user " >
5- <ul >
6- <li ><span class =" label" >user:</span > {{ user.id }}</li >
7- <li ><span class =" label" >created:</span > {{ user.created | timeAgo }} ago</li >
8- <li ><span class =" label" >karma:</span > {{user.karma}}</li >
9- <li >
10- <span class =" label" >about:</span >
11- <div class =" about" v-html =" user.about" ></div >
12- </li >
5+ <h1 >User : {{ user.id }}</h1 >
6+ <ul class =" meta" >
7+ <li ><span class =" label" >Created:</span > {{ user.created | timeAgo }} ago</li >
8+ <li ><span class =" label" >Karma:</span > {{user.karma}}</li >
9+ <li v-if =" user.about" v-html =" user.about" class =" about" ></li >
1310 </ul >
1411 <p class =" links" >
15- <a :href =" 'https://news.ycombinator.com/submitted?id=' + user.id" >submissions</a >< br >
12+ <a :href =" 'https://news.ycombinator.com/submitted?id=' + user.id" >submissions</a > |
1613 <a :href =" 'https://news.ycombinator.com/threads?id=' + user.id" >comments</a >
1714 </p >
1815 </template >
@@ -42,3 +39,23 @@ export default {
4239 }
4340}
4441 </script >
42+
43+ <style lang="stylus">
44+ .user-view
45+ background-color #f f f
46+ box-sizing border-box
47+ padding 2em 3em
48+ h1
49+ margin 0
50+ font-size 1.5em
51+ .meta
52+ list-style-type none
53+ padding 0
54+ .label
55+ display inline-block
56+ min-width 4em
57+ .about
58+ margin 1em 0
59+ .links a
60+ text-decoration underline
61+ </style >
You can’t perform that action at this time.
0 commit comments