From c0ae85e53b3c51f09089308f5d16283cc4519475 Mon Sep 17 00:00:00 2001 From: Espen Bratberg Date: Sun, 19 Mar 2017 08:17:32 +0100 Subject: [PATCH 1/4] Update with-vuetify example with theme overrides --- examples/with-vuetify/README.md | 4 +++- examples/with-vuetify/css/app.styl | 1 + examples/with-vuetify/css/vendor/vuetify.styl | 14 ++++++++++++++ examples/with-vuetify/layouts/default.vue | 6 ------ examples/with-vuetify/nuxt.config.js | 13 ++++++++++++- examples/with-vuetify/package.json | 4 ++++ examples/with-vuetify/pages/index.vue | 9 +++++++-- 7 files changed, 41 insertions(+), 10 deletions(-) create mode 100644 examples/with-vuetify/css/app.styl create mode 100644 examples/with-vuetify/css/vendor/vuetify.styl delete mode 100644 examples/with-vuetify/layouts/default.vue diff --git a/examples/with-vuetify/README.md b/examples/with-vuetify/README.md index 4873ceb77b..04bf622643 100644 --- a/examples/with-vuetify/README.md +++ b/examples/with-vuetify/README.md @@ -1,4 +1,6 @@ # Using Vuetify.js with Nuxt.js -https://nuxtjs.org/examples/with-vuetify +https://nuxtjs.org/examples/with-vuetify
https://vuetifyjs.com/ + +*NOTE: Some Vuetify components needs Vue v2.2.x (or later) to work properly (Nuxt currently uses v2.1.x)* diff --git a/examples/with-vuetify/css/app.styl b/examples/with-vuetify/css/app.styl new file mode 100644 index 0000000000..0b24ada921 --- /dev/null +++ b/examples/with-vuetify/css/app.styl @@ -0,0 +1 @@ +@require './vendor/vuetify.styl' diff --git a/examples/with-vuetify/css/vendor/vuetify.styl b/examples/with-vuetify/css/vendor/vuetify.styl new file mode 100644 index 0000000000..6865590deb --- /dev/null +++ b/examples/with-vuetify/css/vendor/vuetify.styl @@ -0,0 +1,14 @@ +// Specify overrides (theme and/or base variables etc.) +// See https://vuetifyjs.com/quick-start +$theme := { + primary: #9c27b0 + accent: #ce93d8 + secondary: #424242 + info: #0D47A1 + warning: #ffb300 + error: #B71C1C + success: #2E7D32 +} + +// Import Vuetify styling +@require '~vuetify/src/stylus/main.styl' diff --git a/examples/with-vuetify/layouts/default.vue b/examples/with-vuetify/layouts/default.vue deleted file mode 100644 index 3f33e63651..0000000000 --- a/examples/with-vuetify/layouts/default.vue +++ /dev/null @@ -1,6 +0,0 @@ - diff --git a/examples/with-vuetify/nuxt.config.js b/examples/with-vuetify/nuxt.config.js index bd26adf454..9edc6811ef 100644 --- a/examples/with-vuetify/nuxt.config.js +++ b/examples/with-vuetify/nuxt.config.js @@ -1,7 +1,18 @@ + +const { join } = require('path') + module.exports = { build: { vendor: ['vuetify'] }, plugins: ['~plugins/vuetify.js'], - css: ['vuetify/dist/vuetify.min.css'] + css: [ + { src: join(__dirname, 'css/app.styl'), lang: 'styl' } + ], + head: { + link: [ + { rel: 'stylesheet', href: 'https://fonts.googleapis.com/css?family=Roboto' }, + { rel: 'stylesheet', href: 'https://fonts.googleapis.com/icon?family=Material+Icons' } + ] + } } diff --git a/examples/with-vuetify/package.json b/examples/with-vuetify/package.json index 0ee9083525..908878ba03 100644 --- a/examples/with-vuetify/package.json +++ b/examples/with-vuetify/package.json @@ -8,5 +8,9 @@ "dev": "nuxt", "build": "nuxt build", "start": "nuxt start" + }, + "devDependencies": { + "stylus": "^0.54.5", + "stylus-loader": "^3.0.1" } } diff --git a/examples/with-vuetify/pages/index.vue b/examples/with-vuetify/pages/index.vue index 5aeb83257a..8551eaff81 100644 --- a/examples/with-vuetify/pages/index.vue +++ b/examples/with-vuetify/pages/index.vue @@ -16,7 +16,12 @@ -
Main Content
+
+

Main content

+ Primary button + Secondary button + Success button +
@@ -33,7 +38,7 @@ } -