main.js 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * I'll be there, 2. An oversimplified application to register attendees at a conference or event.
  3. *
  4. * Copyright 2016-2017 Davide Alberani <da@erlug.linux.it>, RaspiBO <info@raspibo.org>
  5. *
  6. * Licensed under the Apache License, Version 2.0 (the "License");
  7. * you may not use this file except in compliance with the License.
  8. * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. import Vue from 'vue';
  17. import Vuex from 'vuex';
  18. import VueRouter from 'vue-router';
  19. import VueResource from 'vue-resource';
  20. import VueMaterial from 'vue-material';
  21. import 'vue-material/dist/vue-material.css';
  22. import 'roboto-fontface/css/roboto/roboto-fontface.css';
  23. import 'material-design-icons/iconfont/material-icons.css';
  24. import jQuery from 'jquery';
  25. import store_data from './store.js';
  26. import App from './App';
  27. import User from './User';
  28. import Users from './Users';
  29. import Toolbar from './Toolbar';
  30. import IbtFooter from './IbtFooter';
  31. Vue.use(Vuex);
  32. Vue.use(VueRouter);
  33. Vue.use(VueResource);
  34. Vue.use(VueMaterial);
  35. // disable ink ripple.
  36. Vue.material.inkRipple = false;
  37. var routes = [
  38. {path: '/', name: 'home', component: App},
  39. {path: '/day/', name: 'days', component: App},
  40. {path: '/day/:day', name: 'day', component: App},
  41. {path: '/user/', name: 'users', component: Users},
  42. {path: '/user/:id', name: 'user', component: User}
  43. ];
  44. const store = new Vuex.Store(store_data);
  45. const router = new VueRouter({routes});
  46. var vue = new Vue({
  47. el: '#app',
  48. store: store,
  49. template: '<div id="app"><toolbar /><router-view class="view"></router-view><ibt-footer /></div>',
  50. router: router,
  51. components: { App, Toolbar, IbtFooter, Users, User }
  52. });