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>
|
||||
</div>
|
||||
</div>
|
||||
{{ $fajs := resources.Get "scripts/fontawesome/all.min.js" }}
|
||||
{{ $jqueryjs := resources.Get "scripts/jquery/jquery.min.js" }}
|
||||
{{ $popperjs := resources.Get "scripts/popper/popper.min.js" }}
|
||||
{{ $twbsjs := resources.Get "scripts/bootstrap/bootstrap.min.js" }}
|
||||
<!-- Font Awesome -->
|
||||
{{ $fontawesome := resources.Get "scripts/fontawesome/fontawesome.min.js" }}
|
||||
{{ $fontawesomebrands := resources.Get "scripts/fontawesome/brands.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" }}
|
||||
{{ $fittextjs := resources.Get "scripts/fittext/jquery.fittext.js" | minify }}
|
||||
{{ $scrolljs := resources.Get "scripts/scroll-effect.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 }}
|
||||
{{ $iconsjs := resources.Get "scripts/fa-icons.js" | minify }}
|
||||
{{ $alljs := slice $jqueryjs $popperjs $twbsjs $fajs $fittextjs $scrolljs $jqmaskjs $maskjs $ttjs $iconsjs | resources.Concat "js/bundle.js" | fingerprint }}
|
||||
<script src="{{ $alljs.Permalink }}"></script>
|
||||
{{ $bootstrapbundle := slice $popperjs $twbsjs $ttjs | resources.Concat "js/bootstrap-bundle.js" | fingerprint }}
|
||||
<script src="{{ $bootstrapbundle.Permalink }}"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in a new issue