Improve JS performance
This commit is contained in:
parent
c1a7e774e4
commit
6625528c35
1 changed files with 18 additions and 7 deletions
|
@ -110,17 +110,28 @@
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{ $fajs := resources.Get "scripts/fontawesome/all.min.js" }}
|
<!-- Font Awesome -->
|
||||||
{{ $jqueryjs := resources.Get "scripts/jquery/jquery.min.js" }}
|
{{ $fontawesome := resources.Get "scripts/fontawesome/fontawesome.min.js" }}
|
||||||
{{ $popperjs := resources.Get "scripts/popper/popper.min.js" }}
|
{{ $fontawesomebrands := resources.Get "scripts/fontawesome/brands.min.js" }}
|
||||||
{{ $twbsjs := resources.Get "scripts/bootstrap/bootstrap.min.js" }}
|
{{ $fontawesomeduo := resources.Get "scripts/fontawesome/duotone.min.js" }}
|
||||||
|
{{ $fontawesomecustom := resources.Get "scripts/fa-icons.js" | minify }}
|
||||||
|
{{ $fontawesomebundle := slice $fontawesome $fontawesomebrands $fontawesomeduo $fontawesomecustom | resources.Concat "js/fa-bundle.js" | fingerprint }}
|
||||||
|
<script src="{{ $fontawesomebundle.Permalink }}"></script>
|
||||||
|
|
||||||
|
<!-- JQuery -->
|
||||||
|
{{ $jquery := resources.Get "scripts/jquery/jquery.min.js" }}
|
||||||
{{ $jqmaskjs := resources.Get "scripts/jquery-mask-plugin/jquery.mask.min.js" }}
|
{{ $jqmaskjs := resources.Get "scripts/jquery-mask-plugin/jquery.mask.min.js" }}
|
||||||
{{ $fittextjs := resources.Get "scripts/fittext/jquery.fittext.js" | minify }}
|
{{ $fittextjs := resources.Get "scripts/fittext/jquery.fittext.js" | minify }}
|
||||||
{{ $scrolljs := resources.Get "scripts/scroll-effect.js" | minify }}
|
{{ $scrolljs := resources.Get "scripts/scroll-effect.js" | minify }}
|
||||||
{{ $maskjs := resources.Get "scripts/phone-masking.js" | minify }}
|
{{ $maskjs := resources.Get "scripts/phone-masking.js" | minify }}
|
||||||
|
{{ $jquerybundle := slice $jquery $jqmaskjs $fittextjs $scrolljs $maskjs | resources.Concat "js/jquery-bundle.js" | fingerprint }}
|
||||||
|
<script src="{{ $jquerybundle.Permalink }}"></script>
|
||||||
|
|
||||||
|
<!-- Bootstrap -->
|
||||||
|
{{ $popperjs := resources.Get "scripts/popper/popper.min.js" }}
|
||||||
|
{{ $twbsjs := resources.Get "scripts/bootstrap/bootstrap.min.js" }}
|
||||||
{{ $ttjs := resources.Get "scripts/tooltip-enable.js" | minify }}
|
{{ $ttjs := resources.Get "scripts/tooltip-enable.js" | minify }}
|
||||||
{{ $iconsjs := resources.Get "scripts/fa-icons.js" | minify }}
|
{{ $bootstrapbundle := slice $popperjs $twbsjs $ttjs | resources.Concat "js/bootstrap-bundle.js" | fingerprint }}
|
||||||
{{ $alljs := slice $jqueryjs $popperjs $twbsjs $fajs $fittextjs $scrolljs $jqmaskjs $maskjs $ttjs $iconsjs | resources.Concat "js/bundle.js" | fingerprint }}
|
<script src="{{ $bootstrapbundle.Permalink }}"></script>
|
||||||
<script src="{{ $alljs.Permalink }}"></script>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in a new issue