refactor: Move JQuery masking plugins to their own partial template
This commit is contained in:
parent
8ec7300c3e
commit
e8fbe1813b
3 changed files with 12 additions and 6 deletions
|
@ -14,6 +14,7 @@ menu:
|
|||
icon: file-signature
|
||||
weight: 1
|
||||
fa-thumbnail: file-signature
|
||||
validation: true
|
||||
---
|
||||
|
||||
<form
|
||||
|
|
|
@ -48,12 +48,11 @@
|
|||
</p>
|
||||
</footer>
|
||||
|
||||
<!-- 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>
|
||||
{{ with .Params.validation }}
|
||||
{{- partial "form-validation.html" -}}
|
||||
{{ end }}
|
||||
|
||||
|
||||
<!-- GoatCounter -->
|
||||
<script
|
||||
data-goatcounter="https://millironx.goatcounter.com/count"
|
||||
|
|
6
layouts/partials/form-validation.html
Normal file
6
layouts/partials/form-validation.html
Normal 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>
|
Loading…
Reference in a new issue