Skip to content

Commit

Permalink
dark.vue
Browse files Browse the repository at this point in the history
  • Loading branch information
wangzhao committed Jul 31, 2018
1 parent e85f581 commit 41c3e74
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
26 changes: 26 additions & 0 deletions public/layouts/dark.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<template>
<div class="dark">
<nuxt></nuxt>
</div>
</template>


<style>
body {
overflow: hidden;
}
.dark {
width: 100%;
min-width: 100%;
background: #000;
color: white;
position: absolute;
bottom: 0;
top: 0;
text-align: center;
padding: 20px;
}
.dark a {
color: white;
}
</style>
12 changes: 11 additions & 1 deletion public/pages/about.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
<template>
<div>
about
<div>about from {{name}}</div>
<nuxt-link to="/">Go to Index</nuxt-link>
</div>
</template>
<script>
export default {
layout: 'dark',
asyncData({ req }) {
return {
name: req ? 'server' : 'client'
}
}
}
</script>

0 comments on commit 41c3e74

Please sign in to comment.