j1-template 2022.5.1.rc0 → 2022.5.1.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_includes/themes/j1/procedures/global/date-german.proc +67 -0
- data/assets/data/banner.html +2 -2
- data/assets/data/menu.html +1 -1
- data/assets/data/mmenu.html +36 -36
- data/assets/themes/j1/adapter/js/attic.js +8 -0
- data/assets/themes/j1/adapter/js/cookieConsent.js +42 -25
- data/assets/themes/j1/adapter/js/mmenu.js +2 -2
- data/assets/themes/j1/core/css/themes/unolight/bootstrap.css +2 -2
- data/assets/themes/j1/core/css/themes/unolight/bootstrap.min.css +1 -1
- data/assets/themes/j1/modules/backstretch/js/backstretch.js +4 -4
- data/assets/themes/j1/modules/backstretch/js/backstretch.min.js +1 -1
- data/assets/themes/j1/modules/mmenuLight/README.md +22 -0
- data/assets/themes/j1/modules/mmenuLight/css/mmenu-light.css +224 -243
- data/assets/themes/j1/modules/mmenuLight/css/mmenu-light.min.css +3 -3
- data/assets/themes/j1/modules/mmenuLight/css/theme/uno/mmenu.css +95 -55
- data/assets/themes/j1/modules/mmenuLight/css/theme/uno/mmenu.min.css +1 -1
- data/assets/themes/j1/modules/mmenuLight/js/mmenu.js +57 -440
- data/assets/themes/j1/modules/mmenuLight/js/mmenu.min.js +4 -15
- data/assets/themes/j1/modules/{twemoji/js/picker → themeSwitcher}/LICENSE +21 -21
- data/assets/themes/j1/modules/themeSwitcher/README.md +166 -0
- data/assets/themes/j1/modules/themeSwitcher/js/switcher.js +2 -2
- data/assets/themes/j1/modules/themeSwitcher/js/switcher.min.js +1 -1
- data/lib/j1/version.rb +1 -1
- data/lib/starter_web/Gemfile +1 -1
- data/lib/starter_web/README.md +5 -5
- data/lib/starter_web/_config.yml +2 -2
- data/lib/starter_web/_data/blocks/banner.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/cookies.yml +1 -1
- data/lib/starter_web/_plugins/lunr_index.rb +1 -1
- data/lib/starter_web/index.html +34 -12
- data/lib/starter_web/package.json +1 -1
- data/lib/starter_web/pages/public/features/general.adoc +1 -1
- data/lib/starter_web/pages/public/legal/de/300_privacy.adoc +139 -0
- data/lib/starter_web/pages/public/legal/en/300_privacy.adoc +63 -3
- data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
- data/lib/starter_web/utilsrv/package.json +1 -1
- metadata +6 -9
- data/assets/themes/j1/modules/twemoji/css/picker/twemoji-picker.css +0 -153
- data/assets/themes/j1/modules/twemoji/css/picker/twemoji-picker.min.css +0 -19
- data/assets/themes/j1/modules/twemoji/js/picker/twemoji-picker.js +0 -304
- data/assets/themes/j1/modules/twemoji/js/picker/twemoji-picker.min.js +0 -322
- data/assets/themes/j1/modules/twemoji/js/twemoji.js +0 -580
- data/assets/themes/j1/modules/twemoji/js/twemoji.min.js +0 -19
@@ -1,7 +1,7 @@
|
|
1
1
|
/*
|
2
2
|
# -----------------------------------------------------------------------------
|
3
3
|
# ~/assets/themes/j1/modules/mmenu_light/js/mmenu.js
|
4
|
-
# Mobile Menu v3.
|
4
|
+
# Mobile Menu v3.1.1 (April 2022) implementation for J1 Template
|
5
5
|
#
|
6
6
|
# Product/Info:
|
7
7
|
# https://jekyll.one
|
@@ -17,17 +17,6 @@
|
|
17
17
|
# -----------------------------------------------------------------------------
|
18
18
|
*/
|
19
19
|
|
20
|
-
/*!
|
21
|
-
* Mmenu Light
|
22
|
-
* mmenujs.com/mmenu-light v3.0.8
|
23
|
-
*
|
24
|
-
* Copyright (c) Fred Heusschen
|
25
|
-
* www.frebsite.nl
|
26
|
-
*
|
27
|
-
* License: CC-BY-4.0
|
28
|
-
* http://creativecommons.org/licenses/by/4.0/
|
29
|
-
*/
|
30
|
-
|
31
20
|
/******/ (function(modules) { // webpackBootstrap
|
32
21
|
/******/ // The module cache
|
33
22
|
/******/ var installedModules = {};
|
@@ -111,453 +100,81 @@
|
|
111
100
|
/******/
|
112
101
|
/******/
|
113
102
|
/******/ // Load entry module and return exports
|
114
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
103
|
+
/******/ return __webpack_require__(__webpack_require__.s = "./src/mmenu-light.js");
|
115
104
|
/******/ })
|
116
105
|
/************************************************************************/
|
117
|
-
/******/ (
|
118
|
-
|
106
|
+
/******/ ({
|
107
|
+
|
108
|
+
/***/ "./esm/core/index.js":
|
109
|
+
/*!***************************!*\
|
110
|
+
!*** ./esm/core/index.js ***!
|
111
|
+
\***************************/
|
112
|
+
/*! exports provided: default */
|
119
113
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
120
114
|
|
121
115
|
"use strict";
|
122
|
-
__webpack_require__.r(__webpack_exports__);
|
123
|
-
|
124
|
-
// CONCATENATED MODULE: ./esm/modules/match-media-toggler/index.js
|
125
|
-
/**
|
126
|
-
* Class for a match media toggler.
|
127
|
-
*/
|
128
|
-
var MmToggler = /** @class */ (function () {
|
129
|
-
/**
|
130
|
-
* Create the match media.
|
131
|
-
*
|
132
|
-
* @param {string} mediaquery Media query to use.
|
133
|
-
*/
|
134
|
-
function MmToggler(mediaquery) {
|
135
|
-
var _this = this;
|
136
|
-
this.listener = function (evnt) {
|
137
|
-
(evnt.matches ? _this.matchFns : _this.unmatchFns).forEach(function (listener) {
|
138
|
-
listener();
|
139
|
-
});
|
140
|
-
};
|
141
|
-
this.toggler = window.matchMedia(mediaquery);
|
142
|
-
this.toggler.addListener(this.listener);
|
143
|
-
this.matchFns = [];
|
144
|
-
this.unmatchFns = [];
|
145
|
-
}
|
146
|
-
/**
|
147
|
-
* Add a function to the list,
|
148
|
-
* also fires the added function.
|
149
|
-
*
|
150
|
-
* @param {Function} match Function to fire when the media query matches.
|
151
|
-
* @param {Function} unmatch Function to fire when the media query does not match.
|
152
|
-
*/
|
153
|
-
MmToggler.prototype.add = function (match, unmatch) {
|
154
|
-
this.matchFns.push(match);
|
155
|
-
this.unmatchFns.push(unmatch);
|
156
|
-
(this.toggler.matches ? match : unmatch)();
|
157
|
-
};
|
158
|
-
return MmToggler;
|
159
|
-
}());
|
160
|
-
/* harmony default export */ var match_media_toggler = (MmToggler);
|
161
|
-
|
162
|
-
// CONCATENATED MODULE: ./esm/modules/helpers.js
|
163
|
-
/**
|
164
|
-
* Convert a list to an array.
|
165
|
-
*
|
166
|
-
* @param {NodeList|HTMLCollection} list The list or collection to convert into an array.
|
167
|
-
* @return {array} The array.
|
168
|
-
*/
|
169
|
-
var r = function (list) {
|
170
|
-
return Array.prototype.slice.call(list);
|
171
|
-
};
|
172
|
-
/**
|
173
|
-
* Find elements in the given context.
|
174
|
-
*
|
175
|
-
* @param {string} selector The query selector to search for.
|
176
|
-
* @param {HTMLElement} [context=document] The context to search in.
|
177
|
-
* @return {HTMLElement[]} The found list of elements.
|
178
|
-
*/
|
179
|
-
var $ = function (selector, context) {
|
180
|
-
return r((context || document).querySelectorAll(selector));
|
181
|
-
};
|
116
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _modules_match_media_toggler_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../modules/match-media-toggler/index */ \"./esm/modules/match-media-toggler/index.js\");\n/* harmony import */ var _modules_sliding_panels_navigation_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../modules/sliding-panels-navigation/index */ \"./esm/modules/sliding-panels-navigation/index.js\");\n/* harmony import */ var _modules_offcanvas_drawer_index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../modules/offcanvas-drawer/index */ \"./esm/modules/offcanvas-drawer/index.js\");\n\n\n\n/**\n * Class for a lightweight mobile menu.\n */\nvar MmenuLight = /** @class */ (function () {\n /**\n * Create a lightweight mobile menu.\n *\n * @param {HTMLElement} menu HTML element for the menu.\n * @param {string} [mediaQuery='all'] Media queury to match for the menu.\n */\n function MmenuLight(menu, mediaQuery) {\n if (mediaQuery === void 0) { mediaQuery = 'all'; }\n // Store the menu node.\n this.menu = menu;\n // Create the toggler instance.\n this.toggler = new _modules_match_media_toggler_index__WEBPACK_IMPORTED_MODULE_0__[\"default\"](mediaQuery);\n }\n /**\n * Add navigation for the menu.\n *\n * @param {object} options Options for the navigation.\n */\n MmenuLight.prototype.navigation = function (options) {\n var _this = this;\n // Only needs to be done ones.\n if (!this.navigator) {\n options = options || {};\n var _a = options.title, title = _a === void 0 ? 'Menu' : _a, _b = options.selectedClass, selectedClass = _b === void 0 ? 'Selected' : _b, _c = options.slidingSubmenus, slidingSubmenus = _c === void 0 ? true : _c, _d = options.theme, theme = _d === void 0 ? 'light' : _d;\n this.navigator = new _modules_sliding_panels_navigation_index__WEBPACK_IMPORTED_MODULE_1__[\"default\"](this.menu, title, selectedClass, slidingSubmenus, theme);\n // En-/disable\n this.toggler.add(function () { return _this.menu.classList.add(_this.navigator.prefix); }, function () { return _this.menu.classList.remove(_this.navigator.prefix); });\n }\n return this.navigator;\n };\n /**\n * Add off-canvas behavior to the menu.\n *\n * @param {object} options Options for the off-canvas drawer.\n */\n MmenuLight.prototype.offcanvas = function (options) {\n var _this = this;\n // Only needs to be done ones.\n if (!this.drawer) {\n options = options || {};\n var _a = options.position, position = _a === void 0 ? 'left' : _a;\n this.drawer = new _modules_offcanvas_drawer_index__WEBPACK_IMPORTED_MODULE_2__[\"default\"](null, position);\n /** Original location in the DOM for the menu. */\n var orgLocation_1 = document.createComment('original menu location');\n this.menu.after(orgLocation_1);\n // En-/disable\n this.toggler.add(function () {\n // Move the menu to the drawer.\n _this.drawer.content.append(_this.menu);\n }, function () {\n // Close the drawer.\n _this.drawer.close();\n // Move the menu to the original position.\n orgLocation_1.after(_this.menu);\n });\n }\n return this.drawer;\n };\n return MmenuLight;\n}());\n/* harmony default export */ __webpack_exports__[\"default\"] = (MmenuLight);\n\n\n//# sourceURL=webpack:///./esm/core/index.js?");
|
182
117
|
|
183
|
-
|
184
|
-
/** Whether or not touch gestures are supported by the browser. */
|
185
|
-
var touch = 'ontouchstart' in window ||
|
186
|
-
(navigator.msMaxTouchPoints ? true : false) ||
|
187
|
-
false;
|
188
|
-
/** Whether or not its IE11 :/ */
|
189
|
-
var IE11 = navigator.userAgent.indexOf('MSIE') > -1 ||
|
190
|
-
navigator.appVersion.indexOf('Trident/') > -1;
|
118
|
+
/***/ }),
|
191
119
|
|
192
|
-
|
120
|
+
/***/ "./esm/modules/helpers.js":
|
121
|
+
/*!********************************!*\
|
122
|
+
!*** ./esm/modules/helpers.js ***!
|
123
|
+
\********************************/
|
124
|
+
/*! exports provided: r, $ */
|
125
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
193
126
|
|
127
|
+
"use strict";
|
128
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"r\", function() { return r; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"$\", function() { return $; });\n/**\n * Convert a list to an array.\n *\n * @param \t{NodeList|HTMLCollection} list \tThe list or collection to convert into an array.\n * @return\t{array}\t\t\t\t\t\t\tThe array.\n */\nvar r = function (list) {\n return Array.prototype.slice.call(list);\n};\n/**\n * Find elements in the given context.\n *\n * @param \t{string}\t\tselector\t\t\tThe query selector to search for.\n * @param \t{HTMLElement}\t[context=document]\tThe context to search in.\n * @return\t{HTMLElement[]}\t\t\t\t\t\tThe found list of elements.\n */\nvar $ = function (selector, context) {\n return r((context || document).querySelectorAll(selector));\n};\n\n\n//# sourceURL=webpack:///./esm/modules/helpers.js?");
|
194
129
|
|
195
|
-
|
196
|
-
/**
|
197
|
-
* Class for navigating in a mobile menu.
|
198
|
-
*/
|
199
|
-
var sliding_panels_navigation_MmSlidingPanelsNavigation = /** @class */ (function () {
|
200
|
-
/**
|
201
|
-
* Class for navigating in a mobile menu.
|
202
|
-
*
|
203
|
-
* @param {HTMLElement} node HTMLElement for the menu.
|
204
|
-
* @param {string} title The title for the menu.
|
205
|
-
* @param {string} selectedClass The class for selected listitems.
|
206
|
-
* @param {boolean} slidingSubmenus Whether or not to use sliding submenus.
|
207
|
-
* @param {string} theme The color scheme for the menu.
|
208
|
-
*/
|
209
|
-
function MmSlidingPanelsNavigation(node, title, selectedClass, slidingSubmenus, theme) {
|
210
|
-
this.node = node;
|
211
|
-
this.title = title;
|
212
|
-
this.slidingSubmenus = slidingSubmenus;
|
213
|
-
this.selectedClass = selectedClass;
|
214
|
-
// Add classname.
|
215
|
-
this.node.classList.add(prefix);
|
216
|
-
// Sliding submenus not supported in IE11.
|
217
|
-
if (IE11) {
|
218
|
-
this.slidingSubmenus = false;
|
219
|
-
}
|
220
|
-
this.node.classList.add(prefix + "--" + theme);
|
221
|
-
this.node.classList.add(prefix + "--" + (this.slidingSubmenus ? 'navbar' : 'vertical'));
|
222
|
-
this._setSelectedl();
|
223
|
-
this._initAnchors();
|
224
|
-
}
|
225
|
-
Object.defineProperty(MmSlidingPanelsNavigation.prototype, "prefix", {
|
226
|
-
/** Prefix for the class. */
|
227
|
-
get: function () {
|
228
|
-
return prefix;
|
229
|
-
},
|
230
|
-
enumerable: true,
|
231
|
-
configurable: true
|
232
|
-
});
|
233
|
-
/**
|
234
|
-
* Open the given panel.
|
235
|
-
*
|
236
|
-
* @param {HTMLElement} panel Panel to open.
|
237
|
-
*/
|
238
|
-
MmSlidingPanelsNavigation.prototype.openPanel = function (panel) {
|
239
|
-
/** Parent LI for the panel. */
|
240
|
-
var listitem = panel.parentElement;
|
241
|
-
// Sliding submenus
|
242
|
-
if (this.slidingSubmenus) {
|
243
|
-
/** Title above the panel to open. */
|
244
|
-
var title_1 = panel.dataset.mmSpnTitle;
|
245
|
-
// Opening the main level UL.
|
246
|
-
if (listitem === this.node) {
|
247
|
-
this.node.classList.add(prefix + "--main");
|
248
|
-
}
|
249
|
-
// Opening a sub level UL.
|
250
|
-
else {
|
251
|
-
this.node.classList.remove(prefix + "--main");
|
252
|
-
// Find title from parent LI.
|
253
|
-
if (!title_1) {
|
254
|
-
r(listitem.children).forEach(function (child) {
|
255
|
-
if (child.matches('a, span')) {
|
256
|
-
title_1 = child.textContent;
|
257
|
-
}
|
258
|
-
});
|
259
|
-
}
|
260
|
-
}
|
261
|
-
// Use the default title.
|
262
|
-
if (!title_1) {
|
263
|
-
title_1 = this.title;
|
264
|
-
}
|
265
|
-
// Set the title.
|
266
|
-
this.node.dataset.mmSpnTitle = title_1;
|
267
|
-
// Unset all panels from being opened and parent.
|
268
|
-
$("." + prefix + "--open", this.node).forEach(function (open) {
|
269
|
-
open.classList.remove(prefix + "--open");
|
270
|
-
open.classList.remove(prefix + "--parent");
|
271
|
-
});
|
272
|
-
// Set the current panel as being opened.
|
273
|
-
panel.classList.add(prefix + "--open");
|
274
|
-
panel.classList.remove(prefix + "--parent");
|
275
|
-
// Set all parent panels as being parent.
|
276
|
-
var parent_1 = panel.parentElement.closest('ul');
|
277
|
-
while (parent_1) {
|
278
|
-
parent_1.classList.add(prefix + "--open");
|
279
|
-
parent_1.classList.add(prefix + "--parent");
|
280
|
-
parent_1 = parent_1.parentElement.closest('ul');
|
281
|
-
}
|
282
|
-
}
|
283
|
-
// Vertical submenus
|
284
|
-
else {
|
285
|
-
/** Whether or not the panel is currently opened. */
|
286
|
-
var isOpened = panel.matches("." + prefix + "--open");
|
287
|
-
// Unset all panels from being opened and parent.
|
288
|
-
$("." + prefix + "--open", this.node).forEach(function (open) {
|
289
|
-
open.classList.remove(prefix + "--open");
|
290
|
-
});
|
291
|
-
// Toggle the current panel.
|
292
|
-
panel.classList[isOpened ? 'remove' : 'add'](prefix + "--open");
|
293
|
-
// Set all parent panels as being opened.
|
294
|
-
var parent_2 = panel.parentElement.closest('ul');
|
295
|
-
while (parent_2) {
|
296
|
-
parent_2.classList.add(prefix + "--open");
|
297
|
-
parent_2 = parent_2.parentElement.closest('ul');
|
298
|
-
}
|
299
|
-
}
|
300
|
-
};
|
301
|
-
/**
|
302
|
-
* Initiate the selected listitem / open the current panel.
|
303
|
-
*/
|
304
|
-
MmSlidingPanelsNavigation.prototype._setSelectedl = function () {
|
305
|
-
/** All selected LIs. */
|
306
|
-
var listitems = $('.' + this.selectedClass, this.node);
|
307
|
-
/** The last selected LI. */
|
308
|
-
var listitem = listitems[listitems.length - 1];
|
309
|
-
/** The opened UL. */
|
310
|
-
var panel = null;
|
311
|
-
if (listitem) {
|
312
|
-
panel = listitem.closest('ul');
|
313
|
-
}
|
314
|
-
if (!panel) {
|
315
|
-
panel = this.node.querySelector('ul');
|
316
|
-
}
|
317
|
-
this.openPanel(panel);
|
318
|
-
};
|
319
|
-
/**
|
320
|
-
* Initialize the click event handlers.
|
321
|
-
*/
|
322
|
-
MmSlidingPanelsNavigation.prototype._initAnchors = function () {
|
323
|
-
var _this = this;
|
324
|
-
/**
|
325
|
-
* Clicking an A in the menu: prevent bubbling up to the LI.
|
326
|
-
*
|
327
|
-
* @param {HTMLElement} target The clicked element.
|
328
|
-
* @return {boolean} handled Whether or not the event was handled.
|
329
|
-
*/
|
330
|
-
var clickAnchor = function (target) {
|
331
|
-
if (target.matches('a')) {
|
332
|
-
return true;
|
333
|
-
}
|
334
|
-
return false;
|
335
|
-
};
|
336
|
-
/**
|
337
|
-
* Click a LI or SPAN in the menu: open its submenu (if present).
|
338
|
-
*
|
339
|
-
* @param {HTMLElement} target The clicked element.
|
340
|
-
* @return {boolean} Whether or not the event was handled.
|
341
|
-
*/
|
342
|
-
var openSubmenu = function (target) {
|
343
|
-
/** Parent listitem for the submenu. */
|
344
|
-
var listitem;
|
345
|
-
// Find the parent listitem.
|
346
|
-
if (target.closest('span')) {
|
347
|
-
listitem = target.parentElement;
|
348
|
-
}
|
349
|
-
else if (target.closest('li')) {
|
350
|
-
listitem = target;
|
351
|
-
}
|
352
|
-
else {
|
353
|
-
listitem = false;
|
354
|
-
}
|
355
|
-
if (listitem) {
|
356
|
-
r(listitem.children).forEach(function (panel) {
|
357
|
-
if (panel.matches('ul')) {
|
358
|
-
_this.openPanel(panel);
|
359
|
-
}
|
360
|
-
});
|
361
|
-
return true;
|
362
|
-
}
|
363
|
-
return false;
|
364
|
-
};
|
365
|
-
/**
|
366
|
-
* Click the menu (the navbar): close the last opened submenu.
|
367
|
-
*
|
368
|
-
* @param {HTMLElement} target The clicked element.
|
369
|
-
* @return {boolean} Whether or not the event was handled.
|
370
|
-
*/
|
371
|
-
var closeSubmenu = function (target) {
|
372
|
-
/** The opened ULs. */
|
373
|
-
var panels = $("." + prefix + "--open", target);
|
374
|
-
/** The last opened UL. */
|
375
|
-
var panel = panels[panels.length - 1];
|
376
|
-
if (panel) {
|
377
|
-
/** The second to last opened UL. */
|
378
|
-
var parent_3 = panel.parentElement.closest('ul');
|
379
|
-
if (parent_3) {
|
380
|
-
_this.openPanel(parent_3);
|
381
|
-
return true;
|
382
|
-
}
|
383
|
-
}
|
384
|
-
return false;
|
385
|
-
};
|
386
|
-
this.node.addEventListener('click', function (evnt) {
|
387
|
-
var target = evnt.target;
|
388
|
-
var handled = false;
|
389
|
-
handled = handled || clickAnchor(target);
|
390
|
-
handled = handled || openSubmenu(target);
|
391
|
-
handled = handled || closeSubmenu(target);
|
392
|
-
if (handled) {
|
393
|
-
evnt.stopImmediatePropagation();
|
394
|
-
}
|
395
|
-
});
|
396
|
-
};
|
397
|
-
return MmSlidingPanelsNavigation;
|
398
|
-
}());
|
399
|
-
/* harmony default export */ var sliding_panels_navigation = (sliding_panels_navigation_MmSlidingPanelsNavigation);
|
130
|
+
/***/ }),
|
400
131
|
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
*/
|
406
|
-
|
407
|
-
/**
|
408
|
-
* Class for off-canvas drawer.
|
409
|
-
*
|
410
|
-
* @param {HTMLElement} [node] The element to put in the drawer.
|
411
|
-
* @param {String} [position=left] The position of the drawer, can be "left" or "right".
|
412
|
-
* @param {Boolean} toggle_mode Whether or not to use toggle mode.
|
413
|
-
*/
|
414
|
-
function MmOffCanvasDrawer(node, position, toggle_mode) {
|
415
|
-
var _this = this;
|
416
|
-
if (node === void 0) { node = null; }
|
417
|
-
// Create the wrapper.
|
418
|
-
this.wrapper = document.createElement('div');
|
419
|
-
this.wrapper.classList.add("" + offcanvas_drawer_prefix);
|
420
|
-
this.wrapper.classList.add(offcanvas_drawer_prefix + "--" + position);
|
421
|
-
// Create the drawer.
|
422
|
-
this.content = document.createElement('div');
|
423
|
-
this.content.classList.add(offcanvas_drawer_prefix + "__content");
|
424
|
-
this.wrapper.append(this.content);
|
425
|
-
// Create the backdrop.
|
426
|
-
this.backdrop = document.createElement('div');
|
427
|
-
this.backdrop.classList.add(offcanvas_drawer_prefix + "__backdrop");
|
428
|
-
this.wrapper.append(this.backdrop);
|
429
|
-
// Add the nodes to the <body>.
|
430
|
-
document.body.append(this.wrapper);
|
431
|
-
if (node) {
|
432
|
-
this.content.append(node);
|
433
|
-
}
|
434
|
-
// Click the backdrop.
|
435
|
-
if (!toggle_mode) {
|
436
|
-
var close_1 = function (evnt) {
|
437
|
-
_this.close();
|
438
|
-
evnt.stopImmediatePropagation();
|
439
|
-
};
|
440
|
-
this.backdrop.addEventListener('touchstart', close_1, { passive: true });
|
441
|
-
this.backdrop.addEventListener('mousedown', close_1, { passive: true });
|
442
|
-
}
|
443
|
-
}
|
444
|
-
Object.defineProperty(MmOffCanvasDrawer.prototype, "prefix", {
|
445
|
-
/** Prefix for the class. */
|
446
|
-
get: function () {
|
447
|
-
return offcanvas_drawer_prefix;
|
448
|
-
},
|
449
|
-
enumerable: true,
|
450
|
-
configurable: true
|
451
|
-
});
|
452
|
-
/**
|
453
|
-
* Open the drawer.
|
454
|
-
*/
|
455
|
-
MmOffCanvasDrawer.prototype.open = function () {
|
456
|
-
this.wrapper.classList.add(offcanvas_drawer_prefix + "--open");
|
457
|
-
document.body.classList.add(offcanvas_drawer_prefix + "-opened");
|
458
|
-
};
|
459
|
-
/**
|
460
|
-
* Close the drawer.
|
461
|
-
*/
|
462
|
-
MmOffCanvasDrawer.prototype.close = function () {
|
463
|
-
this.wrapper.classList.remove(offcanvas_drawer_prefix + "--open");
|
464
|
-
document.body.classList.remove(offcanvas_drawer_prefix + "-opened");
|
465
|
-
};
|
466
|
-
return MmOffCanvasDrawer;
|
467
|
-
}());
|
468
|
-
/* harmony default export */ var offcanvas_drawer = (MmOffCanvasDrawer);
|
132
|
+
/***/ "./esm/modules/match-media-toggler/index.js":
|
133
|
+
/*!**************************************************!*\
|
134
|
+
!*** ./esm/modules/match-media-toggler/index.js ***!
|
135
|
+
\**************************************************/
|
136
|
+
/*! exports provided: default */
|
137
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
469
138
|
|
470
|
-
|
139
|
+
"use strict";
|
140
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/**\n * Class for a match media toggler.\n */\nvar MmToggler = /** @class */ (function () {\n /**\n * Create the match media.\n *\n * @param {string} mediaquery Media query to use.\n */\n function MmToggler(mediaquery) {\n var _this = this;\n this.listener = function (evnt) {\n (evnt.matches ? _this.matchFns : _this.unmatchFns).forEach(function (listener) {\n listener();\n });\n };\n this.toggler = window.matchMedia(mediaquery);\n this.toggler.addListener(this.listener);\n this.matchFns = [];\n this.unmatchFns = [];\n }\n /**\n * Add a function to the list,\n * also fires the added function.\n *\n * @param {Function} match Function to fire when the media query matches.\n * @param {Function} unmatch Function to fire when the media query does not match.\n */\n MmToggler.prototype.add = function (match, unmatch) {\n this.matchFns.push(match);\n this.unmatchFns.push(unmatch);\n (this.toggler.matches ? match : unmatch)();\n };\n return MmToggler;\n}());\n/* harmony default export */ __webpack_exports__[\"default\"] = (MmToggler);\n\n\n//# sourceURL=webpack:///./esm/modules/match-media-toggler/index.js?");
|
471
141
|
|
142
|
+
/***/ }),
|
472
143
|
|
144
|
+
/***/ "./esm/modules/offcanvas-drawer/index.js":
|
145
|
+
/*!***********************************************!*\
|
146
|
+
!*** ./esm/modules/offcanvas-drawer/index.js ***!
|
147
|
+
\***********************************************/
|
148
|
+
/*! exports provided: default */
|
149
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
473
150
|
|
474
|
-
|
475
|
-
* Class for
|
476
|
-
*/
|
477
|
-
var core_MmenuLight = /** @class */ (function () {
|
478
|
-
/**
|
479
|
-
* Create a lightweight mobile menu.
|
480
|
-
*
|
481
|
-
* @param {HTMLElement} menu HTML element for the menu.
|
482
|
-
* @param {string} [mediaQuery='all'] Media queury to match for the menu.
|
483
|
-
*/
|
484
|
-
function MmenuLight(menu, mediaQuery) {
|
485
|
-
if (mediaQuery === void 0) { mediaQuery = 'all'; }
|
486
|
-
// Store the menu node.
|
487
|
-
this.menu = menu;
|
488
|
-
// Create the toggler instance.
|
489
|
-
this.toggler = new match_media_toggler(mediaQuery);
|
490
|
-
}
|
491
|
-
/**
|
492
|
-
* Add navigation for the menu.
|
493
|
-
*
|
494
|
-
* @param {object} options Options for the navigation.
|
495
|
-
*/
|
496
|
-
MmenuLight.prototype.navigation = function (options) {
|
497
|
-
var _this = this;
|
498
|
-
// Only needs to be done ones.
|
499
|
-
if (!this.navigator) {
|
500
|
-
options = options || {};
|
501
|
-
var _a = options.title, title = _a === void 0 ? 'Menu' : _a, _b = options.selectedClass, selectedClass = _b === void 0 ? 'Selected' : _b, _c = options.slidingSubmenus, slidingSubmenus = _c === void 0 ? true : _c, _d = options.theme, theme = _d === void 0 ? 'light' : _d;
|
502
|
-
this.navigator = new sliding_panels_navigation(this.menu, title, selectedClass, slidingSubmenus, theme);
|
503
|
-
// En-/disable
|
504
|
-
this.toggler.add(function () { return _this.menu.classList.add(_this.navigator.prefix); }, function () { return _this.menu.classList.remove(_this.navigator.prefix); });
|
505
|
-
}
|
506
|
-
return this.navigator;
|
507
|
-
};
|
508
|
-
/**
|
509
|
-
* Add off-canvas behavior to the menu.
|
510
|
-
*
|
511
|
-
* @param {object} options Options for the off-canvas drawer.
|
512
|
-
*/
|
513
|
-
MmenuLight.prototype.offcanvas = function (options) {
|
514
|
-
var _this = this;
|
515
|
-
// Only needs to be done ones.
|
516
|
-
if (!this.drawer) {
|
517
|
-
options = options || {};
|
518
|
-
var _a = options.position, position = _a === void 0 ? 'left' : _a, _b = options.toggle_mode, toggle_mode = _b === void 0 ? false : _b;
|
519
|
-
this.drawer = new offcanvas_drawer(null, position, toggle_mode);
|
520
|
-
/** Original location in the DOM for the menu. */
|
521
|
-
var orgLocation_1 = document.createComment('original menu location');
|
522
|
-
this.menu.after(orgLocation_1);
|
523
|
-
// En-/disable
|
524
|
-
this.toggler.add(function () {
|
525
|
-
// Move the menu to the drawer.
|
526
|
-
_this.drawer.content.append(_this.menu);
|
527
|
-
}, function () {
|
528
|
-
// Close the drawer.
|
529
|
-
_this.drawer.close();
|
530
|
-
// Move the menu to the original position.
|
531
|
-
orgLocation_1.after(_this.menu);
|
532
|
-
});
|
533
|
-
}
|
534
|
-
return this.drawer;
|
535
|
-
};
|
536
|
-
return MmenuLight;
|
537
|
-
}());
|
538
|
-
/* harmony default export */ var core = (core_MmenuLight);
|
151
|
+
"use strict";
|
152
|
+
eval("__webpack_require__.r(__webpack_exports__);\nvar prefix = 'mm-ocd';\n/**\n * Class for off-canvas behavior.\n */\nvar MmOffCanvasDrawer = /** @class */ (function () {\n /**\n * Class for off-canvas drawer.\n *\n * @param {HTMLElement} [node] The element to put in the drawer.\n * @param {String} [position=left] The position of the drawer, can be \"left\" or \"right\".\n */\n function MmOffCanvasDrawer(node, position) {\n var _this = this;\n if (node === void 0) { node = null; }\n // Create the wrapper.\n this.wrapper = document.createElement('div');\n this.wrapper.classList.add(\"\" + prefix);\n this.wrapper.classList.add(prefix + \"--\" + position);\n // Create the drawer.\n this.content = document.createElement('div');\n this.content.classList.add(prefix + \"__content\");\n this.wrapper.append(this.content);\n // Create the backdrop.\n this.backdrop = document.createElement('div');\n this.backdrop.classList.add(prefix + \"__backdrop\");\n this.wrapper.append(this.backdrop);\n // Add the nodes to the <body>.\n document.body.append(this.wrapper);\n if (node) {\n this.content.append(node);\n }\n // Click the backdrop.\n var close = function (evnt) {\n _this.close();\n evnt.stopImmediatePropagation();\n };\n this.backdrop.addEventListener('touchstart', close, { passive: true });\n this.backdrop.addEventListener('mousedown', close, { passive: true });\n }\n Object.defineProperty(MmOffCanvasDrawer.prototype, \"prefix\", {\n /** Prefix for the class. */\n get: function () {\n return prefix;\n },\n enumerable: false,\n configurable: true\n });\n /**\n * Open the drawer.\n */\n MmOffCanvasDrawer.prototype.open = function () {\n this.wrapper.classList.add(prefix + \"--open\");\n document.body.classList.add(prefix + \"-opened\");\n };\n /**\n * Close the drawer.\n */\n MmOffCanvasDrawer.prototype.close = function () {\n this.wrapper.classList.remove(prefix + \"--open\");\n document.body.classList.remove(prefix + \"-opened\");\n };\n return MmOffCanvasDrawer;\n}());\n/* harmony default export */ __webpack_exports__[\"default\"] = (MmOffCanvasDrawer);\n\n\n//# sourceURL=webpack:///./esm/modules/offcanvas-drawer/index.js?");
|
539
153
|
|
540
|
-
|
541
|
-
/*!
|
542
|
-
* Mmenu Light
|
543
|
-
* mmenujs.com/mmenu-light
|
544
|
-
*
|
545
|
-
* Copyright (c) Fred Heusschen
|
546
|
-
* www.frebsite.nl
|
547
|
-
*
|
548
|
-
* License: CC-BY-4.0
|
549
|
-
* http://creativecommons.org/licenses/by/4.0/
|
550
|
-
*/
|
154
|
+
/***/ }),
|
551
155
|
|
552
|
-
|
156
|
+
/***/ "./esm/modules/sliding-panels-navigation/index.js":
|
157
|
+
/*!********************************************************!*\
|
158
|
+
!*** ./esm/modules/sliding-panels-navigation/index.js ***!
|
159
|
+
\********************************************************/
|
160
|
+
/*! exports provided: default */
|
161
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
553
162
|
|
163
|
+
"use strict";
|
164
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../helpers */ \"./esm/modules/helpers.js\");\n\nvar prefix = 'mm-spn';\n/**\n * Class for navigating in a mobile menu.\n */\nvar MmSlidingPanelsNavigation = /** @class */ (function () {\n /**\n * Class for navigating in a mobile menu.\n *\n * @param {HTMLElement} node HTMLElement for the menu.\n * @param {string} title The title for the menu.\n * @param {string} selectedClass The class for selected listitems.\n * @param {boolean} slidingSubmenus Whether or not to use sliding submenus.\n * @param {string} theme The color scheme for the menu.\n */\n function MmSlidingPanelsNavigation(node, title, selectedClass, slidingSubmenus, theme) {\n this.node = node;\n this.title = title;\n this.slidingSubmenus = slidingSubmenus;\n this.selectedClass = selectedClass;\n // Add classname.\n this.node.classList.add(prefix);\n this.node.classList.add(prefix + \"--\" + theme);\n this.node.classList.add(prefix + \"--\" + (this.slidingSubmenus ? 'navbar' : 'vertical'));\n this._setSelectedl();\n this._initAnchors();\n }\n Object.defineProperty(MmSlidingPanelsNavigation.prototype, \"prefix\", {\n /** Prefix for the class. */\n get: function () {\n return prefix;\n },\n enumerable: false,\n configurable: true\n });\n /**\n * Open the given panel.\n *\n * @param {HTMLElement} panel Panel to open.\n */\n MmSlidingPanelsNavigation.prototype.openPanel = function (panel) {\n /** Parent LI for the panel. */\n var listitem = panel.parentElement;\n // Sliding submenus\n if (this.slidingSubmenus) {\n /** Title above the panel to open. */\n var title_1 = panel.dataset.mmSpnTitle;\n // Opening the main level UL.\n if (listitem === this.node) {\n this.node.classList.add(prefix + \"--main\");\n }\n // Opening a sub level UL.\n else {\n this.node.classList.remove(prefix + \"--main\");\n // Find title from parent LI.\n if (!title_1) {\n Object(_helpers__WEBPACK_IMPORTED_MODULE_0__[\"r\"])(listitem.children).forEach(function (child) {\n if (child.matches('a, span')) {\n title_1 = child.textContent;\n }\n });\n }\n }\n // Use the default title.\n if (!title_1) {\n title_1 = this.title;\n }\n // Set the title.\n this.node.dataset.mmSpnTitle = title_1;\n // Unset all panels from being opened and parent.\n Object(_helpers__WEBPACK_IMPORTED_MODULE_0__[\"$\"])(\".\" + prefix + \"--open\", this.node).forEach(function (open) {\n open.classList.remove(prefix + \"--open\");\n open.classList.remove(prefix + \"--parent\");\n });\n // Set the current panel as being opened.\n panel.classList.add(prefix + \"--open\");\n panel.classList.remove(prefix + \"--parent\");\n // Set all parent panels as being parent.\n var parent_1 = panel.parentElement.closest('ul');\n while (parent_1) {\n parent_1.classList.add(prefix + \"--open\");\n parent_1.classList.add(prefix + \"--parent\");\n parent_1 = parent_1.parentElement.closest('ul');\n }\n }\n // Vertical submenus\n else {\n /** Whether or not the panel is currently opened. */\n var isOpened = panel.matches(\".\" + prefix + \"--open\");\n // Unset all panels from being opened and parent.\n Object(_helpers__WEBPACK_IMPORTED_MODULE_0__[\"$\"])(\".\" + prefix + \"--open\", this.node).forEach(function (open) {\n open.classList.remove(prefix + \"--open\");\n });\n // Toggle the current panel.\n panel.classList[isOpened ? 'remove' : 'add'](prefix + \"--open\");\n // Set all parent panels as being opened.\n var parent_2 = panel.parentElement.closest('ul');\n while (parent_2) {\n parent_2.classList.add(prefix + \"--open\");\n parent_2 = parent_2.parentElement.closest('ul');\n }\n }\n };\n /**\n * Initiate the selected listitem / open the current panel.\n */\n MmSlidingPanelsNavigation.prototype._setSelectedl = function () {\n /** All selected LIs. */\n var listitems = Object(_helpers__WEBPACK_IMPORTED_MODULE_0__[\"$\"])('.' + this.selectedClass, this.node);\n /** The last selected LI. */\n var listitem = listitems[listitems.length - 1];\n /** The opened UL. */\n var panel = null;\n if (listitem) {\n panel = listitem.closest('ul');\n }\n if (!panel) {\n panel = this.node.querySelector('ul');\n }\n this.openPanel(panel);\n };\n /**\n * Initialize the click event handlers.\n */\n MmSlidingPanelsNavigation.prototype._initAnchors = function () {\n var _this = this;\n /**\n * Clicking an A in the menu: prevent bubbling up to the LI.\n *\n * @param {HTMLElement} target The clicked element.\n * @return {boolean} handled Whether or not the event was handled.\n */\n var clickAnchor = function (target) {\n if (target.matches('a')) {\n return true;\n }\n return false;\n };\n /**\n * Click a LI or SPAN in the menu: open its submenu (if present).\n *\n * @param {HTMLElement} target The clicked element.\n * @return {boolean} Whether or not the event was handled.\n */\n var openSubmenu = function (target) {\n /** Parent listitem for the submenu. */\n var listitem;\n // Find the parent listitem.\n if (target.closest('span')) {\n listitem = target.parentElement;\n }\n else if (target.closest('li')) {\n listitem = target;\n }\n else {\n listitem = false;\n }\n if (listitem) {\n Object(_helpers__WEBPACK_IMPORTED_MODULE_0__[\"r\"])(listitem.children).forEach(function (panel) {\n if (panel.matches('ul')) {\n _this.openPanel(panel);\n }\n });\n return true;\n }\n return false;\n };\n /**\n * Click the menu (the navbar): close the last opened submenu.\n *\n * @param {HTMLElement} target The clicked element.\n * @return {boolean} Whether or not the event was handled.\n */\n var closeSubmenu = function (target) {\n /** The opened ULs. */\n var panels = Object(_helpers__WEBPACK_IMPORTED_MODULE_0__[\"$\"])(\".\" + prefix + \"--open\", target);\n /** The last opened UL. */\n var panel = panels[panels.length - 1];\n if (panel) {\n /** The second to last opened UL. */\n var parent_3 = panel.parentElement.closest('ul');\n if (parent_3) {\n _this.openPanel(parent_3);\n return true;\n }\n }\n return false;\n };\n this.node.addEventListener('click', function (evnt) {\n var target = evnt.target;\n var handled = false;\n handled = handled || clickAnchor(target);\n handled = handled || openSubmenu(target);\n handled = handled || closeSubmenu(target);\n if (handled) {\n evnt.stopImmediatePropagation();\n }\n });\n };\n return MmSlidingPanelsNavigation;\n}());\n/* harmony default export */ __webpack_exports__[\"default\"] = (MmSlidingPanelsNavigation);\n\n\n//# sourceURL=webpack:///./esm/modules/sliding-panels-navigation/index.js?");
|
554
165
|
|
555
|
-
|
556
|
-
/* harmony default export */ var mmenu_light = __webpack_exports__["default"] = (core);
|
166
|
+
/***/ }),
|
557
167
|
|
558
|
-
|
559
|
-
|
168
|
+
/***/ "./src/mmenu-light.js":
|
169
|
+
/*!****************************!*\
|
170
|
+
!*** ./src/mmenu-light.js ***!
|
171
|
+
\****************************/
|
172
|
+
/*! exports provided: default */
|
173
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
560
174
|
|
175
|
+
"use strict";
|
176
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _esm_core_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../esm/core/index */ \"./esm/core/index.js\");\n/*!\n * Mmenu Light\n * mmenujs.com/mmenu-light\n *\n * Copyright (c) Fred Heusschen\n * www.frebsite.nl\n *\n * License: CC-BY-4.0\n * http://creativecommons.org/licenses/by/4.0/\n */\n\n//\tThe module\n\n\n// Export module\n/* harmony default export */ __webpack_exports__[\"default\"] = (_esm_core_index__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n//\tGlobal namespace\nwindow.MmenuLight = _esm_core_index__WEBPACK_IMPORTED_MODULE_0__[\"default\"];\n\n\n//# sourceURL=webpack:///./src/mmenu-light.js?");
|
561
177
|
|
562
178
|
/***/ })
|
563
|
-
|
179
|
+
|
180
|
+
/******/ });
|
@@ -1,14 +1,14 @@
|
|
1
1
|
/*
|
2
2
|
# -----------------------------------------------------------------------------
|
3
|
-
# ~/assets/themes/j1/modules/mmenu_light/js/mmenu.js
|
4
|
-
# Mobile Menu v3.
|
3
|
+
# ~/assets/themes/j1/modules/mmenu_light/js/mmenu.min.js
|
4
|
+
# Mobile Menu v3.1.1 (April 2022) implementation for J1 Template
|
5
5
|
#
|
6
6
|
# Product/Info:
|
7
7
|
# https://jekyll.one
|
8
8
|
# https://github.com/FrDH/mmenu-light
|
9
9
|
#
|
10
10
|
# Copyright (C) 2022 Juergen Adams
|
11
|
-
# Copyright (C) 2015-
|
11
|
+
# Copyright (C) 2015-2022 Fred Heusschen
|
12
12
|
#
|
13
13
|
# J1 Template is licensed under the MIT License.
|
14
14
|
# See: https://github.com/jekyll-one-org/J1 Template/blob/master/LICENSE
|
@@ -16,15 +16,4 @@
|
|
16
16
|
# See: http://creativecommons.org/licenses/by/4.0/
|
17
17
|
# -----------------------------------------------------------------------------
|
18
18
|
*/
|
19
|
-
|
20
|
-
/*!
|
21
|
-
* Mmenu Light
|
22
|
-
* mmenujs.com/mmenu-light v3.0.8
|
23
|
-
*
|
24
|
-
* Copyright (c) Fred Heusschen
|
25
|
-
* www.frebsite.nl
|
26
|
-
*
|
27
|
-
* License: CC-BY-4.0
|
28
|
-
* http://creativecommons.org/licenses/by/4.0/
|
29
|
-
*/
|
30
|
-
!function(t){var e={};function n(i){if(e[i])return e[i].exports;var s=e[i]={i:i,l:!1,exports:{}};return t[i].call(s.exports,s,s.exports,n),s.l=!0,s.exports}n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)n.d(i,s,function(e){return t[e]}.bind(null,s));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";n.r(e);var i=function(){function t(t){var e=this;this.listener=function(t){(t.matches?e.matchFns:e.unmatchFns).forEach((function(t){t()}))},this.toggler=window.matchMedia(t),this.toggler.addListener(this.listener),this.matchFns=[],this.unmatchFns=[]}return t.prototype.add=function(t,e){this.matchFns.push(t),this.unmatchFns.push(e),(this.toggler.matches?t:e)()},t}(),s=function(t){return Array.prototype.slice.call(t)},o=function(t,e){return s((e||document).querySelectorAll(t))},r=("ontouchstart"in window||navigator.msMaxTouchPoints,navigator.userAgent.indexOf("MSIE")>-1||navigator.appVersion.indexOf("Trident/")>-1),a="mm-spn",c=function(){function t(t,e,n,i,s){this.node=t,this.title=e,this.slidingSubmenus=i,this.selectedClass=n,this.node.classList.add(a),r&&(this.slidingSubmenus=!1),this.node.classList.add(a+"--"+s),this.node.classList.add(a+"--"+(this.slidingSubmenus?"navbar":"vertical")),this._setSelectedl(),this._initAnchors()}return Object.defineProperty(t.prototype,"prefix",{get:function(){return a},enumerable:!0,configurable:!0}),t.prototype.openPanel=function(t){var e=t.parentElement;if(this.slidingSubmenus){var n=t.dataset.mmSpnTitle;e===this.node?this.node.classList.add(a+"--main"):(this.node.classList.remove(a+"--main"),n||s(e.children).forEach((function(t){t.matches("a, span")&&(n=t.textContent)}))),n||(n=this.title),this.node.dataset.mmSpnTitle=n,o("."+a+"--open",this.node).forEach((function(t){t.classList.remove(a+"--open"),t.classList.remove(a+"--parent")})),t.classList.add(a+"--open"),t.classList.remove(a+"--parent");for(var i=t.parentElement.closest("ul");i;)i.classList.add(a+"--open"),i.classList.add(a+"--parent"),i=i.parentElement.closest("ul")}else{var r=t.matches("."+a+"--open");o("."+a+"--open",this.node).forEach((function(t){t.classList.remove(a+"--open")})),t.classList[r?"remove":"add"](a+"--open");for(var c=t.parentElement.closest("ul");c;)c.classList.add(a+"--open"),c=c.parentElement.closest("ul")}},t.prototype._setSelectedl=function(){var t=o("."+this.selectedClass,this.node),e=t[t.length-1],n=null;e&&(n=e.closest("ul")),n||(n=this.node.querySelector("ul")),this.openPanel(n)},t.prototype._initAnchors=function(){var t=this;this.node.addEventListener("click",(function(e){var n=e.target,i=!1;(i=(i=(i=i||function(t){return!!t.matches("a")}(n))||function(e){var n;return!!(n=e.closest("span")?e.parentElement:!!e.closest("li")&&e)&&(s(n.children).forEach((function(e){e.matches("ul")&&t.openPanel(e)})),!0)}(n))||function(e){var n=o("."+a+"--open",e),i=n[n.length-1];if(i){var s=i.parentElement.closest("ul");if(s)return t.openPanel(s),!0}return!1}(n))&&e.stopImmediatePropagation()}))},t}(),d="mm-ocd",u=function(){function t(t,e){var n=this;void 0===t&&(t=null),this.wrapper=document.createElement("div"),this.wrapper.classList.add(""+d),this.wrapper.classList.add(d+"--"+e),this.content=document.createElement("div"),this.content.classList.add(d+"__content"),this.wrapper.append(this.content),this.backdrop=document.createElement("div"),this.backdrop.classList.add(d+"__backdrop"),this.wrapper.append(this.backdrop),document.body.append(this.wrapper),t&&this.content.append(t);var i=function(t){n.close(),t.stopImmediatePropagation()};this.backdrop.addEventListener("touchstart",i,{passive:!0}),this.backdrop.addEventListener("mousedown",i,{passive:!0})}return Object.defineProperty(t.prototype,"prefix",{get:function(){return d},enumerable:!0,configurable:!0}),t.prototype.open=function(){this.wrapper.classList.add(d+"--open"),document.body.classList.add(d+"-opened")},t.prototype.close=function(){this.wrapper.classList.remove(d+"--open"),document.body.classList.remove(d+"-opened")},t}(),l=function(){function t(t,e){void 0===e&&(e="all"),this.menu=t,this.toggler=new i(e)}return t.prototype.navigation=function(t){var e=this;if(!this.navigator){var n=(t=t||{}).title,i=void 0===n?"Menu":n,s=t.selectedClass,o=void 0===s?"Selected":s,r=t.slidingSubmenus,a=void 0===r||r,d=t.theme,u=void 0===d?"light":d;this.navigator=new c(this.menu,i,o,a,u),this.toggler.add((function(){return e.menu.classList.add(e.navigator.prefix)}),(function(){return e.menu.classList.remove(e.navigator.prefix)}))}return this.navigator},t.prototype.offcanvas=function(t){var e=this;if(!this.drawer){var n=(t=t||{}).position,i=void 0===n?"left":n;this.drawer=new u(null,i);var s=document.createComment("original menu location");this.menu.after(s),this.toggler.add((function(){e.drawer.content.append(e.menu)}),(function(){e.drawer.close(),s.after(e.menu)}))}return this.drawer},t}();e.default=l;window.MmenuLight=l}]);
|
19
|
+
!function(t){var e={};function n(o){if(e[o])return e[o].exports;var s=e[o]={i:o,l:!1,exports:{}};return t[o].call(s.exports,s,s.exports,n),s.l=!0,s.exports}n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)n.d(o,s,function(e){return t[e]}.bind(null,s));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";n.r(e);var o=function(){function t(t){var e=this;this.listener=function(t){(t.matches?e.matchFns:e.unmatchFns).forEach((function(t){t()}))},this.toggler=window.matchMedia(t),this.toggler.addListener(this.listener),this.matchFns=[],this.unmatchFns=[]}return t.prototype.add=function(t,e){this.matchFns.push(t),this.unmatchFns.push(e),(this.toggler.matches?t:e)()},t}(),s=function(t){return Array.prototype.slice.call(t)},i=function(t,e){return s((e||document).querySelectorAll(t))},r="mm-spn",a=function(){function t(t,e,n,o,s){this.node=t,this.title=e,this.slidingSubmenus=o,this.selectedClass=n,this.node.classList.add(r),this.node.classList.add(r+"--"+s),this.node.classList.add(r+"--"+(this.slidingSubmenus?"navbar":"vertical")),this._setSelectedl(),this._initAnchors()}return Object.defineProperty(t.prototype,"prefix",{get:function(){return r},enumerable:!1,configurable:!0}),t.prototype.openPanel=function(t){var e=t.parentElement;if(this.slidingSubmenus){var n=t.dataset.mmSpnTitle;e===this.node?this.node.classList.add(r+"--main"):(this.node.classList.remove(r+"--main"),n||s(e.children).forEach((function(t){t.matches("a, span")&&(n=t.textContent)}))),n||(n=this.title),this.node.dataset.mmSpnTitle=n,i(".mm-spn--open",this.node).forEach((function(t){t.classList.remove(r+"--open"),t.classList.remove(r+"--parent")})),t.classList.add(r+"--open"),t.classList.remove(r+"--parent");for(var o=t.parentElement.closest("ul");o;)o.classList.add(r+"--open"),o.classList.add(r+"--parent"),o=o.parentElement.closest("ul")}else{var a=t.matches(".mm-spn--open");i(".mm-spn--open",this.node).forEach((function(t){t.classList.remove(r+"--open")})),t.classList[a?"remove":"add"](r+"--open");for(var c=t.parentElement.closest("ul");c;)c.classList.add(r+"--open"),c=c.parentElement.closest("ul")}},t.prototype._setSelectedl=function(){var t=i("."+this.selectedClass,this.node),e=t[t.length-1],n=null;e&&(n=e.closest("ul")),n||(n=this.node.querySelector("ul")),this.openPanel(n)},t.prototype._initAnchors=function(){var t=this;this.node.addEventListener("click",(function(e){var n=e.target,o=!1;(o=(o=(o=o||function(t){return!!t.matches("a")}(n))||function(e){var n;return!!(n=e.closest("span")?e.parentElement:!!e.closest("li")&&e)&&(s(n.children).forEach((function(e){e.matches("ul")&&t.openPanel(e)})),!0)}(n))||function(e){var n=i(".mm-spn--open",e),o=n[n.length-1];if(o){var s=o.parentElement.closest("ul");if(s)return t.openPanel(s),!0}return!1}(n))&&e.stopImmediatePropagation()}))},t}(),c=function(){function t(t,e){var n=this;void 0===t&&(t=null),this.wrapper=document.createElement("div"),this.wrapper.classList.add("mm-ocd"),this.wrapper.classList.add("mm-ocd--"+e),this.content=document.createElement("div"),this.content.classList.add("mm-ocd__content"),this.wrapper.append(this.content),this.backdrop=document.createElement("div"),this.backdrop.classList.add("mm-ocd__backdrop"),this.wrapper.append(this.backdrop),document.body.append(this.wrapper),t&&this.content.append(t);var o=function(t){n.close(),t.stopImmediatePropagation()};this.backdrop.addEventListener("touchstart",o,{passive:!0}),this.backdrop.addEventListener("mousedown",o,{passive:!0})}return Object.defineProperty(t.prototype,"prefix",{get:function(){return"mm-ocd"},enumerable:!1,configurable:!0}),t.prototype.open=function(){this.wrapper.classList.add("mm-ocd--open"),document.body.classList.add("mm-ocd-opened")},t.prototype.close=function(){this.wrapper.classList.remove("mm-ocd--open"),document.body.classList.remove("mm-ocd-opened")},t}(),d=function(){function t(t,e){void 0===e&&(e="all"),this.menu=t,this.toggler=new o(e)}return t.prototype.navigation=function(t){var e=this;if(!this.navigator){var n=(t=t||{}).title,o=void 0===n?"Menu":n,s=t.selectedClass,i=void 0===s?"Selected":s,r=t.slidingSubmenus,c=void 0===r||r,d=t.theme,l=void 0===d?"light":d;this.navigator=new a(this.menu,o,i,c,l),this.toggler.add((function(){return e.menu.classList.add(e.navigator.prefix)}),(function(){return e.menu.classList.remove(e.navigator.prefix)}))}return this.navigator},t.prototype.offcanvas=function(t){var e=this;if(!this.drawer){var n=(t=t||{}).position,o=void 0===n?"left":n;this.drawer=new c(null,o);var s=document.createComment("original menu location");this.menu.after(s),this.toggler.add((function(){e.drawer.content.append(e.menu)}),(function(){e.drawer.close(),s.after(e.menu)}))}return this.drawer},t}();e.default=d;window.MmenuLight=d}]);
|