diff --git a/motorradig/.idea/workspace.xml b/motorradig/.idea/workspace.xml
index 374d8ba..1a4845a 100644
--- a/motorradig/.idea/workspace.xml
+++ b/motorradig/.idea/workspace.xml
@@ -2,10 +2,16 @@
+
+
+
+
+
+
@@ -137,8 +143,9 @@
+
-
+
@@ -148,16 +155,16 @@
-
-
-
-
+
-
+
+
+
+
@@ -224,6 +231,7 @@
+
@@ -251,13 +259,15 @@
-
-
+
+
+
-
-
+
+
+
\ No newline at end of file
diff --git a/motorradig/composer.phar b/motorradig/composer.phar
new file mode 100644
index 0000000..57fce95
Binary files /dev/null and b/motorradig/composer.phar differ
diff --git a/motorradig/database/seeds/DatabaseSeeder.php b/motorradig/database/seeds/DatabaseSeeder.php
index 39799f6..07d0727 100644
--- a/motorradig/database/seeds/DatabaseSeeder.php
+++ b/motorradig/database/seeds/DatabaseSeeder.php
@@ -28,6 +28,12 @@ class DatabaseSeeder extends Seeder
'body' => '
http://www.bmw-motorrad.de
http://motorrad.suzuki.de/'
]);
+ DB::table('main')->insert([
+ 'page' => 'links',
+ 'body' => 'Willkommen auf der Homepage der MotorradIG.
'
+ ]);
+
+
DB::table('pagecontents')->insert([
'page' => 'impressum',
'body' => 'Impressum
@@ -41,5 +47,5 @@ Email: motorradig (at) aol.com
© bei Motorrad-IG 2009
'
]);
}
-
+
}
diff --git a/motorradig/install_composer.sh b/motorradig/install_composer.sh
new file mode 100644
index 0000000..8f59528
--- /dev/null
+++ b/motorradig/install_composer.sh
@@ -0,0 +1,4 @@
+php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
+php -r "if (hash_file('sha384', 'composer-setup.php') === 'c5b9b6d368201a9db6f74e2611495f369991b72d9c8cbd3ffbc63edff210eb73d46ffbfce88669ad33695ef77dc76976') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
+php composer-setup.php
+php -r "unlink('composer-setup.php');"
diff --git a/motorradig/public/js/Icon.js b/motorradig/public/js/Icon.js
index 8557e02..9af7d34 100644
--- a/motorradig/public/js/Icon.js
+++ b/motorradig/public/js/Icon.js
@@ -86,25 +86,312 @@
/************************************************************************/
/******/ ({
-/***/ "./resources/js/views/components/Icon.js":
-/*!***********************************************!*\
- !*** ./resources/js/views/components/Icon.js ***!
- \***********************************************/
+/***/ "./resources/js/Icon.js":
+/*!******************************!*\
+ !*** ./resources/js/Icon.js ***!
+ \******************************/
/*! no static exports found */
/***/ (function(module, exports) {
-throw new Error("Module build failed (from ./node_modules/babel-loader/lib/index.js):\nError: ENOENT: no such file or directory, open '/Users/tschneider/dev/repo/motorradig/motorradig/resources/js/views/components/Icon.js'");
+function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
+
+/******/
+(function (modules) {
+ // webpackBootstrap
+
+ /******/
+ // The module cache
+
+ /******/
+ var installedModules = {};
+ /******/
+
+ /******/
+ // The require function
+
+ /******/
+
+ function __webpack_require__(moduleId) {
+ /******/
+
+ /******/
+ // Check if module is in cache
+
+ /******/
+ if (installedModules[moduleId]) {
+ /******/
+ return installedModules[moduleId].exports;
+ /******/
+ }
+ /******/
+ // Create a new module (and put it into the cache)
+
+ /******/
+
+
+ var module = installedModules[moduleId] = {
+ /******/
+ i: moduleId,
+
+ /******/
+ l: false,
+
+ /******/
+ exports: {}
+ /******/
+
+ };
+ /******/
+
+ /******/
+ // Execute the module function
+
+ /******/
+
+ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+ /******/
+
+ /******/
+ // Flag the module as loaded
+
+ /******/
+
+ module.l = true;
+ /******/
+
+ /******/
+ // Return the exports of the module
+
+ /******/
+
+ return module.exports;
+ /******/
+ }
+ /******/
+
+ /******/
+
+ /******/
+ // expose the modules object (__webpack_modules__)
+
+ /******/
+
+
+ __webpack_require__.m = modules;
+ /******/
+
+ /******/
+ // expose the module cache
+
+ /******/
+
+ __webpack_require__.c = installedModules;
+ /******/
+
+ /******/
+ // define getter function for harmony exports
+
+ /******/
+
+ __webpack_require__.d = function (exports, name, getter) {
+ /******/
+ if (!__webpack_require__.o(exports, name)) {
+ /******/
+ Object.defineProperty(exports, name, {
+ enumerable: true,
+ get: getter
+ });
+ /******/
+ }
+ /******/
+
+ };
+ /******/
+
+ /******/
+ // define __esModule on exports
+
+ /******/
+
+
+ __webpack_require__.r = function (exports) {
+ /******/
+ if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
+ /******/
+ Object.defineProperty(exports, Symbol.toStringTag, {
+ value: 'Module'
+ });
+ /******/
+ }
+ /******/
+
+
+ Object.defineProperty(exports, '__esModule', {
+ value: true
+ });
+ /******/
+ };
+ /******/
+
+ /******/
+ // create a fake namespace object
+
+ /******/
+ // mode & 1: value is a module id, require it
+
+ /******/
+ // mode & 2: merge all properties of value into the ns
+
+ /******/
+ // mode & 4: return value when already ns object
+
+ /******/
+ // mode & 8|1: behave like require
+
+ /******/
+
+
+ __webpack_require__.t = function (value, mode) {
+ /******/
+ if (mode & 1) value = __webpack_require__(value);
+ /******/
+
+ if (mode & 8) return value;
+ /******/
+
+ if (mode & 4 && _typeof(value) === 'object' && value && value.__esModule) return value;
+ /******/
+
+ var ns = Object.create(null);
+ /******/
+
+ __webpack_require__.r(ns);
+ /******/
+
+
+ Object.defineProperty(ns, 'default', {
+ enumerable: true,
+ value: value
+ });
+ /******/
+
+ if (mode & 2 && typeof value != 'string') for (var key in value) {
+ __webpack_require__.d(ns, key, function (key) {
+ return value[key];
+ }.bind(null, key));
+ }
+ /******/
+
+ return ns;
+ /******/
+ };
+ /******/
+
+ /******/
+ // getDefaultExport function for compatibility with non-harmony modules
+
+ /******/
+
+
+ __webpack_require__.n = function (module) {
+ /******/
+ var getter = module && module.__esModule ?
+ /******/
+ function getDefault() {
+ return module['default'];
+ } :
+ /******/
+ function getModuleExports() {
+ return module;
+ };
+ /******/
+
+ __webpack_require__.d(getter, 'a', getter);
+ /******/
+
+
+ return getter;
+ /******/
+ };
+ /******/
+
+ /******/
+ // Object.prototype.hasOwnProperty.call
+
+ /******/
+
+
+ __webpack_require__.o = function (object, property) {
+ return Object.prototype.hasOwnProperty.call(object, property);
+ };
+ /******/
+
+ /******/
+ // __webpack_public_path__
+
+ /******/
+
+
+ __webpack_require__.p = "/";
+ /******/
+
+ /******/
+
+ /******/
+ // Load entry module and return exports
+
+ /******/
+
+ return __webpack_require__(__webpack_require__.s = 1);
+ /******/
+})(
+/************************************************************************/
+
+/******/
+{
+ /***/
+ "./resources/js/views/components/Icon.js":
+ /*!***********************************************!*\
+ !*** ./resources/js/views/components/Icon.js ***!
+ \***********************************************/
+
+ /*! no static exports found */
+
+ /***/
+ function resourcesJsViewsComponentsIconJs(module, exports) {
+ throw new Error("Module build failed (from ./node_modules/babel-loader/lib/index.js):\nError: ENOENT: no such file or directory, open '/Users/tschneider/dev/repo/motorradig/motorradig/resources/js/views/components/Icon.js'");
+ /***/
+ },
+
+ /***/
+ 1:
+ /*!*****************************************************!*\
+ !*** multi ./resources/js/views/components/Icon.js ***!
+ \*****************************************************/
+
+ /*! no static exports found */
+
+ /***/
+ function _(module, exports, __webpack_require__) {
+ module.exports = __webpack_require__(
+ /*! /Users/tschneider/dev/repo/motorradig/motorradig/resources/js/views/components/Icon.js */
+ "./resources/js/views/components/Icon.js");
+ /***/
+ }
+ /******/
+
+});
/***/ }),
/***/ 1:
-/*!*****************************************************!*\
- !*** multi ./resources/js/views/components/Icon.js ***!
- \*****************************************************/
+/*!************************************!*\
+ !*** multi ./resources/js/Icon.js ***!
+ \************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
-module.exports = __webpack_require__(/*! /Users/tschneider/dev/repo/motorradig/motorradig/resources/js/views/components/Icon.js */"./resources/js/views/components/Icon.js");
+module.exports = __webpack_require__(/*! /mnt/d/repos/motorradig/motorradig/resources/js/Icon.js */"./resources/js/Icon.js");
/***/ })
diff --git a/motorradig/public/js/app.js b/motorradig/public/js/app.js
index e49d445..56f04e0 100644
--- a/motorradig/public/js/app.js
+++ b/motorradig/public/js/app.js
@@ -1925,14 +1925,14 @@ __webpack_require__.r(__webpack_exports__);
var _this = this;
axios.post('http://localhost:8000/api/v1/auth/save_page', {
- page: 'testpage',
+ page: this.$store.state.page_name,
body: this.editor.view.docView.dom.innerHTML
}, {
headers: {
'Authorization': 'Bearer ' + this.$store.state.user_token
}
}).then(function (res) {
- console.log("savePage: Wrote Testpage");
+ console.log("savePage: Wrote " + _this.$store.state.page_name);
console.log("Going back to main view");
_this.$router.push("/");
@@ -2007,6 +2007,10 @@ __webpack_require__.r(__webpack_exports__);
};
},
methods: {
+ set_page: function set_page(pageName) {
+ this.$store.state.page_name = pageName;
+ this.loadPage();
+ },
logout: function logout() {
var _this = this;
@@ -2034,29 +2038,17 @@ __webpack_require__.r(__webpack_exports__);
var _this2 = this;
axios.post('http://localhost:8000/api/v1/load_page', {
- page: 'testpage'
+ page: this.$store.state.page_name
}, {
headers: {
'Authorization': 'Bearer ' + this.$store.state.user_token
}
}).then(function (res) {
- console.log("savePage: Loading Testpage");
+ console.log("loadPage: Loading Testpage");
console.log("Body:");
console.log(res.data.body);
_this2.$store.state.page_content = res.data.body;
});
- },
- savePage: function savePage() {
- axios.post('http://localhost:8000/api/v1/auth/save_page', {
- page: 'testpage',
- body: 'testbody'
- }, {
- headers: {
- 'Authorization': 'Bearer ' + this.$store.state.user_token
- }
- }).then(function (res) {
- console.log("savePage: Wrote Testpage");
- });
}
},
created: function created() {
@@ -30866,40 +30858,19 @@ var render = function() {
[
_c(
"button",
- {
- staticClass: "button",
- on: {
- click: function($event) {
- return _vm.changeMainText("Über uns")
- }
- }
- },
+ { staticClass: "button", on: { click: function($event) {} } },
[_vm._v("Über uns")]
),
_vm._v(" "),
_c(
"button",
- {
- staticClass: "button",
- on: {
- click: function($event) {
- return _vm.changeMainText("Aktuelles")
- }
- }
- },
+ { staticClass: "button", on: { click: function($event) {} } },
[_vm._v("Aktuelles")]
),
_vm._v(" "),
_c(
"button",
- {
- staticClass: "button",
- on: {
- click: function($event) {
- return _vm.changeMainText("Mitgliedsantrag")
- }
- }
- },
+ { staticClass: "button", on: { click: function($event) {} } },
[_vm._v("Mitgliedsantrag")]
),
_vm._v(" "),
@@ -30907,14 +30878,7 @@ var render = function() {
? _c("span", [
_c(
"button",
- {
- staticClass: "button",
- on: {
- click: function($event) {
- return _vm.changeMainText("Tourplan")
- }
- }
- },
+ { staticClass: "button", on: { click: function($event) {} } },
[_vm._v("Tourplan (Beispiel)")]
)
])
@@ -30922,14 +30886,7 @@ var render = function() {
? _c("span", [
_c(
"button",
- {
- staticClass: "button",
- on: {
- click: function($event) {
- return _vm.changeMainText("Tourplan")
- }
- }
- },
+ { staticClass: "button", on: { click: function($event) {} } },
[_vm._v("Tourplan (Gast)")]
)
])
@@ -30937,14 +30894,7 @@ var render = function() {
? _c("span", [
_c(
"button",
- {
- staticClass: "button",
- on: {
- click: function($event) {
- return _vm.changeMainText("Tourplan")
- }
- }
- },
+ { staticClass: "button", on: { click: function($event) {} } },
[_vm._v("Tourplan (komplett)")]
)
])
@@ -30952,14 +30902,7 @@ var render = function() {
? _c("span", [
_c(
"button",
- {
- staticClass: "button",
- on: {
- click: function($event) {
- return _vm.changeMainText("Tourplan")
- }
- }
- },
+ { staticClass: "button", on: { click: function($event) {} } },
[_vm._v("Tourplan (komplett)")]
)
])
@@ -30967,40 +30910,19 @@ var render = function() {
_vm._v(" "),
_c(
"button",
- {
- staticClass: "button",
- on: {
- click: function($event) {
- return _vm.changeMainText("Wetter")
- }
- }
- },
+ { staticClass: "button", on: { click: function($event) {} } },
[_vm._v("Wetter")]
),
_vm._v(" "),
_c(
"button",
- {
- staticClass: "button",
- on: {
- click: function($event) {
- return _vm.changeMainText("Links")
- }
- }
- },
+ { staticClass: "button", on: { click: function($event) {} } },
[_vm._v("Links")]
),
_vm._v(" "),
_c(
"button",
- {
- staticClass: "button",
- on: {
- click: function($event) {
- return _vm.changeMainText("Impressum")
- }
- }
- },
+ { staticClass: "button", on: { click: function($event) {} } },
[_vm._v("Impressum")]
),
_vm._v(" "),
@@ -48057,6 +47979,7 @@ var store = new vuex__WEBPACK_IMPORTED_MODULE_1__["default"].Store({
state: {
user: {},
user_token: {},
+ page_name: 'main',
page_content: 'Placeholder
'
}
});
@@ -48357,8 +48280,8 @@ __webpack_require__.r(__webpack_exports__);
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
-__webpack_require__(/*! /Users/tschneider/dev/repo/motorradig/motorradig/resources/js/app.js */"./resources/js/app.js");
-module.exports = __webpack_require__(/*! /Users/tschneider/dev/repo/motorradig/motorradig/resources/sass/app.scss */"./resources/sass/app.scss");
+__webpack_require__(/*! /mnt/d/repos/motorradig/motorradig/resources/js/app.js */"./resources/js/app.js");
+module.exports = __webpack_require__(/*! /mnt/d/repos/motorradig/motorradig/resources/sass/app.scss */"./resources/sass/app.scss");
/***/ })
diff --git a/motorradig/public/mix-manifest.json b/motorradig/public/mix-manifest.json
index 2d60117..a0ead7f 100644
--- a/motorradig/public/mix-manifest.json
+++ b/motorradig/public/mix-manifest.json
@@ -1,4 +1,5 @@
{
+ "/js/Icon.js": "/js/Icon.js",
"/js/app.js": "/js/app.js",
"/css/app.css": "/css/app.css"
}
diff --git a/motorradig/resources/js/Icon.js b/motorradig/resources/js/Icon.js
new file mode 100644
index 0000000..8557e02
--- /dev/null
+++ b/motorradig/resources/js/Icon.js
@@ -0,0 +1,112 @@
+/******/ (function(modules) { // webpackBootstrap
+/******/ // The module cache
+/******/ var installedModules = {};
+/******/
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+/******/
+/******/ // Check if module is in cache
+/******/ if(installedModules[moduleId]) {
+/******/ return installedModules[moduleId].exports;
+/******/ }
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = installedModules[moduleId] = {
+/******/ i: moduleId,
+/******/ l: false,
+/******/ exports: {}
+/******/ };
+/******/
+/******/ // Execute the module function
+/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+/******/
+/******/ // Flag the module as loaded
+/******/ module.l = true;
+/******/
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+/******/
+/******/
+/******/ // expose the modules object (__webpack_modules__)
+/******/ __webpack_require__.m = modules;
+/******/
+/******/ // expose the module cache
+/******/ __webpack_require__.c = installedModules;
+/******/
+/******/ // define getter function for harmony exports
+/******/ __webpack_require__.d = function(exports, name, getter) {
+/******/ if(!__webpack_require__.o(exports, name)) {
+/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
+/******/ }
+/******/ };
+/******/
+/******/ // define __esModule on exports
+/******/ __webpack_require__.r = function(exports) {
+/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
+/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
+/******/ }
+/******/ Object.defineProperty(exports, '__esModule', { value: true });
+/******/ };
+/******/
+/******/ // create a fake namespace object
+/******/ // mode & 1: value is a module id, require it
+/******/ // mode & 2: merge all properties of value into the ns
+/******/ // mode & 4: return value when already ns object
+/******/ // mode & 8|1: behave like require
+/******/ __webpack_require__.t = function(value, mode) {
+/******/ if(mode & 1) value = __webpack_require__(value);
+/******/ if(mode & 8) return value;
+/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
+/******/ var ns = Object.create(null);
+/******/ __webpack_require__.r(ns);
+/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
+/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
+/******/ return ns;
+/******/ };
+/******/
+/******/ // getDefaultExport function for compatibility with non-harmony modules
+/******/ __webpack_require__.n = function(module) {
+/******/ var getter = module && module.__esModule ?
+/******/ function getDefault() { return module['default']; } :
+/******/ function getModuleExports() { return module; };
+/******/ __webpack_require__.d(getter, 'a', getter);
+/******/ return getter;
+/******/ };
+/******/
+/******/ // Object.prototype.hasOwnProperty.call
+/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
+/******/
+/******/ // __webpack_public_path__
+/******/ __webpack_require__.p = "/";
+/******/
+/******/
+/******/ // Load entry module and return exports
+/******/ return __webpack_require__(__webpack_require__.s = 1);
+/******/ })
+/************************************************************************/
+/******/ ({
+
+/***/ "./resources/js/views/components/Icon.js":
+/*!***********************************************!*\
+ !*** ./resources/js/views/components/Icon.js ***!
+ \***********************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
+
+throw new Error("Module build failed (from ./node_modules/babel-loader/lib/index.js):\nError: ENOENT: no such file or directory, open '/Users/tschneider/dev/repo/motorradig/motorradig/resources/js/views/components/Icon.js'");
+
+/***/ }),
+
+/***/ 1:
+/*!*****************************************************!*\
+ !*** multi ./resources/js/views/components/Icon.js ***!
+ \*****************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+module.exports = __webpack_require__(/*! /Users/tschneider/dev/repo/motorradig/motorradig/resources/js/views/components/Icon.js */"./resources/js/views/components/Icon.js");
+
+
+/***/ })
+
+/******/ });
\ No newline at end of file
diff --git a/motorradig/resources/js/store.js b/motorradig/resources/js/store.js
index 0aecab8..ab3a89e 100644
--- a/motorradig/resources/js/store.js
+++ b/motorradig/resources/js/store.js
@@ -6,6 +6,7 @@ export const store = new Vuex.Store({
state:{
user:{},
user_token:{},
+ page_name: 'main',
page_content:'Placeholder
'
}
});
diff --git a/motorradig/resources/js/views/EditPage.vue b/motorradig/resources/js/views/EditPage.vue
index 496ba4d..8829a64 100644
--- a/motorradig/resources/js/views/EditPage.vue
+++ b/motorradig/resources/js/views/EditPage.vue
@@ -6,19 +6,19 @@
-
-
-
+
+
+
-
-
-
-
+
+
+
+
-
-
-
+
+
+
@@ -109,6 +109,7 @@
this.editor.destroy()
},
methods: {
+
showContent() {
console.log(">>");
//console.log(this.editor.view.dom.innerText);
@@ -117,16 +118,15 @@
},
savePage() {
axios.post('http://localhost:8000/api/v1/auth/save_page',{
- page: 'testpage',
+ page: this.$store.state.page_name,
body: this.editor.view.docView.dom.innerHTML
-
}, {
headers: {
'Authorization': 'Bearer ' + this.$store.state.user_token
}
})
.then(res => {
- console.log("savePage: Wrote Testpage");
+ console.log("savePage: Wrote "+this.$store.state.page_name);
console.log("Going back to main view");
this.$router.push("/");
}
diff --git a/motorradig/resources/js/views/Main.vue b/motorradig/resources/js/views/Main.vue
index e57af51..5a8f4de 100644
--- a/motorradig/resources/js/views/Main.vue
+++ b/motorradig/resources/js/views/Main.vue
@@ -54,7 +54,10 @@
}
},
methods: {
-
+ set_page(pageName) {
+ this.$store.state.page_name=pageName;
+ this.loadPage();
+ },
logout() {
console.log("logging out with token "+this.$store.state.user_token);
@@ -80,7 +83,7 @@
},
loadPage() {
axios.post('http://localhost:8000/api/v1/load_page',{
- page: 'testpage'
+ page: this.$store.state.page_name
}, {
headers: {
@@ -88,7 +91,7 @@
}
})
.then(res => {
- console.log("savePage: Loading Testpage");
+ console.log("loadPage: Loading Testpage");
console.log("Body:");
console.log(res.data.body);
@@ -96,22 +99,6 @@
}
)
}
- ,
- savePage() {
- axios.post('http://localhost:8000/api/v1/auth/save_page',{
- page: 'testpage',
- body: 'testbody'
-
- }, {
- headers: {
- 'Authorization': 'Bearer ' + this.$store.state.user_token
- }
- })
- .then(res => {
- console.log("savePage: Wrote Testpage");
- }
- )
- }
}
,
created() {
diff --git a/motorradig/webpack.mix.js b/motorradig/webpack.mix.js
index 19a48fa..2f11109 100644
--- a/motorradig/webpack.mix.js
+++ b/motorradig/webpack.mix.js
@@ -12,4 +12,5 @@ const mix = require('laravel-mix');
*/
mix.js('resources/js/app.js', 'public/js')
+ .js('resources/js/Icon.js','public/js')
.sass('resources/sass/app.scss', 'public/css');