lorescape/layouts/partials/scripts.html

25 lines
1.2 KiB
HTML

{{ $early := resources.Get "js/script-early.js" | minify | fingerprint -}}
<script src="{{ $early.RelPermalink }}"></script>
{{ if $.Param "jquery" -}}
{{ $jquery := resources.Get "js/lib/jquery.slim.min.js" | fingerprint -}}
<script defer src="{{ $jquery.RelPermalink }}"></script>
{{ end -}}
{{ $umbrella := resources.Get "js/lib/umbrella.min.js" | fingerprint -}}
<script defer src="{{ $umbrella.RelPermalink }}"></script>
{{ if $.Param "mobilemenu" -}}
{{ $mobilemenu := resources.Get "js/mobile.js" | minify | fingerprint -}}
<script defer src="{{ $mobilemenu.RelPermalink }}"></script>
{{ end -}}
{{ if .HasShortcode "contact" -}}
{{ $contact := resources.Get "js/contact.js" | minify | fingerprint -}}
<script defer src="{{ $contact.RelPermalink }}"></script>
{{ end -}}
{{ if .HasShortcode "search" -}}
{{ $flexsearch := resources.Get "js/lib/flexsearch.min.js" | fingerprint -}}
<script defer src="{{ $flexsearch.RelPermalink }}"></script>
{{ $search := resources.Get "js/search.js" | resources.ExecuteAsTemplate "js/search.js" . | minify | fingerprint -}}
<script defer src="{{ $search.RelPermalink }}"></script>
{{ end -}}
{{ $script := resources.Get "js/script.js" | minify | fingerprint -}}
<script defer src="{{ $script.RelPermalink }}"></script>