inject home html content into vue componenent MainContent
This commit is contained in:
parent
5d2a8bc73b
commit
72dca11b5e
|
@ -385,15 +385,15 @@ eval("\n\nvar bind = __webpack_require__(/*! ./helpers/bind */ \"./node_modules/
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js?!./web/themes/custom/materiotheme/vuejs/components/Content/Test.vue?vue&type=script&lang=js&":
|
/***/ "./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js?!./web/themes/custom/materiotheme/vuejs/components/Content/MainContent.vue?vue&type=script&lang=js&":
|
||||||
/*!*************************************************************************************************************************************************************************************!*\
|
/*!********************************************************************************************************************************************************************************************!*\
|
||||||
!*** ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./web/themes/custom/materiotheme/vuejs/components/Content/Test.vue?vue&type=script&lang=js& ***!
|
!*** ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./web/themes/custom/materiotheme/vuejs/components/Content/MainContent.vue?vue&type=script&lang=js& ***!
|
||||||
\*************************************************************************************************************************************************************************************/
|
\********************************************************************************************************************************************************************************************/
|
||||||
/*! no static exports found */
|
/*! no static exports found */
|
||||||
/***/ (function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _default = {\n computed: _objectSpread({}, (0, _vuex.mapState)({\n token: function token(state) {\n return state.User.token;\n },\n isloggedin: function isloggedin(state) {\n return state.User.isloggedin;\n }\n }))\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Content/Test.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options");
|
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _default = {\n props: ['html'],\n computed: _objectSpread({}, (0, _vuex.mapState)({\n token: function token(state) {\n return state.User.token;\n },\n isloggedin: function isloggedin(state) {\n return state.User.isloggedin;\n }\n }))\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Content/MainContent.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options");
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
|
@ -558,15 +558,15 @@ eval("/* WEBPACK VAR INJECTION */(function(global) {var scope = typeof global !=
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./web/themes/custom/materiotheme/vuejs/components/Content/Test.vue?vue&type=template&id=8187962c&scoped=true&lang=html&":
|
/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./web/themes/custom/materiotheme/vuejs/components/Content/MainContent.vue?vue&type=template&id=4c8c1858&scoped=true&lang=html&":
|
||||||
/*!*************************************************************************************************************************************************************************************************************************************************************!*\
|
/*!********************************************************************************************************************************************************************************************************************************************************************!*\
|
||||||
!*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./web/themes/custom/materiotheme/vuejs/components/Content/Test.vue?vue&type=template&id=8187962c&scoped=true&lang=html& ***!
|
!*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./web/themes/custom/materiotheme/vuejs/components/Content/MainContent.vue?vue&type=template&id=4c8c1858&scoped=true&lang=html& ***!
|
||||||
\*************************************************************************************************************************************************************************************************************************************************************/
|
\********************************************************************************************************************************************************************************************************************************************************************/
|
||||||
/*! exports provided: render, staticRenderFns */
|
/*! exports provided: render, staticRenderFns */
|
||||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\"div\", { attrs: { id: \"block-pagetitle\" } }, [\n _c(\"h1\", [\n _vm._v(\"Test Shared Store ( logged in: \" + _vm._s(_vm.isloggedin) + \" )\")\n ]),\n _vm._v(\" \"),\n _vm.isloggedin ? _c(\"h2\", [_vm._v(\"Shared store is working\")]) : _vm._e()\n ])\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\n\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Content/Test.vue?./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options");
|
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\"div\", {\n attrs: { id: \"main-content\" },\n domProps: { innerHTML: _vm._s(_vm.html) }\n })\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\n\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Content/MainContent.vue?./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options");
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
|
@ -707,7 +707,7 @@ eval("var g; // This works in non-strict mode\n\ng = function () {\n return thi
|
||||||
/***/ (function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
eval("\n\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm.js\"));\n\nvar _store = _interopRequireDefault(__webpack_require__(/*! vuejs/store */ \"./web/themes/custom/materiotheme/vuejs/store/index.js\"));\n\nvar _UserBlock = _interopRequireDefault(__webpack_require__(/*! vuejs/components/User/UserBlock */ \"./web/themes/custom/materiotheme/vuejs/components/User/UserBlock.vue\"));\n\nvar _Test = _interopRequireDefault(__webpack_require__(/*! vuejs/components/Content/Test */ \"./web/themes/custom/materiotheme/vuejs/components/Content/Test.vue\"));\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n\n__webpack_require__(/*! theme/assets/styles/main.scss */ \"./web/themes/custom/materiotheme/assets/styles/main.scss\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n(function (Drupal, drupalSettings) {\n var MaterioTheme = function MaterioTheme() {\n var v_user_block, v_test_content; // var _is_front = drupalSettings.path.isFront;\n\n console.log('drupalSettings', drupalSettings); // ___ _ _\n // |_ _|_ _ (_) |_\n // | || ' \\| | _|\n // |___|_||_|_|\\__|\n\n function init() {\n console.log(\"MaterioTheme init()\");\n initVues();\n }\n\n function initVues() {\n initUserVBlock(); // initTestVContent()\n }\n\n function initUserVBlock() {\n var mount_point = drupalSettings.user.uid !== 0 ? '#block-userblock' : '#block-userlogin';\n var props = {\n title: \"\"\n };\n\n switch (mount_point) {\n case '#block-userlogin':\n var $block = document.querySelector(mount_point);\n props = {\n title: $block.querySelector('h2').textContent,\n form: {\n ph_email: $block.querySelector('input#edit-name').getAttribute('placeholder'),\n ph_pass: $block.querySelector('input#edit-pass').getAttribute('placeholder'),\n btn_value: $block.querySelector('input#edit-submit').getAttribute('value'),\n register: {\n title: $block.querySelector('a.create-account-link').textContent,\n href: $block.querySelector('a.create-account-link').getAttribute('href')\n },\n reset: {\n title: $block.querySelector('a.request-password-link').textContent,\n href: $block.querySelector('a.request-password-link').getAttribute('href')\n }\n }\n };\n break;\n\n case '#block-userblock':\n default:\n break;\n } // console.log(props);\n\n\n v_user_block = new _vue.default({\n store: _store.default,\n computed: _objectSpread({}, (0, _vuex.mapState)({\n isloggedin: function isloggedin(state) {\n return state.User.isloggedin;\n }\n })),\n created: function created() {\n if (drupalSettings.user.uid !== 0) {\n this.$store.commit('User/setUid', drupalSettings.user.uid);\n this.$store.dispatch('User/getUser');\n }\n },\n render: function render(h) {\n return h(_UserBlock.default, {\n props: props\n });\n }\n }).$mount(mount_point);\n console.log('initUserVBlock', v_user_block);\n }\n\n function initTestVContent() {\n v_test_content = new _vue.default({\n store: _store.default,\n render: function render(h) {\n return h(_Test.default);\n }\n }).$mount('#block-pagetitle'); // console.log('initTestVContent', v_test_content);\n }\n\n init();\n }; // end MaterioTheme()\n\n\n var materiotheme = new MaterioTheme();\n})(Drupal, drupalSettings);\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/assets/scripts/main.js?");
|
eval("\n\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm.js\"));\n\nvar _store = _interopRequireDefault(__webpack_require__(/*! vuejs/store */ \"./web/themes/custom/materiotheme/vuejs/store/index.js\"));\n\nvar _UserBlock = _interopRequireDefault(__webpack_require__(/*! vuejs/components/User/UserBlock */ \"./web/themes/custom/materiotheme/vuejs/components/User/UserBlock.vue\"));\n\nvar _MainContent = _interopRequireDefault(__webpack_require__(/*! vuejs/components/Content/MainContent */ \"./web/themes/custom/materiotheme/vuejs/components/Content/MainContent.vue\"));\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n\n__webpack_require__(/*! theme/assets/styles/main.scss */ \"./web/themes/custom/materiotheme/assets/styles/main.scss\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n(function (Drupal, drupalSettings) {\n var MaterioTheme = function MaterioTheme() {\n var v_user_block, v_main_content; // var _is_front = drupalSettings.path.isFront;\n\n console.log('drupalSettings', drupalSettings); // ___ _ _\n // |_ _|_ _ (_) |_\n // | || ' \\| | _|\n // |___|_||_|_|\\__|\n\n function init() {\n console.log(\"MaterioTheme init()\");\n initVues();\n }\n\n function initVues() {\n initUserVBlock();\n initVMainContent();\n }\n\n function initUserVBlock() {\n var mount_point = drupalSettings.user.uid !== 0 ? '#block-userblock' : '#block-userlogin';\n var props = {\n title: \"\"\n };\n\n switch (mount_point) {\n case '#block-userlogin':\n var $block = document.querySelector(mount_point);\n props = {\n title: $block.querySelector('h2').textContent,\n form: {\n ph_email: $block.querySelector('input#edit-name').getAttribute('placeholder'),\n ph_pass: $block.querySelector('input#edit-pass').getAttribute('placeholder'),\n btn_value: $block.querySelector('input#edit-submit').getAttribute('value'),\n register: {\n title: $block.querySelector('a.create-account-link').textContent,\n href: $block.querySelector('a.create-account-link').getAttribute('href')\n },\n reset: {\n title: $block.querySelector('a.request-password-link').textContent,\n href: $block.querySelector('a.request-password-link').getAttribute('href')\n }\n }\n };\n break;\n\n case '#block-userblock':\n default:\n break;\n } // console.log(props);\n\n\n v_user_block = new _vue.default({\n store: _store.default,\n computed: _objectSpread({}, (0, _vuex.mapState)({\n isloggedin: function isloggedin(state) {\n return state.User.isloggedin;\n }\n })),\n created: function created() {\n if (drupalSettings.user.uid !== 0) {\n this.$store.commit('User/setUid', drupalSettings.user.uid);\n this.$store.dispatch('User/getUser');\n }\n },\n render: function render(h) {\n return h(_UserBlock.default, {\n props: props\n });\n }\n }).$mount(mount_point);\n console.log('initUserVBlock', v_user_block);\n }\n\n function initVMainContent() {\n var $main_content = document.querySelector('#main-content');\n console.log('main-content', $main_content);\n var main_html = $main_content.innerHTML;\n v_main_content = new _vue.default({\n store: _store.default,\n render: function render(h) {\n return h(_MainContent.default, {\n props: {\n html: main_html\n }\n });\n }\n }).$mount('#main-content'); // console.log('initTestVContent', v_test_content);\n }\n\n init();\n }; // end MaterioTheme()\n\n\n var materiotheme = new MaterioTheme();\n})(Drupal, drupalSettings);\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/assets/scripts/main.js?");
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
|
@ -746,39 +746,39 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./web/themes/custom/materiotheme/vuejs/components/Content/Test.vue":
|
/***/ "./web/themes/custom/materiotheme/vuejs/components/Content/MainContent.vue":
|
||||||
/*!**************************************************************************!*\
|
/*!*********************************************************************************!*\
|
||||||
!*** ./web/themes/custom/materiotheme/vuejs/components/Content/Test.vue ***!
|
!*** ./web/themes/custom/materiotheme/vuejs/components/Content/MainContent.vue ***!
|
||||||
\**************************************************************************/
|
\*********************************************************************************/
|
||||||
/*! no static exports found */
|
/*! no static exports found */
|
||||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Test_vue_vue_type_template_id_8187962c_scoped_true_lang_html___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Test.vue?vue&type=template&id=8187962c&scoped=true&lang=html& */ \"./web/themes/custom/materiotheme/vuejs/components/Content/Test.vue?vue&type=template&id=8187962c&scoped=true&lang=html&\");\n/* harmony import */ var _Test_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Test.vue?vue&type=script&lang=js& */ \"./web/themes/custom/materiotheme/vuejs/components/Content/Test.vue?vue&type=script&lang=js&\");\n/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _Test_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _Test_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));\n/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ \"./node_modules/vue-loader/lib/runtime/componentNormalizer.js\");\n\n\n\n\n\n/* normalize component */\n\nvar component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(\n _Test_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n _Test_vue_vue_type_template_id_8187962c_scoped_true_lang_html___WEBPACK_IMPORTED_MODULE_0__[\"render\"],\n _Test_vue_vue_type_template_id_8187962c_scoped_true_lang_html___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"],\n false,\n null,\n \"8187962c\",\n null\n \n)\n\n/* hot reload */\nif (false) { var api; }\ncomponent.options.__file = \"web/themes/custom/materiotheme/vuejs/components/Content/Test.vue\"\n/* harmony default export */ __webpack_exports__[\"default\"] = (component.exports);\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Content/Test.vue?");
|
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _MainContent_vue_vue_type_template_id_4c8c1858_scoped_true_lang_html___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./MainContent.vue?vue&type=template&id=4c8c1858&scoped=true&lang=html& */ \"./web/themes/custom/materiotheme/vuejs/components/Content/MainContent.vue?vue&type=template&id=4c8c1858&scoped=true&lang=html&\");\n/* harmony import */ var _MainContent_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./MainContent.vue?vue&type=script&lang=js& */ \"./web/themes/custom/materiotheme/vuejs/components/Content/MainContent.vue?vue&type=script&lang=js&\");\n/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _MainContent_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _MainContent_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));\n/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ \"./node_modules/vue-loader/lib/runtime/componentNormalizer.js\");\n\n\n\n\n\n/* normalize component */\n\nvar component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(\n _MainContent_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n _MainContent_vue_vue_type_template_id_4c8c1858_scoped_true_lang_html___WEBPACK_IMPORTED_MODULE_0__[\"render\"],\n _MainContent_vue_vue_type_template_id_4c8c1858_scoped_true_lang_html___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"],\n false,\n null,\n \"4c8c1858\",\n null\n \n)\n\n/* hot reload */\nif (false) { var api; }\ncomponent.options.__file = \"web/themes/custom/materiotheme/vuejs/components/Content/MainContent.vue\"\n/* harmony default export */ __webpack_exports__[\"default\"] = (component.exports);\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Content/MainContent.vue?");
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./web/themes/custom/materiotheme/vuejs/components/Content/Test.vue?vue&type=script&lang=js&":
|
/***/ "./web/themes/custom/materiotheme/vuejs/components/Content/MainContent.vue?vue&type=script&lang=js&":
|
||||||
/*!***************************************************************************************************!*\
|
/*!**********************************************************************************************************!*\
|
||||||
!*** ./web/themes/custom/materiotheme/vuejs/components/Content/Test.vue?vue&type=script&lang=js& ***!
|
!*** ./web/themes/custom/materiotheme/vuejs/components/Content/MainContent.vue?vue&type=script&lang=js& ***!
|
||||||
\***************************************************************************************************/
|
\**********************************************************************************************************/
|
||||||
/*! no static exports found */
|
/*! no static exports found */
|
||||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Test_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/babel-loader/lib!../../../../../../../node_modules/vue-loader/lib??vue-loader-options!./Test.vue?vue&type=script&lang=js& */ \"./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js?!./web/themes/custom/materiotheme/vuejs/components/Content/Test.vue?vue&type=script&lang=js&\");\n/* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Test_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Test_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);\n/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Test_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Test_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));\n /* harmony default export */ __webpack_exports__[\"default\"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Test_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a); \n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Content/Test.vue?");
|
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MainContent_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/babel-loader/lib!../../../../../../../node_modules/vue-loader/lib??vue-loader-options!./MainContent.vue?vue&type=script&lang=js& */ \"./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js?!./web/themes/custom/materiotheme/vuejs/components/Content/MainContent.vue?vue&type=script&lang=js&\");\n/* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MainContent_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MainContent_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);\n/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MainContent_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MainContent_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));\n /* harmony default export */ __webpack_exports__[\"default\"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MainContent_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a); \n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Content/MainContent.vue?");
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./web/themes/custom/materiotheme/vuejs/components/Content/Test.vue?vue&type=template&id=8187962c&scoped=true&lang=html&":
|
/***/ "./web/themes/custom/materiotheme/vuejs/components/Content/MainContent.vue?vue&type=template&id=4c8c1858&scoped=true&lang=html&":
|
||||||
/*!*******************************************************************************************************************************!*\
|
/*!**************************************************************************************************************************************!*\
|
||||||
!*** ./web/themes/custom/materiotheme/vuejs/components/Content/Test.vue?vue&type=template&id=8187962c&scoped=true&lang=html& ***!
|
!*** ./web/themes/custom/materiotheme/vuejs/components/Content/MainContent.vue?vue&type=template&id=4c8c1858&scoped=true&lang=html& ***!
|
||||||
\*******************************************************************************************************************************/
|
\**************************************************************************************************************************************/
|
||||||
/*! exports provided: render, staticRenderFns */
|
/*! exports provided: render, staticRenderFns */
|
||||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_Test_vue_vue_type_template_id_8187962c_scoped_true_lang_html___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../../node_modules/vue-loader/lib??vue-loader-options!./Test.vue?vue&type=template&id=8187962c&scoped=true&lang=html& */ \"./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./web/themes/custom/materiotheme/vuejs/components/Content/Test.vue?vue&type=template&id=8187962c&scoped=true&lang=html&\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_Test_vue_vue_type_template_id_8187962c_scoped_true_lang_html___WEBPACK_IMPORTED_MODULE_0__[\"render\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_Test_vue_vue_type_template_id_8187962c_scoped_true_lang_html___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"]; });\n\n\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Content/Test.vue?");
|
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_MainContent_vue_vue_type_template_id_4c8c1858_scoped_true_lang_html___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../../node_modules/vue-loader/lib??vue-loader-options!./MainContent.vue?vue&type=template&id=4c8c1858&scoped=true&lang=html& */ \"./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./web/themes/custom/materiotheme/vuejs/components/Content/MainContent.vue?vue&type=template&id=4c8c1858&scoped=true&lang=html&\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_MainContent_vue_vue_type_template_id_4c8c1858_scoped_true_lang_html___WEBPACK_IMPORTED_MODULE_0__[\"render\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_MainContent_vue_vue_type_template_id_4c8c1858_scoped_true_lang_html___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"]; });\n\n\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/components/Content/MainContent.vue?");
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import store from 'vuejs/store'
|
import store from 'vuejs/store'
|
||||||
import VUserBlock from 'vuejs/components/User/UserBlock'
|
import VUserBlock from 'vuejs/components/User/UserBlock'
|
||||||
import VTestContent from 'vuejs/components/Content/Test'
|
import VMainContent from 'vuejs/components/Content/MainContent'
|
||||||
|
|
||||||
import { mapState } from 'vuex'
|
import { mapState } from 'vuex'
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ import 'theme/assets/styles/main.scss'
|
||||||
|
|
||||||
var MaterioTheme = function(){
|
var MaterioTheme = function(){
|
||||||
|
|
||||||
var v_user_block, v_test_content;
|
var v_user_block, v_main_content;
|
||||||
// var _is_front = drupalSettings.path.isFront;
|
// var _is_front = drupalSettings.path.isFront;
|
||||||
|
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ import 'theme/assets/styles/main.scss'
|
||||||
|
|
||||||
function initVues(){
|
function initVues(){
|
||||||
initUserVBlock()
|
initUserVBlock()
|
||||||
// initTestVContent()
|
initVMainContent()
|
||||||
}
|
}
|
||||||
|
|
||||||
function initUserVBlock(){
|
function initUserVBlock(){
|
||||||
|
@ -81,11 +81,14 @@ import 'theme/assets/styles/main.scss'
|
||||||
console.log('initUserVBlock', v_user_block);
|
console.log('initUserVBlock', v_user_block);
|
||||||
}
|
}
|
||||||
|
|
||||||
function initTestVContent(){
|
function initVMainContent(){
|
||||||
v_test_content = new Vue({
|
let $main_content = document.querySelector('#main-content')
|
||||||
|
console.log('main-content', $main_content);
|
||||||
|
let main_html = $main_content.innerHTML
|
||||||
|
v_main_content = new Vue({
|
||||||
store,
|
store,
|
||||||
render: h => h(VTestContent)
|
render: h => h(VMainContent, {props:{html:main_html}})
|
||||||
}).$mount('#block-pagetitle')
|
}).$mount('#main-content')
|
||||||
// console.log('initTestVContent', v_test_content);
|
// console.log('initTestVContent', v_test_content);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -59,14 +59,14 @@
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<main role="main">
|
<main role="main">
|
||||||
{% if page.content.messages %}
|
{% if page.content.messages %}
|
||||||
<aside class="messages">
|
<aside class="messages">
|
||||||
{{ page.content.messages }}
|
{{ page.content.messages }}
|
||||||
</aside>
|
</aside>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="layout-content">
|
<div id="main-content">
|
||||||
{{ page.content|without('messages') }}
|
{{ page.content|without('messages') }}
|
||||||
</div>{# /.layout-content #}
|
</div>{# /.layout-content #}
|
||||||
</main>
|
</main>
|
||||||
|
|
|
@ -1,14 +1,12 @@
|
||||||
<template lang="html">
|
<template lang="html">
|
||||||
<div id="block-pagetitle" class="">
|
<div id="main-content" v-html="html"></div>
|
||||||
<h1>Test Shared Store ( logged in: {{ isloggedin }} )</h1>
|
|
||||||
<h2 v-if="isloggedin">Shared store is working</h2>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapState, mapActions } from 'vuex'
|
import { mapState, mapActions } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
props:['html'],
|
||||||
computed: {
|
computed: {
|
||||||
...mapState({
|
...mapState({
|
||||||
token: state => state.User.token,
|
token: state => state.User.token,
|
||||||
|
@ -19,4 +17,5 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
</style>
|
</style>
|
Loading…
Reference in New Issue