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">
<div class="item-view-header"> <template v-if="item">
<a :href="item.url" target="_blank"> <div class="item-view-header">
<h2>{{ item.title }}</h2> <a :href="item.url" target="_blank">
</a> <h2>{{ item.title }}</h2>
<span v-if="item.url">({{ item.url | host }})</span> </a>
<p> <span v-if="item.url">({{ item.url | host }})</span>
{{ item.score }} points <p>
| by <router-link :to="'/user/' + item.by">{{ item.by }}</router-link> {{ item.score }} points
{{ item.time | timeAgo }} ago | by <router-link :to="'/user/' + item.by">{{ item.by }}</router-link>
| {{ item.descendants }} comments {{ item.time | timeAgo }} ago
</p> | {{ item.descendants }} comments
</div> </p>
<ul class="item-view-comments"> </div>
<comment v-for="id in item.kids" :id="id"></comment> <ul class="item-view-comments">
</ul> <comment v-for="id in item.kids" :id="id"></comment>
</ul>
</template>
</div> </div>
</template> </template>
......
<template> <template>
<div class="user-view" v-if="user"> <div class="user-view">
<ul> <template v-if="user">
<li><span class="label">user:</span> {{ user.id }}</li> <ul>
<li><span class="label">created:</span> {{ user.created | timeAgo }} ago</li> <li><span class="label">user:</span> {{ user.id }}</li>
<li><span class="label">karma:</span> {{user.karma}}</li> <li><span class="label">created:</span> {{ user.created | timeAgo }} ago</li>
<li> <li><span class="label">karma:</span> {{user.karma}}</li>
<span class="label">about:</span> <li>
<div class="about" v-html="user.about"></div> <span class="label">about:</span>
</li> <div class="about" v-html="user.about"></div>
</ul> </li>
<p class="links"> </ul>
<a :href="'https://news.ycombinator.com/submitted?id=' + user.id">submissions</a><br> <p class="links">
<a :href="'https://news.ycombinator.com/threads?id=' + user.id">comments</a> <a :href="'https://news.ycombinator.com/submitted?id=' + user.id">submissions</a><br>
</p> <a :href="'https://news.ycombinator.com/threads?id=' + user.id">comments</a>
</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