You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
253 lines
7.6 KiB
253 lines
7.6 KiB
/******/ (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, { |
|
/******/ configurable: false, |
|
/******/ enumerable: true, |
|
/******/ get: getter |
|
/******/ }); |
|
/******/ } |
|
/******/ }; |
|
/******/ |
|
/******/ // 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 = "app/themes/pressbooks-aldine/dist/"; |
|
/******/ |
|
/******/ // Load entry module and return exports |
|
/******/ return __webpack_require__(__webpack_require__.s = 1); |
|
/******/ }) |
|
/************************************************************************/ |
|
/******/ ([ |
|
/* 0 */ |
|
/***/ (function(module, exports) { |
|
|
|
module.exports = jQuery; |
|
|
|
/***/ }), |
|
/* 1 */ |
|
/***/ (function(module, exports, __webpack_require__) { |
|
|
|
__webpack_require__(2); |
|
module.exports = __webpack_require__(8); |
|
|
|
|
|
/***/ }), |
|
/* 2 */ |
|
/***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
|
|
"use strict"; |
|
Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); |
|
/* WEBPACK VAR INJECTION */(function(jQuery) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(0); |
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__); |
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_Router__ = __webpack_require__(3); |
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__routes_common__ = __webpack_require__(5); |
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__routes_home__ = __webpack_require__(6); |
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__routes_about__ = __webpack_require__(7); |
|
// import external dependencies |
|
|
|
|
|
// Import everything from autoload |
|
|
|
|
|
// import local dependencies |
|
|
|
|
|
|
|
|
|
|
|
/** Populate Router instance with DOM routes */ |
|
var routes = new __WEBPACK_IMPORTED_MODULE_1__util_Router__["a" /* default */]({ |
|
// All pages |
|
common: __WEBPACK_IMPORTED_MODULE_2__routes_common__["a" /* default */], |
|
// Home page |
|
home: __WEBPACK_IMPORTED_MODULE_3__routes_home__["a" /* default */], |
|
// About Us page, note the change from about-us to aboutUs. |
|
aboutUs: __WEBPACK_IMPORTED_MODULE_4__routes_about__["a" /* default */], |
|
}); |
|
|
|
// Load Events |
|
jQuery(document).ready(function () { return routes.loadEvents(); }); |
|
|
|
/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(0))) |
|
|
|
/***/ }), |
|
/* 3 */ |
|
/***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
|
|
"use strict"; |
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__camelCase__ = __webpack_require__(4); |
|
|
|
|
|
/** |
|
* DOM-based Routing |
|
* |
|
* Based on {@link http://goo.gl/EUTi53|Markup-based Unobtrusive Comprehensive DOM-ready Execution} by Paul Irish |
|
* |
|
* The routing fires all common scripts, followed by the page specific scripts. |
|
* Add additional events for more control over timing e.g. a finalize event |
|
*/ |
|
var Router = function Router(routes) { |
|
this.routes = routes; |
|
}; |
|
|
|
/** |
|
* Fire Router events |
|
* @param {string} route DOM-based route derived from body classes (`<body class="...">`) |
|
* @param {string} [event] Events on the route. By default, `init` and `finalize` events are called. |
|
* @param {string} [arg] Any custom argument to be passed to the event. |
|
*/ |
|
Router.prototype.fire = function fire (route, event, arg) { |
|
if ( event === void 0 ) event = 'init'; |
|
|
|
var fire = route !== '' && this.routes[route] && typeof this.routes[route][event] === 'function'; |
|
if (fire) { |
|
this.routes[route][event](arg); |
|
} |
|
}; |
|
|
|
/** |
|
* Automatically load and fire Router events |
|
* |
|
* Events are fired in the following order: |
|
** common init |
|
** page-specific init |
|
** page-specific finalize |
|
** common finalize |
|
*/ |
|
Router.prototype.loadEvents = function loadEvents () { |
|
var this$1 = this; |
|
|
|
// Fire common init JS |
|
this.fire('common'); |
|
|
|
// Fire page-specific init JS, and then finalize JS |
|
document.body.className |
|
.toLowerCase() |
|
.replace(/-/g, '_') |
|
.split(/\s+/) |
|
.map(__WEBPACK_IMPORTED_MODULE_0__camelCase__["a" /* default */]) |
|
.forEach(function (className) { |
|
this$1.fire(className); |
|
this$1.fire(className, 'finalize'); |
|
}); |
|
|
|
// Fire common finalize JS |
|
this.fire('common', 'finalize'); |
|
}; |
|
|
|
/* harmony default export */ __webpack_exports__["a"] = (Router); |
|
|
|
|
|
/***/ }), |
|
/* 4 */ |
|
/***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
|
|
"use strict"; |
|
/** |
|
* the most terrible camelizer on the internet, guaranteed! |
|
* @param {string} str String that isn't camel-case, e.g., CAMeL_CaSEiS-harD |
|
* @return {string} String converted to camel-case, e.g., camelCaseIsHard |
|
*/ |
|
/* harmony default export */ __webpack_exports__["a"] = (function (str) { return ("" + (str.charAt(0).toLowerCase()) + (str.replace(/[\W_]/g, '|').split('|') |
|
.map(function (part) { return ("" + (part.charAt(0).toUpperCase()) + (part.slice(1))); }) |
|
.join('') |
|
.slice(1))); });; |
|
|
|
|
|
/***/ }), |
|
/* 5 */ |
|
/***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
|
|
"use strict"; |
|
/* harmony default export */ __webpack_exports__["a"] = ({ |
|
init: function init() { |
|
// JavaScript to be fired on all pages |
|
}, |
|
finalize: function finalize() { |
|
// JavaScript to be fired on all pages, after page specific JS is fired |
|
}, |
|
}); |
|
|
|
|
|
/***/ }), |
|
/* 6 */ |
|
/***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
|
|
"use strict"; |
|
/* harmony default export */ __webpack_exports__["a"] = ({ |
|
init: function init() { |
|
// JavaScript to be fired on the home page |
|
}, |
|
finalize: function finalize() { |
|
// JavaScript to be fired on the home page, after the init JS |
|
}, |
|
}); |
|
|
|
|
|
/***/ }), |
|
/* 7 */ |
|
/***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
|
|
"use strict"; |
|
/* harmony default export */ __webpack_exports__["a"] = ({ |
|
init: function init() { |
|
// JavaScript to be fired on the about us page |
|
}, |
|
}); |
|
|
|
|
|
/***/ }), |
|
/* 8 */ |
|
/***/ (function(module, exports) { |
|
|
|
// removed by extract-text-webpack-plugin |
|
|
|
/***/ }) |
|
/******/ ]); |
|
//# sourceMappingURL=main.js.map
|