Skip to content
Permalink
Browse files

调整默认布局,增加底部。

  • Loading branch information...
JZLeung committed Feb 5, 2018
1 parent a66147b commit f1e0964b4ef3db9a053477ad6ddb7d273f1032ea
Showing with 49 additions and 3 deletions.
  1. +49 −3 layouts/default.vue
@@ -1,10 +1,45 @@
<template>
<div>
<div>
<header>
<a href="#" class="logo"><img src="https://o4j806krb.qnssl.com/public/images/cnodejs_light.svg" alt=""></a>
<!-- <button>全部</button> -->
<a href="/" class="button">全部</a>
<span>|</span>
<!-- <a v-for="nav in tabs" :key="nav.path" :href="'?tab='+nav.path" role="button">{{nav.name}}</a> -->
<nuxt-link v-for="nav in tabs" :key="nav.path" :to="'/?tab='+nav.path" role="button">{{nav.name}}</nuxt-link>
<!-- <button>About</button> -->
<!-- <a href="#" role="button">Contact</a> -->
</header>
<nuxt/>
</div>
<footer>
<p>&copy; 2018-2018 LeungJZ | Nuxt Demo</p>
</footer>
</div>
</template>

<style>
<script>
const tabs = [{
name: '精华',
path: 'good'
}, {
name: '问答',
path: 'ask'
}, {
name: '招聘',
path: 'job'
}, {
name: '分享',
path: 'share'
}]
export default {
data: () => ({
tabs
})
}
</script>

<style lang="scss">
html {
font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont,
'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
@@ -17,10 +52,21 @@ html {
box-sizing: border-box;
}
.container {
max-width: 1200px;
margin: 10px auto;
}
*,
*:before,
*:after {
box-sizing: border-box;
margin: 0;
}
.logo {
img {
width: 100px;
}
}
</style>

0 comments on commit f1e0964

Please sign in to comment.
You can’t perform that action at this time.