Commit fa452764 authored by Evan You's avatar Evan You

tweak

parent cd571822
...@@ -17,9 +17,9 @@ ...@@ -17,9 +17,9 @@
"lru-cache": "^4.0.1", "lru-cache": "^4.0.1",
"serialize-javascript": "^1.3.0", "serialize-javascript": "^1.3.0",
"serve-favicon": "^2.3.0", "serve-favicon": "^2.3.0",
"vue": "^2.0.0-beta.7", "vue": "^2.0.0-beta.8",
"vue-router": "^2.0.0-rc.2", "vue-router": "^2.0.0-rc.2",
"vue-server-renderer": "^2.0.0-beta.7", "vue-server-renderer": "^2.0.0-beta.8",
"vuex": "^2.0.0-rc.4", "vuex": "^2.0.0-rc.4",
"vuex-router-sync": "^3.0.0" "vuex-router-sync": "^3.0.0"
}, },
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<li>Client-side DOM re-hydration</li> <li>Client-side DOM re-hydration</li>
</ul> </ul>
</li> </li>
<li>Powerful yet easy-to-use animation system</li> <li>Powerful yet easy-to-use animation system (wait for the lists to update in realtime!)</li>
</ul> </ul>
<p><a href="https://github.com/vuejs/vue-hackernews-2.0" target="_blank">Source code on GitHub.</a></p> <p><a href="https://github.com/vuejs/vue-hackernews-2.0" target="_blank">Source code on GitHub.</a></p>
</div> </div>
......
<template> <template>
<div class="item-view"> <div class="item-view" v-if="item">
<template v-if="item"> <div class="item-view-header">
<div class="item-view-header"> <a :href="item.url" target="_blank">
<a :href="item.url" target="_blank"> <h2>{{ item.title }}</h2>
<h2>{{ item.title }}</h2> </a>
</a> <span v-if="item.url">({{ item.url | host }})</span>
<span v-if="item.url">({{ item.url | host }})</span> <p>
<p> {{ item.score }} points
{{ item.score }} points | by <router-link :to="'/user/' + item.by">{{ item.by }}</router-link>
| by <router-link :to="'/user/' + item.by">{{ item.by }}</router-link> {{ item.time | timeAgo }} ago
{{ item.time | timeAgo }} ago | {{ item.descendants }} comments
| {{ item.descendants }} comments </p>
</p> </div>
</div> <ul class="item-view-comments">
<ul 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>
</template>
</div> </div>
</template> </template>
......
<template> <template>
<div class="user-view"> <div class="user-view" v-if="user">
<template v-if="user"> <ul>
<ul> <li><span class="label">user:</span> {{ user.id }}</li>
<li><span class="label">user:</span> {{ user.id }}</li> <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> <span class="label">about:</span>
<span class="label">about:</span> <div class="about" v-html="user.about"></div>
<div class="about" v-html="user.about"></div> </li>
</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><br> <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>
</div> </div>
</template> </template>
......
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