Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

feat: upgrade vuetify #297

Merged
merged 1 commit into from
Jul 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions template/_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@
<%_ if (ui === 'bootstrap') { _%>
"bootstrap-vue": "^2.0.0-rc.11",
"bootstrap": "^4.1.3",
<%_ } else if (ui === 'vuetify') { _%>
"@nuxtjs/vuetify": "0.5.5",
<%_ } else if (ui === 'bulma') { _%>
"@nuxtjs/bulma": "^1.2.1",
<%_ } else if (ui === 'element-ui') { _%>
Expand Down Expand Up @@ -105,8 +103,7 @@
<%_ if (ui === 'tailwind') { _%>
"@nuxtjs/tailwindcss": "^1.0.0",
<%_ } else if (ui === 'vuetify') { _%>
"stylus": "^0.54.5",
"stylus-loader": "^3.0.2",
"@nuxtjs/vuetify": "^1.0.0",
<%_ } _%>
<%_ if (eslint) { _%>
"@nuxtjs/eslint-config": "^1.0.1",
Expand Down
2 changes: 0 additions & 2 deletions template/frameworks/vuetify/assets/style/app.styl

This file was deleted.

1 change: 0 additions & 1 deletion template/frameworks/vuetify/assets/style/variables.styl

This file was deleted.

1 change: 1 addition & 0 deletions template/frameworks/vuetify/assets/variables.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$font-size-root: 20px;
44 changes: 22 additions & 22 deletions template/frameworks/vuetify/layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,55 +8,55 @@
app
>
<v-list>
<v-list-tile
<v-list-item
v-for="(item, i) in items"
:key="i"
:to="item.to"
router
exact
>
<v-list-tile-action>
<v-list-item-action>
<v-icon>{{ item.icon }}</v-icon>
</v-list-tile-action>
<v-list-tile-content>
<v-list-tile-title v-text="item.title" />
</v-list-tile-content>
</v-list-tile>
</v-list-item-action>
<v-list-item-content>
<v-list-item-title v-text="item.title" />
</v-list-item-content>
</v-list-item>
</v-list>
</v-navigation-drawer>
<v-toolbar
<v-app-bar
:clipped-left="clipped"
fixed
app
>
<v-toolbar-side-icon @click="drawer = !drawer" />
<v-app-bar-nav-icon @click.stop="drawer = !drawer" />
<v-btn
icon
@click.stop="miniVariant = !miniVariant"
>
<v-icon>{{ `chevron_${miniVariant ? 'right' : 'left'}` }}</v-icon>
<v-icon>mdi-{{ `chevron-${miniVariant ? 'right' : 'left'}` }}</v-icon>
</v-btn>
<v-btn
icon
@click.stop="clipped = !clipped"
>
<v-icon>web</v-icon>
<v-icon>mdi-application</v-icon>
</v-btn>
<v-btn
icon
@click.stop="fixed = !fixed"
>
<v-icon>remove</v-icon>
<v-icon>mdi-minus</v-icon>
</v-btn>
<v-toolbar-title v-text="title" />
<v-spacer />
<v-btn
icon
@click.stop="rightDrawer = !rightDrawer"
>
<v-icon>menu</v-icon>
<v-icon>mdi-menu</v-icon>
</v-btn>
</v-toolbar>
</v-app-bar>
<v-content>
<v-container>
<nuxt />
Expand All @@ -69,14 +69,14 @@
fixed
>
<v-list>
<v-list-tile @click.native="right = !right">
<v-list-tile-action>
<v-list-item @click.native="right = !right">
<v-list-item-action>
<v-icon light>
compare_arrows
mdi-repeat
</v-icon>
</v-list-tile-action>
<v-list-tile-title>Switch drawer (click me)</v-list-tile-title>
</v-list-tile>
</v-list-item-action>
<v-list-item-title>Switch drawer (click me)</v-list-item-title>
</v-list-item>
</v-list>
</v-navigation-drawer>
<v-footer
Expand All @@ -97,12 +97,12 @@ export default {
fixed: false,
items: [
{
icon: 'apps',
icon: 'mdi-apps',
title: 'Welcome',
to: '/'
},
{
icon: 'bubble_chart',
icon: 'mdi-chart-bubble',
title: 'Inspire',
to: '/inspire'
}
Expand Down
3 changes: 1 addition & 2 deletions template/frameworks/vuetify/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
sm8
md6
>
<div class="text-xs-center">
<div class="text-center">
<logo />
<vuetify-logo />
</div>
Expand Down Expand Up @@ -68,7 +68,6 @@
<v-spacer />
<v-btn
color="primary"
flat
nuxt
to="/inspire"
>
Expand Down
2 changes: 1 addition & 1 deletion template/frameworks/vuetify/pages/inspire.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<v-layout>
<v-flex text-xs-center>
<v-flex class="text-center">
<img
src="/v.png"
alt="Vuetify.js"
Expand Down
31 changes: 15 additions & 16 deletions template/nuxt/nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,6 @@ module.exports = {
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
<%_ if (ui === 'vuetify') { _%>,
{
rel: 'stylesheet',
href:
'https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Material+Icons'
}
<%_ } _%>
]
},
/*
Expand Down Expand Up @@ -86,6 +79,8 @@ module.exports = {
<%_ if (ui === 'tailwind') { _%>
// Doc: https://github.com/nuxt-community/nuxt-tailwindcss
'@nuxtjs/tailwindcss',
<%_ } else if (ui === 'vuetify') { _%>
'@nuxtjs/vuetify',
<%_ } _%>
],
/*
Expand All @@ -101,8 +96,6 @@ module.exports = {
<%_ } else if (ui === 'buefy') { _%>
// Doc: https://buefy.github.io/#/documentation
'nuxt-buefy',
<%_ } else if (ui === 'vuetify') { _%>
'@nuxtjs/vuetify',
<%_ } _%>
<%_ if (axios) { _%>
// Doc: https://axios.nuxtjs.org/usage
Expand All @@ -126,14 +119,20 @@ module.exports = {
** https://github.com/nuxt-community/vuetify-module
*/
vuetify: {
customVariables: ['~/assets/variables.scss'],
theme: {
primary: colors.blue.darken2,
accent: colors.grey.darken3,
secondary: colors.amber.darken3,
info: colors.teal.lighten1,
warning: colors.amber.base,
error: colors.deepOrange.accent4,
success: colors.green.accent3
dark: true,
themes: {
dark: {
primary: colors.blue.darken2,
accent: colors.grey.darken3,
secondary: colors.amber.darken3,
info: colors.teal.lighten1,
warning: colors.amber.base,
error: colors.deepOrange.accent4,
success: colors.green.accent3
}
}
}
},
<%_ } _%>
Expand Down
35 changes: 16 additions & 19 deletions test/snapshots/index.test.js.md
Original file line number Diff line number Diff line change
Expand Up @@ -2992,8 +2992,7 @@ Generated by [AVA](https://ava.li).
'.gitignore',
'README.md',
'assets/README.md',
'assets/style/app.styl',
'assets/style/variables.styl',
'assets/variables.scss',
'components/Logo.vue',
'components/README.md',
'components/VuetifyLogo.vue',
Expand All @@ -3017,13 +3016,11 @@ Generated by [AVA](https://ava.li).

{
dependencies: {
'@nuxtjs/vuetify': '0.5.5',
nuxt: '^2.0.0',
},
devDependencies: {
'@nuxtjs/vuetify': '^1.0.0',
nodemon: '^1.18.9',
stylus: '^0.54.5',
'stylus-loader': '^3.0.2',
},
private: true,
scripts: {
Expand Down Expand Up @@ -3053,12 +3050,6 @@ Generated by [AVA](https://ava.li).
],␊
link: [␊
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }␊
,␊
{␊
rel: 'stylesheet',␊
href:␊
'https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Material+Icons'␊
}␊
]␊
},␊
/*␊
Expand All @@ -3079,26 +3070,32 @@ Generated by [AVA](https://ava.li).
** Nuxt.js dev-modules␊
*/␊
devModules: [␊
'@nuxtjs/vuetify',␊
],␊
/*␊
** Nuxt.js modules␊
*/␊
modules: [␊
'@nuxtjs/vuetify',␊
],␊
/*␊
** vuetify module configuration␊
** https://github.com/nuxt-community/vuetify-module␊
*/␊
vuetify: {␊
customVariables: ['~/assets/variables.scss'],␊
theme: {␊
primary: colors.blue.darken2,␊
accent: colors.grey.darken3,␊
secondary: colors.amber.darken3,␊
info: colors.teal.lighten1,␊
warning: colors.amber.base,␊
error: colors.deepOrange.accent4,␊
success: colors.green.accent3␊
dark: true,␊
themes: {␊
dark: {␊
primary: colors.blue.darken2,␊
accent: colors.grey.darken3,␊
secondary: colors.amber.darken3,␊
info: colors.teal.lighten1,␊
warning: colors.amber.base,␊
error: colors.deepOrange.accent4,␊
success: colors.green.accent3␊
}␊
}␊
}␊
},␊
/*␊
Expand Down
Binary file modified test/snapshots/index.test.js.snap
Binary file not shown.