mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
examples(with-buefy): update example (#5348)
This commit is contained in:
parent
10812e3082
commit
ce66a8cbee
Binary file not shown.
Before Width: | Height: | Size: 4.2 KiB |
42
examples/with-buefy/components/card.vue
Normal file
42
examples/with-buefy/components/card.vue
Normal 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>
|
@ -3,8 +3,9 @@ export default {
|
||||
** Customize the progress bar color
|
||||
*/
|
||||
loading: { color: '#3B8070' },
|
||||
mode: 'spa',
|
||||
plugins: ['~plugins/buefy'],
|
||||
modules: [
|
||||
'nuxt-buefy'
|
||||
],
|
||||
router: {
|
||||
linkActiveClass: 'is-active'
|
||||
}
|
||||
|
@ -10,12 +10,7 @@
|
||||
"post-update": "yarn upgrade --latest"
|
||||
},
|
||||
"dependencies": {
|
||||
"buefy": "^0.5.4",
|
||||
"nuxt": "latest",
|
||||
"vue": "~2.4.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"node-sass": "^4.6.0",
|
||||
"sass-loader": "^6.0.6"
|
||||
"nuxt-buefy": "latest"
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +0,0 @@
|
||||
<template>
|
||||
<h1>About</h1>
|
||||
</template>
|
@ -1,28 +1,45 @@
|
||||
<template>
|
||||
<nav class="navbar has-shadow is-light">
|
||||
<div class="container">
|
||||
<div class="navbar-brand">
|
||||
<NuxtLink to="/" class="navbar-item">
|
||||
<img src="~/assets/logo.png">
|
||||
</NuxtLink>
|
||||
</div>
|
||||
<div class="navbar-menu">
|
||||
<div class="navbar-start">
|
||||
<NuxtLink to="/" class="navbar-item is-tab" exact>
|
||||
Home
|
||||
</NuxtLink>
|
||||
<NuxtLink to="/about" class="navbar-item is-tab" exact>
|
||||
About
|
||||
</NuxtLink>
|
||||
</div>
|
||||
</div>
|
||||
<section class="section">
|
||||
<div class="columns is-mobile">
|
||||
|
||||
<card
|
||||
title="Free"
|
||||
icon="github-circle"
|
||||
>
|
||||
Open source on <a href="https://github.com/buefy/buefy"> GitHub</a>
|
||||
</card>
|
||||
|
||||
<card
|
||||
title="Responsive"
|
||||
icon="cellphone-link"
|
||||
>
|
||||
<b class="has-text-grey">Every</b> component is responsive
|
||||
</card>
|
||||
|
||||
<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>
|
||||
</nav>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
$primary: blue;
|
||||
$navbar-tab-active-border-bottom-color: red;
|
||||
@import "~bulma";
|
||||
@import "~buefy/src/scss/buefy";
|
||||
</style>
|
||||
<script>
|
||||
import Card from '~/components/Card'
|
||||
export default {
|
||||
name: 'HomePage',
|
||||
components: {
|
||||
Card
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -1,4 +0,0 @@
|
||||
import Vue from 'vue'
|
||||
import Buefy from 'buefy'
|
||||
|
||||
Vue.use(Buefy)
|
Loading…
Reference in New Issue
Block a user