examples(with-buefy): update example (#5348)

This commit is contained in:
Dmitry Molotkov 2019-03-23 09:51:32 +03:00 committed by Pooya Parsa
parent 10812e3082
commit ce66a8cbee
7 changed files with 87 additions and 39 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -0,0 +1,42 @@
<template>
<div class="column">
<div class="card">
<header class="card-header">
<p class="card-header-title has-text-grey">
{{ title }}
</p>
</header>
<div class="card-content">
<div class="content has-text-centered">
<b-icon
:icon="icon"
size="is-large"
type="is-primary"
/>
</div>
</div>
<footer class="card-footer">
<div class="card-footer-item">
<span>
<slot />
</span>
</div>
</footer>
</div>
</div>
</template>
<script>
export default {
props: {
title: {
type: String,
required: true
},
icon: {
type: String,
required: true
}
}
}
</script>

View File

@ -3,8 +3,9 @@ export default {
** Customize the progress bar color ** Customize the progress bar color
*/ */
loading: { color: '#3B8070' }, loading: { color: '#3B8070' },
mode: 'spa', modules: [
plugins: ['~plugins/buefy'], 'nuxt-buefy'
],
router: { router: {
linkActiveClass: 'is-active' linkActiveClass: 'is-active'
} }

View File

@ -10,12 +10,7 @@
"post-update": "yarn upgrade --latest" "post-update": "yarn upgrade --latest"
}, },
"dependencies": { "dependencies": {
"buefy": "^0.5.4",
"nuxt": "latest", "nuxt": "latest",
"vue": "~2.4.4" "nuxt-buefy": "latest"
},
"devDependencies": {
"node-sass": "^4.6.0",
"sass-loader": "^6.0.6"
} }
} }

View File

@ -1,3 +0,0 @@
<template>
<h1>About</h1>
</template>

View File

@ -1,28 +1,45 @@
<template> <template>
<nav class="navbar has-shadow is-light"> <section class="section">
<div class="container"> <div class="columns is-mobile">
<div class="navbar-brand">
<NuxtLink to="/" class="navbar-item"> <card
<img src="~/assets/logo.png"> title="Free"
</NuxtLink> icon="github-circle"
</div> >
<div class="navbar-menu"> Open source on <a href="https://github.com/buefy/buefy"> GitHub</a>
<div class="navbar-start"> </card>
<NuxtLink to="/" class="navbar-item is-tab" exact>
Home <card
</NuxtLink> title="Responsive"
<NuxtLink to="/about" class="navbar-item is-tab" exact> icon="cellphone-link"
About >
</NuxtLink> <b class="has-text-grey">Every</b> component is responsive
</div> </card>
</div>
<card
title="Modern"
icon="alert-decagram"
>
Built with <a href="https://vuejs.org/">Vue.js</a> and <a href="http://bulma.io/">Bulma</a>
</card>
<card
title="Lightweight"
icon="arrange-bring-to-front"
>
No other internal dependency
</card>
</div> </div>
</nav> </section>
</template> </template>
<style lang="scss"> <script>
$primary: blue; import Card from '~/components/Card'
$navbar-tab-active-border-bottom-color: red; export default {
@import "~bulma"; name: 'HomePage',
@import "~buefy/src/scss/buefy"; components: {
</style> Card
}
}
</script>

View File

@ -1,4 +0,0 @@
import Vue from 'vue'
import Buefy from 'buefy'
Vue.use(Buefy)