Only request zoom library if it is not disabled.

There is already a if condition in `footer.html` that only runs the JS
from the zoom library if it is enabled per-site.
This commit takes the same if condition and applies it in `head.html` as
well to save a unnecessary web request to `zoom.min.js` if that is the case.
This commit is contained in:
Ruby 2023-11-28 06:25:25 +01:00
parent 45d634f6ca
commit a31607509e
No known key found for this signature in database
GPG key ID: DAD8FEADE58944B4

View file

@ -73,7 +73,9 @@
integrity="{{ $bundleJS.Data.Integrity }}" data-copy="{{ i18n " code.copy" }}" data-copied="{{ i18n " code.copied"
}}"></script>
{{ end }}
{{ if not .Site.Params.disableImageZoom | default true }}
<script src="{{ "js/zoom.min.js" | relURL }}"></script>
{{ end }}
{{/* Icons */}}
{{ if templates.Exists "partials/favicons.html" }}
{{ partialCached "favicons.html" .Site }}