refactor: Move JQuery masking plugins to their own partial template

This commit is contained in:
Thomas A. Christensen II 2024-12-01 19:14:49 -07:00
parent 8ec7300c3e
commit e8fbe1813b
Signed by: millironx
GPG key ID: B7044A3432851F64
3 changed files with 12 additions and 6 deletions

View file

@ -14,6 +14,7 @@ menu:
icon: file-signature icon: file-signature
weight: 1 weight: 1
fa-thumbnail: file-signature fa-thumbnail: file-signature
validation: true
--- ---
<form <form

View file

@ -48,12 +48,11 @@
</p> </p>
</footer> </footer>
<!-- JQuery --> {{ with .Params.validation }}
{{ $jquery := resources.Get "scripts/jquery/jquery.min.js" }} {{- partial "form-validation.html" -}}
{{ $jqmaskjs := resources.Get "scripts/jquery-mask-plugin/jquery.mask.min.js" }} {{ end }}
{{ $maskjs := resources.Get "scripts/phone-masking.js" | minify }}
{{ $jquerybundle := slice $jquery $jqmaskjs $maskjs | resources.Concat "js/jquery-bundle.js" }}
<script src="{{ $jquerybundle.RelPermalink }}"></script>
<!-- GoatCounter --> <!-- GoatCounter -->
<script <script
data-goatcounter="https://millironx.goatcounter.com/count" data-goatcounter="https://millironx.goatcounter.com/count"

View file

@ -0,0 +1,6 @@
<!-- JQuery -->
{{ $jquery := resources.Get "scripts/jquery/jquery.min.js" }}
{{ $jqmaskjs := resources.Get "scripts/jquery-mask-plugin/jquery.mask.min.js" }}
{{ $maskjs := resources.Get "scripts/phone-masking.js" | minify }}
{{ $jquerybundle := slice $jquery $jqmaskjs $maskjs | resources.Concat "js/jquery-bundle.js" }}
<script src="{{ $jquerybundle.RelPermalink }}"></script>