integrated vuejs into theme (builded with webpack

This commit is contained in:
2019-04-09 00:21:00 +02:00
parent c344c09c96
commit 9dfc5af5c0
22 changed files with 14317 additions and 23 deletions

View File

@@ -1,7 +1,19 @@
(function($, Drupal, drupalSettings) {
import Vue from 'vue'
import store from 'vuejs/store'
import VLogin from 'vuejs/components/Login'
MaterioTheme = function(){
var _$body = $('body');
// require('theme/assets/styles/main.scss');
import 'theme/assets/styles/main.scss'
(function(Drupal, drupalSettings) {
var v_login = new Vue({
store,
render: h => h(VLogin)
}).$mount('#block-userlogin')
var MaterioTheme = function(){
// var _is_front = drupalSettings.path.isFront;
// ___ _ _
@@ -17,12 +29,12 @@
init();
} // end MaterioTheme()
$(document).ready(function($) {
if(drupalSettings.path.isFront){
// $(document).ready(function($) {
// if(drupalSettings.path.isFront){
var materiotheme = new MaterioTheme();
}else{
$('body').attr('booted', 'booted');
}
});
// }else{
// $('body').attr('booted', 'booted');
// }
// });
})(jQuery, Drupal, drupalSettings);
})(Drupal, drupalSettings);