diff --git a/client/src/app.vue b/client/src/app.vue index d7c4507..a9239d6 100644 --- a/client/src/app.vue +++ b/client/src/app.vue @@ -1,28 +1,14 @@ - - diff --git a/client/src/assets/scss/_global.scss b/client/src/assets/scss/_global.scss index 84d7579..6c57871 100644 --- a/client/src/assets/scss/_global.scss +++ b/client/src/assets/scss/_global.scss @@ -44,7 +44,6 @@ var { font-style: normal; } -// MISC. hr { border: none; border-top-style: solid; diff --git a/client/src/components/global/loader.vue b/client/src/components/global/loader.vue new file mode 100644 index 0000000..64947b9 --- /dev/null +++ b/client/src/components/global/loader.vue @@ -0,0 +1,110 @@ + + + + + \ No newline at end of file diff --git a/client/src/components/spells/spells-list.vue b/client/src/components/spells/spells-list.vue index 33f0e60..fc95577 100644 --- a/client/src/components/spells/spells-list.vue +++ b/client/src/components/spells/spells-list.vue @@ -62,6 +62,11 @@ @cancelAdd="cancelAdd" @addSpell="addSpell"/> +
+ +
@@ -74,7 +79,6 @@ import AddSpellCard from "./add-spell-card" // API import { RepositoryFactory } from "~/api/repositories" const Spells = RepositoryFactory.get('spells') -// const Schools = RepositoryFactory.get('schools') export default { name: 'spellslist', @@ -184,5 +188,8 @@ export default { \ No newline at end of file diff --git a/client/src/global-components.js b/client/src/global-components.js new file mode 100644 index 0000000..fc988cb --- /dev/null +++ b/client/src/global-components.js @@ -0,0 +1,7 @@ +import Navbar from './components/global/navbar/navbar' +import Loader from './components/global/loader' + +export default [ + Navbar, + Loader +] \ No newline at end of file diff --git a/client/src/main.js b/client/src/main.js index db0cc12..9f46591 100644 --- a/client/src/main.js +++ b/client/src/main.js @@ -3,38 +3,36 @@ import Vue from 'vue' import VueRouter from 'vue-router' import App from './app.vue' +import Globals from './global-components.js' +Globals.forEach(component => { + Vue.component(component.name, component) +}); + // Auth require('dotenv').config() -// Router -import routes from './routes' -Vue.use(VueRouter) - // Jquery import jquery from 'jquery' window.$ = jquery window.jquery = jquery -// Global styles +// Styles import './assets/scss/_global.scss' - -// Bootstrap import 'bootstrap/dist/css/bootstrap.css' import 'bootstrap-vue/dist/bootstrap-vue.css' import 'bootstrap/dist/js/bootstrap.js' + +// Plugins import { BootstrapVue } from 'bootstrap-vue' Vue.use(BootstrapVue) -// Masonry import { VueMasonryPlugin } from 'vue-masonry'; Vue.use(VueMasonryPlugin) -// Clipboard plugin import clipboard from 'v-clipboard' Vue.use(clipboard) -Vue.config.productionTip = false - +// FUNCTIONS var filter = function(text, length, clamp){ clamp = clamp || '...'; var node = document.createElement('div'); @@ -44,6 +42,9 @@ var filter = function(text, length, clamp){ }; Vue.filter('truncate', filter); +// Router +import routes from './routes' +Vue.use(VueRouter) const router = new VueRouter({ mode: 'history', routes, @@ -51,9 +52,9 @@ const router = new VueRouter({ linkExactActiveClass: "active", }); +// Mount Vue const app = new Vue({ render: h => h(App), router }) - app.$mount('#srs')