Add example for custom-layout

This commit is contained in:
Sébastien Chopin 2016-12-24 01:55:46 +01:00
parent b870a7206e
commit afd7eb86e6
8 changed files with 33 additions and 2 deletions

View File

@ -0,0 +1,21 @@
<template>
<div class="dark">
<nuxt/>
</div>
</template>
<style>
.dark {
position: absolute;
top: 0;
left: 0;
width: 100%;
min-height: 100%;
background: black;
color: white;
padding: 10px;
}
.dark a {
color: white;
}
</style>

View File

@ -1,8 +1,8 @@
<template>
<nuxt-container>
<div>
<img src="logo.png"/>
<nuxt/>
</nuxt-container>
</div>
</template>
<style scoped>

View File

@ -0,0 +1,9 @@
<template>
<h1>Custom error page</h1>
</template>
<script>
export default {
props: ['error']
}
</script>

View File

@ -7,6 +7,7 @@
<script>
export default {
layout: 'dark',
data ({ req }) {
return {
name: req ? 'server' : 'client'

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB