integrated vuejs into theme (builded with webpack
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user