mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 16:43:55 +00:00
b11e9c0e51
- [ ] babel-eslint https://github.com/babel/babel-eslint/issues/664 - [x] eslint-config-standard-jsx https://github.com/standard/eslint-config-standard-jsx/issues/32 - [x] eslint-config-standard to be stable release https://github.com/standard/eslint-config-standard/issues/123 - [x] eslint-plugin-html - [x] eslint-plugin-import - [x] eslint-plugin-jest - [x] eslint-plugin-node - [x] eslint-plugin-promise - [x] eslint-plugin-standard https://github.com/standard/eslint-plugin-standard/issues/29 - [x] eslint-plugin-vue https://github.com/vuejs/eslint-plugin-vue/pull/504 - [x] eslint-plugin-react https://github.com/yannickcr/eslint-plugin-react/releases/tag/v7.10.0
72 lines
1.2 KiB
Vue
72 lines
1.2 KiB
Vue
<template>
|
|
<div class="container">
|
|
<div class="left">
|
|
<h2><nuxt-link to="/">Players</nuxt-link></h2>
|
|
<ul class="players">
|
|
<li v-for="user in users" :key="user.id">
|
|
<nuxt-link :to="'/'+user.id">{{ user.name }}</nuxt-link>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="right">
|
|
<nuxt-child :key="$route.params.id" />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
asyncData({ env }) {
|
|
return { users: env.users }
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
.page-enter-active, .page-leave-active {
|
|
transition: opacity .4s, transform .4s;
|
|
transform-style: preserve-3d;
|
|
backface-visibility: hidden;
|
|
opacity: 1;
|
|
}
|
|
.page-enter, .page-leave-active {
|
|
opacity: 0.5;
|
|
transform: rotateY(100deg);
|
|
}
|
|
.container {
|
|
width: 100%;
|
|
margin: 0;
|
|
padding: 0;
|
|
font-family: sans-serif;
|
|
box-sizing: border-box;
|
|
}
|
|
.left {
|
|
width: 50%;
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
}
|
|
.right {
|
|
width: 50%;
|
|
position: absolute;
|
|
top: 0;
|
|
right: 0;
|
|
}
|
|
.players {
|
|
list-style-type: none;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
.players li a {
|
|
display: block;
|
|
border: 1px #ddd solid;
|
|
padding: 10px;
|
|
text-align: left;
|
|
color: #222;
|
|
text-decoration: none;
|
|
}
|
|
.players li a:hover {
|
|
color: orange;
|
|
}
|
|
</style>
|