diff options
-rw-r--r-- | src/layouts/partials/scripts.html | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/src/layouts/partials/scripts.html b/src/layouts/partials/scripts.html index 1a2ae702..ad131cc4 100644 --- a/src/layouts/partials/scripts.html +++ b/src/layouts/partials/scripts.html @@ -1,20 +1,21 @@ -{{ $bootstrapJs := resources.Get "/js/bootstrap.min.js" }} -<script src="{{ $bootstrapJs.Permalink | relURL }}"></script> +{{- $bootstrapJs := resources.Get "/js/bootstrap.min.js" -}} + +<script async src="{{ $bootstrapJs.Permalink | relURL }}"></script> <script> (function(w, d) { - var b = d.getElementsByTagName('body')[0]; - var s = d.createElement('script'); - var io = 'IntersectionObserver' in w && 'IntersectionObserverEntry' in w && - 'intersectionRatio' in w.IntersectionObserverEntry.prototype && - 'isIntersecting' in w.IntersectionObserverEntry.prototype; - var v = io ? '17.x' : '8.x'; - s.async = true; - s.src = '/assets/js/vendor/lazyload.' + v + '.iife.min.js'; - w.lazyLoadOptions = { - elements_selector: '.lazy', - threshold: 150 - }; - b.appendChild(s); + var b = d.getElementsByTagName('body')[0]; + var s = d.createElement('script'); + var io = 'IntersectionObserver' in w && 'IntersectionObserverEntry' in w && + 'intersectionRatio' in w.IntersectionObserverEntry.prototype && + 'isIntersecting' in w.IntersectionObserverEntry.prototype; + var v = io ? '17.x' : '8.x'; + s.async = true; + s.src = '/assets/js/vendor/lazyload.' + v + '.iife.min.js'; + w.lazyLoadOptions = { + elements_selector: '.lazy', + threshold: 150 + }; + b.appendChild(s); }(window, document)); </script> |