Commit cd571822 authored by Evan You's avatar Evan You

fix user/item view entering

parent bff04f5b
<template> <template>
<div> <div>
<h2>About</h2> <h2>vue-hackernews-2.0</h2>
<p>hohoho</p> <p>is a demo project built with the following technologies:</p>
<ul>
<li>Vue 2.0</li>
<li>vue-router 2.0</li>
<li>vuex 2.0</li>
<li>Webpack 2.0</li>
</ul>
<p>Check out <a href="https://github.com/vuejs/vue/wiki/Vue-2.0-Beta---Starter-Resources" target="_blank">this guide</a> for getting started on Vue 2.0.</p>
<p>This project showcases these features:</p>
<ul>
<li>
Single file Vue components with:
<ul>
<li>Hot-reload during development</li>
<li>Stylus for CSS pre-processing</li>
<li>CSS extraction for production</li>
</ul>
</li>
<li>
Server-Side Rendering with:
<ul>
<li>Universal application code</li>
<li>Server-side data pre-fetching</li>
<li>Client-side DOM re-hydration</li>
</ul>
</li>
<li>Powerful yet easy-to-use animation system</li>
</ul>
<p><a href="https://github.com/vuejs/vue-hackernews-2.0" target="_blank">Source code on GitHub.</a></p>
</div> </div>
</template> </template>
......
<template> <template>
<div class="item-view" v-if="item"> <div class="item-view">
<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>
...@@ -15,6 +16,7 @@ ...@@ -15,6 +16,7 @@
<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" v-if="user"> <div class="user-view">
<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>
...@@ -13,6 +14,7 @@ ...@@ -13,6 +14,7 @@
<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