Add loco scroll v2, update load module and app, update html, add nomodule polyfills script tags

This commit is contained in:
Antoine Boulanger
2019-05-23 10:06:45 -04:00
parent 52db1cc63e
commit d166261d0a
16 changed files with 42 additions and 378 deletions

View File

@@ -0,0 +1 @@
!function(t){"function"==typeof define&&define.amd?define(t):t()}(function(){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function e(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t}function i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function l(t,e){return(l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function c(t,e,n){return(c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=i(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}var t,n,a=function(){function t(){r(this,t),Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}return e(t,[{key:"addEventListener",value:function(t,e){t in this.listeners||(this.listeners[t]=[]),this.listeners[t].push(e)}},{key:"removeEventListener",value:function(t,e){if(t in this.listeners)for(var n=this.listeners[t],r=0,o=n.length;r<o;r++)if(n[r]===e)return void n.splice(r,1)}},{key:"dispatchEvent",value:function(e){var n=this;if(e.type in this.listeners){for(var t=function(t){setTimeout(function(){return t.call(n,e)})},r=this.listeners[e.type],o=0,i=r.length;o<i;o++)t(r[o]);return!e.defaultPrevented}}}]),t}(),f=function(t){function n(){var t,e;return r(this,n),(t=!(e=i(n).call(this))||"object"!=typeof e&&"function"!=typeof e?u(this):e).listeners||a.call(u(t)),Object.defineProperty(u(t),"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(u(t),"onabort",{value:null,writable:!0,configurable:!0}),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}(n,a),e(n,[{key:"toString",value:function(){return"[object AbortSignal]"}},{key:"dispatchEvent",value:function(t){"abort"===t.type&&(this.aborted=!0,"function"==typeof this.onabort&&this.onabort.call(this,t)),c(i(n.prototype),"dispatchEvent",this).call(this,t)}}]),n}(),s=function(){function t(){r(this,t),Object.defineProperty(this,"signal",{value:new f,writable:!0,configurable:!0})}return e(t,[{key:"abort",value:function(){var e;try{e=new Event("abort")}catch(t){"undefined"!=typeof document?document.createEvent?(e=document.createEvent("Event")).initEvent("abort",!1,!1):(e=document.createEventObject()).type="abort":e={type:"abort",bubbles:!1,cancelable:!1}}this.signal.dispatchEvent(e)}},{key:"toString",value:function(){return"[object AbortController]"}}]),t}();"undefined"!=typeof Symbol&&Symbol.toStringTag&&(s.prototype[Symbol.toStringTag]="AbortController",f.prototype[Symbol.toStringTag]="AbortSignal"),((n=t="undefined"!=typeof self?self:global).__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),1):"function"==typeof n.Request&&!n.Request.prototype.hasOwnProperty("signal")||!n.AbortController)&&(t.AbortController=s,t.AbortSignal=f)});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,5 +1,5 @@
<!doctype html>
<html class="has-no-js" lang="en" data-page="home">
<html class="is-loading" lang="en" data-page="home">
<head>
<meta charset="utf-8">
<title>Boilerplate</title>
@@ -19,7 +19,7 @@
<body data-module-load>
<header>
<h1>Boilerplate</h1>
<a href="/"><h1>Boilerplate</h1></a>
<nav>
<ul>
<li><a href="page.html">Page</a></li>
@@ -42,8 +42,12 @@
<p>Made with <a href="https://github.com/locomotivemtl/locomotive-boilerplate" title="Locomotive Boilerplate" target="_blank">🚂</a></p>
</footer>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="assets/scripts/jquery-3.3.1.min.js"><\/script>')</script>
<script nomodule src="https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/7.4.4/polyfill.min.js" crossorigin="anonymous"></script>
<script nomodule src="https://polyfill.io/v3/polyfill.min.js?features=fetch%2CCustomEvent%2CElement.prototype.matches" crossorigin="anonymous"></script>
<script nomodule src="assets/scripts/abortcontroller-polyfill-only.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="assets/scripts/jquery-3.4.1.min.js"><\/script>')</script>
<script src="assets/scripts/vendors.js"></script>
<script src="assets/scripts/app.js"></script>
</body>

View File

@@ -1,5 +1,5 @@
<!doctype html>
<html class="has-no-js" lang="en" data-page="page">
<html class="is-loading" lang="en" data-page="page">
<head>
<meta charset="utf-8">
<title>Page | Boilerplate</title>
@@ -19,7 +19,7 @@
<body data-module-load>
<header>
<h1>Boilerplate</h1>
<a href="/"><h1>Boilerplate</h1></a>
<nav>
<ul>
<li><a href="page.html">Page</a></li>
@@ -42,8 +42,12 @@
<p>Made with <a href="https://github.com/locomotivemtl/locomotive-boilerplate" title="Locomotive Boilerplate" target="_blank">🚂</a></p>
</footer>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="assets/scripts/jquery-3.3.1.min.js"><\/script>')</script>
<script nomodule src="https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/7.4.4/polyfill.min.js" crossorigin="anonymous"></script>
<script nomodule src="https://polyfill.io/v3/polyfill.min.js?features=fetch%2CCustomEvent%2CElement.prototype.matches" crossorigin="anonymous"></script>
<script nomodule src="assets/scripts/abortcontroller-polyfill-only.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="assets/scripts/jquery-3.4.1.min.js"><\/script>')</script>
<script src="assets/scripts/vendors.js"></script>
<script src="assets/scripts/app.js"></script>
</body>