Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
node-sample
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
周韬
node-sample
Commits
cd8c5af1
Commit
cd8c5af1
authored
Aug 11, 2016
by
Evan You
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
complete styling
parent
60bc055a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
12 deletions
+31
-12
ItemView.vue
src/views/ItemView.vue
+5
-3
UserView.vue
src/views/UserView.vue
+26
-9
No files found.
src/views/ItemView.vue
View file @
cd8c5af1
...
@@ -15,9 +15,11 @@
...
@@ -15,9 +15,11 @@
{{
item
.
time
|
timeAgo
}}
ago
{{
item
.
time
|
timeAgo
}}
ago
</p>
</p>
</div>
</div>
<div
v-if=
"item.kids"
class=
"item-view-comments"
>
<div
class=
"item-view-comments"
>
<p
class=
"item-view-comments-header"
>
{{
item
.
descendants
}}
comments
</p>
<p
class=
"item-view-comments-header"
>
<ul
class=
"comment-children"
>
{{
item
.
kids
?
item
.
descendants
+
' comments'
:
'No comments yet.'
}}
</p>
<ul
v-if=
"item.kids"
class=
"comment-children"
>
<comment
v-for=
"id in item.kids"
:id=
"id"
></comment>
<comment
v-for=
"id in item.kids"
:id=
"id"
></comment>
</ul>
</ul>
</div>
</div>
...
...
src/views/UserView.vue
View file @
cd8c5af1
...
@@ -2,17 +2,14 @@
...
@@ -2,17 +2,14 @@
<div
class=
"user-view"
>
<div
class=
"user-view"
>
<spinner
:show=
"!user"
></spinner>
<spinner
:show=
"!user"
></spinner>
<template
v-if=
"user"
>
<template
v-if=
"user"
>
<ul>
<h1>
User :
{{
user
.
id
}}
</h1>
<li><span
class=
"label"
>
user:
</span>
{{
user
.
id
}}
</li>
<ul
class=
"meta"
>
<li><span
class=
"label"
>
created:
</span>
{{
user
.
created
|
timeAgo
}}
ago
</li>
<li><span
class=
"label"
>
Created:
</span>
{{
user
.
created
|
timeAgo
}}
ago
</li>
<li><span
class=
"label"
>
karma:
</span>
{{
user
.
karma
}}
</li>
<li><span
class=
"label"
>
Karma:
</span>
{{
user
.
karma
}}
</li>
<li>
<li
v-if=
"user.about"
v-html=
"user.about"
class=
"about"
></li>
<span
class=
"label"
>
about:
</span>
<div
class=
"about"
v-html=
"user.about"
></div>
</li>
</ul>
</ul>
<p
class=
"links"
>
<p
class=
"links"
>
<a
:href=
"'https://news.ycombinator.com/submitted?id=' + user.id"
>
submissions
</a>
<br>
<a
:href=
"'https://news.ycombinator.com/submitted?id=' + user.id"
>
submissions
</a>
|
<a
:href=
"'https://news.ycombinator.com/threads?id=' + user.id"
>
comments
</a>
<a
:href=
"'https://news.ycombinator.com/threads?id=' + user.id"
>
comments
</a>
</p>
</p>
</
template
>
</
template
>
...
@@ -42,3 +39,23 @@ export default {
...
@@ -42,3 +39,23 @@ export default {
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"stylus"
>
.user-view
background-color #fff
box-sizing border-box
padding 2em 3em
h1
margin 0
font-size 1.5em
.meta
list-style-type none
padding 0
.label
display inline-block
min-width 4em
.about
margin 1em 0
.links a
text-decoration underline
</
style
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment