<project version="4">
<component name="ChangeListManager">
<list default="true" id="352ce63a-b52a-41a2-979b-becda7920939" name="Default" comment=".">
+ <change afterPath="$PROJECT_DIR$/js/mmenu/mmenu-light.css" afterDir="false" />
+ <change afterPath="$PROJECT_DIR$/js/mmenu/mmenu-light.js" afterDir="false" />
+ <change afterPath="$PROJECT_DIR$/js/mmenu/mmenu-light.polyfills.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/config/balcon.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/balcon.php" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/config/bureau.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/bureau.php" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/config/chambre.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/chambre.php" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/config/cour.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/cour.php" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/config/cuisine.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/cuisine.php" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/config/entree.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/entree.php" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/config/lit.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/lit.php" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/config/litvincent.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/litvincent.php" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/config/salon.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/salon.php" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/config/sdb.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/sdb.php" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/config/wc.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/wc.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/index.php" beforeDir="false" afterPath="$PROJECT_DIR$/index.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/js/home.js" beforeDir="false" afterPath="$PROJECT_DIR$/js/home.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/scripts/lib/lib.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/lib.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/style/style.css" beforeDir="false" afterPath="$PROJECT_DIR$/style/style.css" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/style/style.less" beforeDir="false" afterPath="$PROJECT_DIR$/style/style.less" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
</component>
<component name="RecentsManager">
<key name="MoveFile.RECENT_KEYS">
+ <recent name="T:\Drive\Works\home\js\mmenu" />
<recent name="T:\Drive\Works\home\tools\xplanet" />
<recent name="T:\Drive\Works\home\style\fonts\webfonts" />
<recent name="T:\Drive\Works\home\style\fonts\webfonts\520" />
<recent name="T:\Drive\Works\home\images" />
- <recent name="D:\CloudStation\Works\home\style\fonts" />
</key>
<key name="CopyFile.RECENT_KEYS">
<recent name="T:\Drive\Works\home\style\fonts\fontawesome" />
<workItem from="1604828693023" duration="1255000" />
<workItem from="1605001866699" duration="7793000" />
<workItem from="1605087671373" duration="102000" />
- <workItem from="1605087787424" duration="5282000" />
- </task>
- <task id="LOCAL-00331" summary=".">
- <created>1595314774388</created>
- <option name="number" value="00331" />
- <option name="presentableId" value="LOCAL-00331" />
- <option name="project" value="LOCAL" />
- <updated>1595314774389</updated>
+ <workItem from="1605087787424" duration="6276000" />
</task>
<task id="LOCAL-00332" summary=".">
<created>1595319345113</created>
<option name="project" value="LOCAL" />
<updated>1605092224515</updated>
</task>
- <option name="localTasksCounter" value="380" />
+ <task id="LOCAL-00380" summary=".">
+ <created>1605093966322</created>
+ <option name="number" value="00380" />
+ <option name="presentableId" value="LOCAL-00380" />
+ <option name="project" value="LOCAL" />
+ <updated>1605093966322</updated>
+ </task>
+ <option name="localTasksCounter" value="381" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<screen x="0" y="0" width="1707" height="920" />
</state>
<state x="740" y="229" key="#com.jetbrains.php.refactoring.extractMethod.PhpExtractMethodDialog#function0/0.0.1707.920@0.0.1707.920" timestamp="1604146905948" />
- <state x="198" y="0" width="737" height="502" key="CommitChangelistDialog2" timestamp="1605092211673">
+ <state x="198" y="0" width="737" height="502" key="CommitChangelistDialog2" timestamp="1605093956565">
<screen x="0" y="0" width="2560" height="1040" />
</state>
<state x="132" y="0" width="737" height="502" key="CommitChangelistDialog2/0.0.1707.920@0.0.1707.920" timestamp="1605086955514" />
<state x="701" y="75" key="CommitChangelistDialog2/0.0.1920.1160@0.0.1920.1160" timestamp="1602171117745" />
- <state x="198" y="0" width="745" height="567" key="CommitChangelistDialog2/0.0.2560.1040@0.0.2560.1040" timestamp="1605092211673" />
+ <state x="198" y="0" width="745" height="567" key="CommitChangelistDialog2/0.0.2560.1040@0.0.2560.1040" timestamp="1605093956565" />
<state x="952" y="244" key="FileChooserDialogImpl" timestamp="1605087475486">
<screen x="0" y="0" width="2560" height="1040" />
</state>
<screen x="0" y="0" width="2560" height="1040" />
</state>
<state x="295" y="0" width="1290" height="907" key="dock-window-1/0.0.2560.1040@0.0.2560.1040" timestamp="1603274697406" />
- <state x="977" y="257" width="607" height="536" key="find.popup" timestamp="1605017181663">
+ <state x="977" y="257" width="607" height="536" key="find.popup" timestamp="1605094722751">
<screen x="0" y="0" width="2560" height="1040" />
</state>
<state x="651" y="227" width="550" height="534" key="find.popup/0.0.1707.920@0.0.1707.920" timestamp="1604301949692" />
- <state x="977" y="257" width="607" height="536" key="find.popup/0.0.2560.1040@0.0.2560.1040" timestamp="1605017181663" />
+ <state x="977" y="257" width="607" height="536" key="find.popup/0.0.2560.1040@0.0.2560.1040" timestamp="1605094722751" />
<state x="1056" y="292" key="refactoring.ChangeSignatureDialog" timestamp="1604518096294">
<screen x="0" y="0" width="2560" height="1040" />
</state>
<link href="<?php echo relativePath('style/weatherstation.css') ?>" rel="stylesheet" type="text/css">
<link href="<?php echo relativePath('style/fonts/fontawesome/all.min.css') ?>" rel="stylesheet">
<link href="<?php echo relativePath('style/fonts/roboto/stylesheet.css') ?>" rel="stylesheet">
+ <link href="<?php echo relativePath('js/mmenu/mmenu-light.css') ?>" rel="stylesheet">
<?php if (!$raspberry): ?>
<meta name="format-detection" content="telephone=no">
<meta name="viewport" content="width=1024, user-scalable=no, initial-scale=1.0, maximum-scale=1.0">
<script src="<?php echo relativePath('js/jquery.min.js') ?>"></script>
<script src="<?php echo relativePath('js/jquery.scrollto.min.js') ?>"></script>
<script src="<?php echo relativePath('js/jquery.mousewheel.min.js') ?>"></script>
+<script src="<?php echo relativePath('js/mmenu/mmenu-light.js') ?>"></script>
+<script src="<?php echo relativePath('js/mmenu/mmenu-light.polyfills.js') ?>"></script>
<script src="<?php echo relativePath('js/hammer.min.js') ?>"></script>
<script src="<?php echo relativePath('js/fingers.min.js') ?>"></script>
<script src="<?php echo relativePath('js/common.js') ?>"></script>
var lastOffScreen = 0;
var maskRemoteShort = false;
+document.addEventListener(
+ "DOMContentLoaded", () => {
+ const menu = new MmenuLight(
+ document.querySelector( "#mainnav" )
+ );
+
+ const navigator = menu.navigation();
+ const drawer = menu.offcanvas();
+
+ document.querySelector( 'a[href="#my-menu"]' )
+ .addEventListener( 'click', ( evnt ) => {
+ evnt.preventDefault();
+ drawer.open();
+ });
+ }
+);
+
$(function () {
var clicktouchevent = 'click';
--- /dev/null
+/*!
+ * Mmenu Light
+ * mmenujs.com/mmenu-light
+ *
+ * Copyright (c) Fred Heusschen
+ * www.frebsite.nl
+ *
+ * License: CC-BY-4.0
+ * http://creativecommons.org/licenses/by/4.0/
+ */:root{--mm-ocd-width:80%;--mm-ocd-min-width:200px;--mm-ocd-max-width:440px}body.mm-ocd-opened{overflow-y:hidden;-ms-scroll-chaining:none;overscroll-behavior:none}.mm-ocd{position:fixed;top:0;right:0;bottom:100%;left:0;z-index:9999;overflow:hidden;-ms-scroll-chaining:none;overscroll-behavior:contain;background:rgba(0,0,0,0);-webkit-transition-property:bottom,background-color;-o-transition-property:bottom,background-color;transition-property:bottom,background-color;-webkit-transition-duration:0s,.3s;-o-transition-duration:0s,.3s;transition-duration:0s,.3s;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-delay:.45s,.15s;-o-transition-delay:.45s,.15s;transition-delay:.45s,.15s}.mm-ocd--open{bottom:0;background:rgba(0,0,0,.25);-webkit-transition-delay:0s;-o-transition-delay:0s;transition-delay:0s}.mm-ocd__content{position:absolute;top:0;bottom:0;z-index:2;width:80%;width:var(--mm-ocd-width);min-width:200px;min-width:var(--mm-ocd-min-width);max-width:440px;max-width:var(--mm-ocd-max-width);background:#fff;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;-o-transition-property:transform;transition-property:transform;transition-property:transform,-webkit-transform;-webkit-transition-duration:.3s;-o-transition-duration:.3s;transition-duration:.3s;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease}.mm-ocd--left .mm-ocd__content{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.mm-ocd--right .mm-ocd__content{right:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.mm-ocd--open .mm-ocd__content{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.mm-ocd__backdrop{position:absolute;top:0;bottom:0;z-index:3;width:calc(100% - 80%);width:calc(100% - var(--mm-ocd-width));min-width:calc(100% - 440px);min-width:calc(100% - var(--mm-ocd-max-width));max-width:calc(100% - 200px);max-width:calc(100% - var(--mm-ocd-min-width));background:rgba(3,2,1,0)}.mm-ocd--left .mm-ocd__backdrop{right:0}.mm-ocd--right .mm-ocd__backdrop{left:0}.mm-spn,.mm-spn a,.mm-spn li,.mm-spn span,.mm-spn ul{display:block;padding:0;margin:0;-webkit-box-sizing:border-box;box-sizing:border-box}:root{--mm-spn-item-height:50px;--mm-spn-item-indent:20px;--mm-spn-line-height:24px}.mm-spn{width:100%;height:100%;-webkit-tap-highlight-color:transparent;-webkit-overflow-scrolling:touch;overflow:hidden;-webkit-clip-path:inset(0 0 0 0);clip-path:inset(0 0 0 0);-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}.mm-spn ul{-webkit-overflow-scrolling:touch;position:fixed;top:0;left:100%;bottom:0;z-index:2;width:130%;padding-right:30%;line-height:24px;line-height:var(--mm-spn-line-height);overflow:visible;overflow-y:auto;background:inherit;-webkit-transition:left .3s ease 0s;-o-transition:left .3s ease 0s;transition:left .3s ease 0s;cursor:default}.mm-spn ul:after{content:'';display:block;height:50px;height:var(--mm-spn-item-height)}.mm-spn>ul{left:0}.mm-spn ul.mm-spn--open{left:0}.mm-spn ul.mm-spn--parent{left:-30%;overflow-y:hidden}.mm-spn li{position:relative;background:inherit;cursor:pointer}.mm-spn li:before{content:'';display:block;position:absolute;top:25px;top:calc(var(--mm-spn-item-height)/ 2);right:25px;right:calc(var(--mm-spn-item-height)/ 2);z-index:0;width:10px;height:10px;border-top:2px solid;border-right:2px solid;-webkit-transform:rotate(45deg) translate(0,-50%);-ms-transform:rotate(45deg) translate(0,-50%);transform:rotate(45deg) translate(0,-50%);opacity:.4}.mm-spn li:after{content:'';display:block;margin-left:20px;margin-left:var(--mm-spn-item-indent);border-top:1px solid;opacity:.15}.mm-spn a,.mm-spn span{position:relative;z-index:1;padding:13px 20px;padding:calc((var(--mm-spn-item-height) - var(--mm-spn-line-height))/ 2) var(--mm-spn-item-indent)}.mm-spn a{background:inherit;color:inherit;text-decoration:none}.mm-spn a:not(:last-child){width:calc(100% - 50px);width:calc(100% - var(--mm-spn-item-height))}.mm-spn a:not(:last-child):after{content:'';display:block;position:absolute;top:0;right:0;bottom:0;border-right:1px solid;opacity:.15}.mm-spn span{background:0 0}.mm-spn.mm-spn--navbar{cursor:pointer}.mm-spn.mm-spn--navbar:before{content:'';display:block;position:absolute;top:25px;top:calc(var(--mm-spn-item-height)/ 2);left:20px;left:var(--mm-spn-item-indent);width:10px;height:10px;margin-top:2px;border-top:2px solid;border-left:2px solid;-webkit-transform:rotate(-45deg) translate(50%,-50%);-ms-transform:rotate(-45deg) translate(50%,-50%);transform:rotate(-45deg) translate(50%,-50%);opacity:.4}.mm-spn.mm-spn--navbar.mm-spn--main{cursor:default}.mm-spn.mm-spn--navbar.mm-spn--main:before{content:none;display:none}.mm-spn.mm-spn--navbar:after{content:attr(data-mm-spn-title);display:block;position:absolute;top:0;left:0;right:0;height:50px;height:var(--mm-spn-item-height);padding:0 40px;padding:0 calc(var(--mm-spn-item-indent) * 2);line-height:50px;line-height:var(--mm-spn-item-height);opacity:.4;text-align:center;overflow:hidden;white-space:nowrap;-o-text-overflow:ellipsis;text-overflow:ellipsis}.mm-spn.mm-spn--navbar.mm-spn--main:after{padding-left:20px;padding-left:var(--mm-spn-item-indent)}.mm-spn.mm-spn--navbar ul{top:51px;top:calc(var(--mm-spn-item-height) + 1px)}.mm-spn.mm-spn--navbar ul:before{content:'';display:block;position:fixed;top:inherit;z-index:2;width:100%;border-top:1px solid currentColor;opacity:.15}.mm-spn.mm-spn--light{color:#444;background:#f3f3f3}.mm-spn.mm-spn--dark{color:#ddd;background:#333}.mm-spn.mm-spn--vertical{overflow-y:auto}.mm-spn.mm-spn--vertical ul{width:100%;padding-right:0;position:static}.mm-spn.mm-spn--vertical ul ul{display:none;padding-left:20px;padding-left:var(--mm-spn-item-indent)}.mm-spn.mm-spn--vertical ul ul:after{height:25px;height:calc(var(--mm-spn-item-height)/ 2)}.mm-spn.mm-spn--vertical ul.mm-spn--open{display:block}.mm-spn.mm-spn--vertical li.mm-spn--open:before{-webkit-transform:rotate(135deg) translate(-50%,0);-ms-transform:rotate(135deg) translate(-50%,0);transform:rotate(135deg) translate(-50%,0)}.mm-spn.mm-spn--vertical ul ul li:last-child:after{content:none;display:none}
\ No newline at end of file
--- /dev/null
+!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:!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(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:!1,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}]);
\ No newline at end of file
--- /dev/null
+// Source: https://developer.mozilla.org/en-US/docs/Web/API/NodeList/forEach
+if (window.NodeList && !NodeList.prototype.forEach) {
+ NodeList.prototype.forEach = function(callback, thisArg) {
+ thisArg = thisArg || window;
+ for (var i = 0; i < this.length; i++) {
+ callback.call(thisArg, this[i], i, this);
+ }
+ };
+}
+
+// Source: https://developer.mozilla.org/en-US/docs/Web/API/Element/matches
+if (!Element.prototype.matches) {
+ Element.prototype.matches =
+ Element.prototype.matchesSelector ||
+ Element.prototype.mozMatchesSelector ||
+ Element.prototype.msMatchesSelector ||
+ Element.prototype.oMatchesSelector ||
+ Element.prototype.webkitMatchesSelector ||
+ function(s) {
+ var matches = (
+ this.document || this.ownerDocument
+ ).querySelectorAll(s),
+ i = matches.length;
+ while (--i >= 0 && matches.item(i) !== this) {}
+ return i > -1;
+ };
+}
+
+// Source: https://developer.mozilla.org/en-US/docs/Web/API/Element/closest
+if (!Element.prototype.matches) {
+ Element.prototype.matches =
+ Element.prototype.msMatchesSelector ||
+ Element.prototype.webkitMatchesSelector;
+}
+
+if (!Element.prototype.closest) {
+ Element.prototype.closest = function(s) {
+ var el = this;
+
+ do {
+ if (el.matches(s)) return el;
+ el = el.parentElement || el.parentNode;
+ } while (el !== null && el.nodeType === 1);
+ return null;
+ };
+}
+
+// from: https://github.com/jserz/js_piece/blob/master/DOM/ChildNode/after()/after().md
+(function(arr) {
+ arr.forEach(function(item) {
+ if (item.hasOwnProperty('after')) {
+ return;
+ }
+ Object.defineProperty(item, 'after', {
+ configurable: true,
+ enumerable: true,
+ writable: true,
+ value: function after() {
+ var argArr = Array.prototype.slice.call(arguments),
+ docFrag = document.createDocumentFragment();
+
+ argArr.forEach(function(argItem) {
+ var isNode = argItem instanceof Node;
+ docFrag.appendChild(
+ isNode
+ ? argItem
+ : document.createTextNode(String(argItem))
+ );
+ });
+
+ this.parentNode.insertBefore(docFrag, this.nextSibling);
+ }
+ });
+ });
+})([Element.prototype, CharacterData.prototype, DocumentType.prototype]);
+
+// Source: https://github.com/jserz/js_piece/blob/master/DOM/ParentNode/append()/append().md
+(function(arr) {
+ arr.forEach(function(item) {
+ if (item.hasOwnProperty('append')) {
+ return;
+ }
+ Object.defineProperty(item, 'append', {
+ configurable: true,
+ enumerable: true,
+ writable: true,
+ value: function append() {
+ var argArr = Array.prototype.slice.call(arguments),
+ docFrag = document.createDocumentFragment();
+
+ argArr.forEach(function(argItem) {
+ var isNode = argItem instanceof Node;
+ docFrag.appendChild(
+ isNode
+ ? argItem
+ : document.createTextNode(String(argItem))
+ );
+ });
+
+ this.appendChild(docFrag);
+ }
+ });
+ });
+})([Element.prototype, Document.prototype, DocumentFragment.prototype]);
+
+// from: https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent
+(function() {
+ if (typeof window.Event === 'function') return false;
+
+ function Event(event, params) {
+ params = params || { bubbles: false, cancelable: false };
+ var evt = document.createEvent('Event');
+ evt.initEvent(event, params.bubbles, params.cancelable);
+ return evt;
+ }
+
+ window.Event = Event;
+})();
function makeNav($nav)
{
- if (is_string($nav)) {
- return $nav;
- }
-
$map = [
'home' => '<a href="#" data-menu="home"><i class="fa fa-home" aria-hidden="true"></i></a>',
'lights' => '<a href="#" data-menu="lights"><i class="far fa-lightbulb" aria-hidden="true"></i></a>',
'off' => '<a href="#" data-action="off"><i class="fa fa-power-off" aria-hidden="true"></i></a>',
];
- $res = '';
+ $res = '<nav id="mainnav"><ul>';
foreach ($nav as $item) {
if (isset($map[$item])) {
- $res .= $map[$item];
+ $res .= '<li>' . $map[$item] . '</li>';
}
}
+ $res .= '</ul></nav>';
return $res;
}
overflow-x: scroll;
position: absolute;
top: 0;
- left: 60px;
+ max-width: 100%;
-webkit-overflow-scrolling: touch;
+ scrollbar-width: thin;
}
#scrollholder::-webkit-scrollbar {
width: 0 !important;
overflow-x: scroll;
position: absolute;
top: 0;
- left: 60px;
+ max-width: 100%;
-webkit-overflow-scrolling: touch;
+ scrollbar-width:thin;
&::-webkit-scrollbar {
width: 0 !important;