diff --git a/package.json b/package.json index cce5d4a..391aa23 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ }, "dependencies": { "axios": "^0.21.1", + "bootstrap-vue": "^2.21.2", "core-js": "^3.6.5", "d3": "^6.5.0", "vue": "^2.6.11", diff --git a/src/App.vue b/src/App.vue index 7704b4f..f54c0a2 100644 --- a/src/App.vue +++ b/src/App.vue @@ -33,5 +33,6 @@ export default { } - diff --git a/src/assets/scss/variables.scss b/src/assets/scss/_variables.scss similarity index 100% rename from src/assets/scss/variables.scss rename to src/assets/scss/_variables.scss diff --git a/src/assets/scss/globals.scss b/src/assets/scss/globals.scss new file mode 100644 index 0000000..9f96714 --- /dev/null +++ b/src/assets/scss/globals.scss @@ -0,0 +1,23 @@ +/* + ╭─────────────────────────────────────────────────────────────────╮ + │ │ + │ /!\ DO NOT IMPORT OR DEFINE ACTUAL RULES INTO THIS FILE /!\ │ + │ │ + │ Only things that disappear after scss compilation is allowed. │ + │ │ + ╰─────────────────────────────────────────────────────────────────╯ + + This file is magically imported into every components so that scss variables and + mixins can be accessed. + But if some rules are defined here, they will be copied into the final build as many + times as there are components… + +*/ + +@import 'variables'; + +@import '~bootstrap/scss/functions'; +@import '~bootstrap/scss/variables'; +@import '~bootstrap/scss/mixins'; + +@import '~bootstrap-vue/src/variables'; diff --git a/src/assets/scss/main.scss b/src/assets/scss/main.scss index 45b36fc..7070543 100644 --- a/src/assets/scss/main.scss +++ b/src/assets/scss/main.scss @@ -1,5 +1,10 @@ @import 'variables'; +// Bootstrap (temp ?) +@import '~bootstrap/scss/bootstrap.scss'; +@import '~bootstrap-vue/src/index.scss'; + + html, body, #app, main { height: 100%; margin: 0; diff --git a/src/main.js b/src/main.js index af869f0..aaf8d7e 100644 --- a/src/main.js +++ b/src/main.js @@ -1,17 +1,17 @@ import Vue from 'vue' +import BootstrapVue from 'bootstrap-vue' import Meta from 'vue-meta' import Vue2TouchEvents from 'vue2-touch-events' import router from './router' import store from './store' import App from './App' -import '@/assets/scss/main.scss' +Vue.use(BootstrapVue) Vue.use(Meta) Vue.use(Vue2TouchEvents) - new Vue({ router, store, diff --git a/vue.config.js b/vue.config.js index 7af0d87..8c320bd 100644 --- a/vue.config.js +++ b/vue.config.js @@ -11,7 +11,7 @@ module.exports = { css: { loaderOptions: { sass: { - prependData: '@import "@/assets/scss/variables.scss";' + prependData: '@import "@/assets/scss/_variables.scss";' } } },